Merge pull request #92043 from akien-mga/ci-scons-3.0.0-python-3.6

SCons: Bump min version to 3.1.2, test it on CI with one Linux job
This commit is contained in:
Rémi Verschelde 2024-05-17 13:00:41 +02:00
commit bd2300d77a
No known key found for this signature in database
GPG Key ID: C3336907360768E1
11 changed files with 37 additions and 23 deletions

View File

@ -13,10 +13,10 @@ inputs:
sconsflags: sconsflags:
default: "" default: ""
scons-cache: scons-cache:
description: The scons cache path. description: The SCons cache path.
default: "${{ github.workspace }}/.scons-cache/" default: "${{ github.workspace }}/.scons-cache/"
scons-cache-limit: scons-cache-limit:
description: The scons cache size limit. description: The SCons cache size limit.
# actions/cache has 10 GiB limit, and GitHub runners have a 14 GiB disk. # actions/cache has 10 GiB limit, and GitHub runners have a 14 GiB disk.
# Limit to 7 GiB to avoid having the extracted cache fill the disk. # Limit to 7 GiB to avoid having the extracted cache fill the disk.
default: 7168 default: 7168

View File

@ -5,13 +5,13 @@ inputs:
description: The cache base name (job name by default). description: The cache base name (job name by default).
default: "${{github.job}}" default: "${{github.job}}"
scons-cache: scons-cache:
description: The scons cache path. description: The SCons cache path.
default: "${{github.workspace}}/.scons-cache/" default: "${{github.workspace}}/.scons-cache/"
runs: runs:
using: "composite" using: "composite"
steps: steps:
# Upload cache on completion and check it out now # Upload cache on completion and check it out now.
- name: Load .scons_cache directory - name: Load SCons cache directory
uses: actions/cache@v4 uses: actions/cache@v4
with: with:
path: ${{inputs.scons-cache}} path: ${{inputs.scons-cache}}

View File

@ -1,27 +1,30 @@
name: Setup python and scons name: Setup Python and SCons
description: Setup python, install the pip version of scons. description: Setup Python, install the pip version of SCons.
inputs: inputs:
python-version: python-version:
description: The python version to use. description: The Python version to use.
default: "3.x" default: "3.x"
python-arch: python-arch:
description: The python architecture. description: The Python architecture.
default: "x64" default: "x64"
scons-version:
description: The SCons version to use.
default: "4.7.0"
runs: runs:
using: "composite" using: "composite"
steps: steps:
# Use python 3.x release (works cross platform)
- name: Set up Python 3.x - name: Set up Python 3.x
uses: actions/setup-python@v5 uses: actions/setup-python@v5
with: with:
# Semantic version range syntax or exact version of a Python version # Semantic version range syntax or exact version of a Python version.
python-version: ${{ inputs.python-version }} python-version: ${{ inputs.python-version }}
# Optional - x64 or x86 architecture, defaults to x64 # Optional - x64 or x86 architecture, defaults to x64.
architecture: ${{ inputs.python-arch }} architecture: ${{ inputs.python-arch }}
- name: Setup scons - name: Setup SCons
shell: bash shell: bash
run: | run: |
python -c "import sys; print(sys.version)" python -c "import sys; print(sys.version)"
python -m pip install scons==4.7.0 python -m pip install wheel
python -m pip install scons==${{ inputs.scons-version }}
scons --version scons --version

View File

@ -32,7 +32,7 @@ jobs:
uses: ./.github/actions/godot-cache uses: ./.github/actions/godot-cache
continue-on-error: true continue-on-error: true
- name: Setup python and scons - name: Setup Python and SCons
uses: ./.github/actions/godot-deps uses: ./.github/actions/godot-deps
- name: Compilation (arm32) - name: Compilation (arm32)

View File

@ -22,7 +22,7 @@ jobs:
with: with:
submodules: recursive submodules: recursive
- name: Setup python and scons - name: Setup Python and SCons
uses: ./.github/actions/godot-deps uses: ./.github/actions/godot-deps
# Checkout godot-cpp # Checkout godot-cpp
@ -47,7 +47,7 @@ jobs:
cp -f godot-api/gdextension_interface.h godot-cpp/gdextension/ cp -f godot-api/gdextension_interface.h godot-cpp/gdextension/
cp -f godot-api/extension_api.json godot-cpp/gdextension/ cp -f godot-api/extension_api.json godot-cpp/gdextension/
# TODO: Add caching to the scons build and store it for CI via the godot-cache # TODO: Add caching to the SCons build and store it for CI via the godot-cache
# action. # action.
# Build godot-cpp test extension # Build godot-cpp test extension

View File

@ -26,7 +26,7 @@ jobs:
uses: ./.github/actions/godot-cache uses: ./.github/actions/godot-cache
continue-on-error: true continue-on-error: true
- name: Setup python and scons - name: Setup Python and SCons
uses: ./.github/actions/godot-deps uses: ./.github/actions/godot-deps
- name: Compilation (arm64) - name: Compilation (arm64)

View File

@ -58,6 +58,8 @@ jobs:
tests: true tests: true
# Skip 2GiB artifact speeding up action. # Skip 2GiB artifact speeding up action.
artifact: false artifact: false
# Test our oldest supported SCons/Python versions on one arbitrary editor build.
legacy-scons: true
- name: Editor with ThreadSanitizer (target=editor, tests=yes, dev_build=yes, use_tsan=yes, use_llvm=yes, linker=lld) - name: Editor with ThreadSanitizer (target=editor, tests=yes, dev_build=yes, use_tsan=yes, use_llvm=yes, linker=lld)
cache-name: linux-editor-thread-sanitizer cache-name: linux-editor-thread-sanitizer
@ -115,9 +117,18 @@ jobs:
cache-name: ${{ matrix.cache-name }} cache-name: ${{ matrix.cache-name }}
continue-on-error: true continue-on-error: true
- name: Setup python and scons - name: Setup Python and SCons
if: ${{ ! matrix.legacy-scons }}
uses: ./.github/actions/godot-deps uses: ./.github/actions/godot-deps
- name: Setup Python and SCons (legacy versions)
if: ${{ matrix.legacy-scons }}
uses: ./.github/actions/godot-deps
with:
# Sync with Ensure*Version in SConstruct.
python-version: 3.6
scons-version: 3.1.2
- name: Setup GCC problem matcher - name: Setup GCC problem matcher
uses: ammaraskar/gcc-problem-matcher@master uses: ammaraskar/gcc-problem-matcher@master

View File

@ -43,7 +43,7 @@ jobs:
cache-name: ${{ matrix.cache-name }} cache-name: ${{ matrix.cache-name }}
continue-on-error: true continue-on-error: true
- name: Setup python and scons - name: Setup Python and SCons
uses: ./.github/actions/godot-deps uses: ./.github/actions/godot-deps
- name: Setup Vulkan SDK - name: Setup Vulkan SDK

View File

@ -58,7 +58,7 @@ jobs:
cache-name: ${{ matrix.cache-name }} cache-name: ${{ matrix.cache-name }}
continue-on-error: true continue-on-error: true
- name: Setup python and scons - name: Setup Python and SCons
uses: ./.github/actions/godot-deps uses: ./.github/actions/godot-deps
- name: Compilation - name: Compilation

View File

@ -48,7 +48,7 @@ jobs:
cache-name: ${{ matrix.cache-name }} cache-name: ${{ matrix.cache-name }}
continue-on-error: true continue-on-error: true
- name: Setup python and scons - name: Setup Python and SCons
uses: ./.github/actions/godot-deps uses: ./.github/actions/godot-deps
- name: Download Direct3D 12 SDK components - name: Download Direct3D 12 SDK components

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python #!/usr/bin/env python
EnsureSConsVersion(3, 0, 0) EnsureSConsVersion(3, 1, 2)
EnsurePythonVersion(3, 6) EnsurePythonVersion(3, 6)
# System # System