Require Python 3.10+
3.9 is EOL.
This commit is contained in:
8
.github/workflows/Windows_build.yml
vendored
8
.github/workflows/Windows_build.yml
vendored
@@ -55,6 +55,10 @@ jobs:
|
|||||||
POWERSHELL_TELEMETRY_OPTOUT: 1
|
POWERSHELL_TELEMETRY_OPTOUT: 1
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@main
|
- uses: actions/checkout@main
|
||||||
|
# TODO: Remove this once the default Python is upgraded from 3.9: https://github.com/actions/runner-images/blob/main/images/windows/Windows2025-Readme.md#language-and-runtime
|
||||||
|
- uses: actions/setup-python@main
|
||||||
|
with:
|
||||||
|
python-version: '3.x'
|
||||||
- name: Lint
|
- name: Lint
|
||||||
run: python xenia-build.py lint --all
|
run: python xenia-build.py lint --all
|
||||||
|
|
||||||
@@ -70,6 +74,10 @@ jobs:
|
|||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Setup
|
- name: Setup
|
||||||
run: git submodule update --init --depth=1 -j $env:NUMBER_OF_PROCESSORS (Select-String -CaseSensitive '(?<=path = )(?!third_party\/(FidelityFX-(CAS|FSR)|premake-(androidndk|cmake|export-compile-commands))).+' .gitmodules).Matches.Value
|
run: git submodule update --init --depth=1 -j $env:NUMBER_OF_PROCESSORS (Select-String -CaseSensitive '(?<=path = )(?!third_party\/(FidelityFX-(CAS|FSR)|premake-(androidndk|cmake|export-compile-commands))).+' .gitmodules).Matches.Value
|
||||||
|
# TODO: Remove this once the default Python is upgraded from 3.9: https://github.com/actions/runner-images/blob/main/images/windows/Windows2025-Readme.md#language-and-runtime
|
||||||
|
- uses: actions/setup-python@main
|
||||||
|
with:
|
||||||
|
python-version: '3.x'
|
||||||
- name: Build
|
- name: Build
|
||||||
run: python xenia-build.py build --config=Release --target=src\xenia-app
|
run: python xenia-build.py build --config=Release --target=src\xenia-app
|
||||||
- name: Prepare artifacts
|
- name: Prepare artifacts
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ drivers.
|
|||||||
* [Visual Studio 2022](https://www.visualstudio.com/downloads/)
|
* [Visual Studio 2022](https://www.visualstudio.com/downloads/)
|
||||||
* CMake 3.10+ (or C++ CMake tools for Windows)
|
* CMake 3.10+ (or C++ CMake tools for Windows)
|
||||||
* Windows 11 SDK version 10.0.22000.0 (for Visual Studio 2022, this or any newer version)
|
* Windows 11 SDK version 10.0.22000.0 (for Visual Studio 2022, this or any newer version)
|
||||||
* [Python 3.9+ 64-bit](https://www.python.org/downloads/)
|
* [Python 3.10+ 64-bit](https://www.python.org/downloads/)
|
||||||
* Ensure Python is in PATH.
|
* Ensure Python is in PATH.
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|||||||
2
xb.bat
2
xb.bat
@@ -10,7 +10,7 @@ REM ============================================================================
|
|||||||
CALL :check_python
|
CALL :check_python
|
||||||
IF %_RESULT% NEQ 0 (
|
IF %_RESULT% NEQ 0 (
|
||||||
ECHO.
|
ECHO.
|
||||||
ECHO Python 3.9+ must be installed and on PATH:
|
ECHO Python 3.10+ must be installed and on PATH:
|
||||||
ECHO https://www.python.org/
|
ECHO https://www.python.org/
|
||||||
GOTO :eof
|
GOTO :eof
|
||||||
)
|
)
|
||||||
|
|||||||
2
xb.ps1
2
xb.ps1
@@ -9,7 +9,7 @@ foreach ($pythonExecutable in $pythonExecutables) {
|
|||||||
}
|
}
|
||||||
# Neither found, error and exit
|
# Neither found, error and exit
|
||||||
if (!$pythonPath) {
|
if (!$pythonPath) {
|
||||||
Throw "ERROR: Python 3.9+ 64-bit must be installed and on PATH:`nhttps://www.python.org/"
|
Throw "ERROR: Python 3.10+ 64-bit must be installed and on PATH:`nhttps://www.python.org/"
|
||||||
}
|
}
|
||||||
|
|
||||||
& $pythonPath "$($PSScriptRoot)/xenia-build.py" $args
|
& $pythonPath "$($PSScriptRoot)/xenia-build.py" $args
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ def main():
|
|||||||
print("WARNING: The source tree is unversioned. Version info will be omitted from all binaries!\n")
|
print("WARNING: The source tree is unversioned. Version info will be omitted from all binaries!\n")
|
||||||
|
|
||||||
# Check python version.
|
# Check python version.
|
||||||
python_minimum_ver = 3,9
|
python_minimum_ver = 3,10
|
||||||
if not sys.version_info[:2] >= (python_minimum_ver[0], python_minimum_ver[1]) or not sys.maxsize > 2**32:
|
if not sys.version_info[:2] >= (python_minimum_ver[0], python_minimum_ver[1]) or not sys.maxsize > 2**32:
|
||||||
print(f"ERROR: Python {python_minimum_ver[0]}.{python_minimum_ver[1]}+ 64-bit must be installed and on PATH")
|
print(f"ERROR: Python {python_minimum_ver[0]}.{python_minimum_ver[1]}+ 64-bit must be installed and on PATH")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
@@ -420,10 +420,10 @@ def get_pr_number():
|
|||||||
Returns the pull request number if the workflow is triggered by a PR, otherwise None.
|
Returns the pull request number if the workflow is triggered by a PR, otherwise None.
|
||||||
"""
|
"""
|
||||||
github_ref = os.getenv('GITHUB_REF')
|
github_ref = os.getenv('GITHUB_REF')
|
||||||
|
|
||||||
if github_ref and github_ref.startswith('refs/pull/'):
|
if github_ref and github_ref.startswith('refs/pull/'):
|
||||||
return github_ref.split('/')[2]
|
return github_ref.split('/')[2]
|
||||||
|
|
||||||
def git_submodule_update():
|
def git_submodule_update():
|
||||||
"""Runs a git submodule init and update.
|
"""Runs a git submodule init and update.
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user