Skip to content

Commit a63c37d

Browse files
committed
SCons: Bump min version to 3.1.2, test it on CI with one Linux job
The min SCons version had to be bumped as SCons 3.0 before 3.0.3 seems broken (see godotengine#92043), and there's little gain from supporting 3.0.3-3.0.5. 3.1.2 is also the first version to avoid ambiguities between Python 2 and Python 3 usage, so we finally use it as the minimum baseline. Also test against Python 3.6 which is also our minimum supported version. This should help prevent regressions whenever we modernize the build scripts.
1 parent 5b34162 commit a63c37d

11 files changed

+37
-23
lines changed

.github/actions/godot-build/action.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ inputs:
1313
sconsflags:
1414
default: ""
1515
scons-cache:
16-
description: The scons cache path.
16+
description: The SCons cache path.
1717
default: "${{ github.workspace }}/.scons-cache/"
1818
scons-cache-limit:
19-
description: The scons cache size limit.
19+
description: The SCons cache size limit.
2020
# actions/cache has 10 GiB limit, and GitHub runners have a 14 GiB disk.
2121
# Limit to 7 GiB to avoid having the extracted cache fill the disk.
2222
default: 7168

.github/actions/godot-cache/action.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ inputs:
55
description: The cache base name (job name by default).
66
default: "${{github.job}}"
77
scons-cache:
8-
description: The scons cache path.
8+
description: The SCons cache path.
99
default: "${{github.workspace}}/.scons-cache/"
1010
runs:
1111
using: "composite"
1212
steps:
13-
# Upload cache on completion and check it out now
14-
- name: Load .scons_cache directory
13+
# Upload cache on completion and check it out now.
14+
- name: Load SCons cache directory
1515
uses: actions/cache@v4
1616
with:
1717
path: ${{inputs.scons-cache}}

.github/actions/godot-deps/action.yml

+12-9
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,30 @@
1-
name: Setup python and scons
2-
description: Setup python, install the pip version of scons.
1+
name: Setup Python and SCons
2+
description: Setup Python, install the pip version of SCons.
33
inputs:
44
python-version:
5-
description: The python version to use.
5+
description: The Python version to use.
66
default: "3.x"
77
python-arch:
8-
description: The python architecture.
8+
description: The Python architecture.
99
default: "x64"
10+
scons-version:
11+
description: The SCons version to use.
12+
default: "4.7.0"
1013
runs:
1114
using: "composite"
1215
steps:
13-
# Use python 3.x release (works cross platform)
1416
- name: Set up Python 3.x
1517
uses: actions/setup-python@v5
1618
with:
17-
# Semantic version range syntax or exact version of a Python version
19+
# Semantic version range syntax or exact version of a Python version.
1820
python-version: ${{ inputs.python-version }}
19-
# Optional - x64 or x86 architecture, defaults to x64
21+
# Optional - x64 or x86 architecture, defaults to x64.
2022
architecture: ${{ inputs.python-arch }}
2123

22-
- name: Setup scons
24+
- name: Setup SCons
2325
shell: bash
2426
run: |
2527
python -c "import sys; print(sys.version)"
26-
python -m pip install scons==4.7.0
28+
python -m pip install wheel
29+
python -m pip install scons==${{ inputs.scons-version }}
2730
scons --version

.github/workflows/android_builds.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
uses: ./.github/actions/godot-cache
3333
continue-on-error: true
3434

35-
- name: Setup python and scons
35+
- name: Setup Python and SCons
3636
uses: ./.github/actions/godot-deps
3737

3838
- name: Compilation (arm32)

.github/workflows/godot_cpp_test.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
with:
2323
submodules: recursive
2424

25-
- name: Setup python and scons
25+
- name: Setup Python and SCons
2626
uses: ./.github/actions/godot-deps
2727

2828
# Checkout godot-cpp
@@ -47,7 +47,7 @@ jobs:
4747
cp -f godot-api/gdextension_interface.h godot-cpp/gdextension/
4848
cp -f godot-api/extension_api.json godot-cpp/gdextension/
4949
50-
# TODO: Add caching to the scons build and store it for CI via the godot-cache
50+
# TODO: Add caching to the SCons build and store it for CI via the godot-cache
5151
# action.
5252

5353
# Build godot-cpp test extension

.github/workflows/ios_builds.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
uses: ./.github/actions/godot-cache
2727
continue-on-error: true
2828

29-
- name: Setup python and scons
29+
- name: Setup Python and SCons
3030
uses: ./.github/actions/godot-deps
3131

3232
- name: Compilation (arm64)

.github/workflows/linux_builds.yml

+12-1
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ jobs:
5858
tests: true
5959
# Skip 2GiB artifact speeding up action.
6060
artifact: false
61+
# Test our oldest supported SCons/Python versions on one arbitrary editor build.
62+
legacy-scons: true
6163

6264
- name: Editor with ThreadSanitizer (target=editor, tests=yes, dev_build=yes, use_tsan=yes, use_llvm=yes, linker=lld)
6365
cache-name: linux-editor-thread-sanitizer
@@ -115,9 +117,18 @@ jobs:
115117
cache-name: ${{ matrix.cache-name }}
116118
continue-on-error: true
117119

118-
- name: Setup python and scons
120+
- name: Setup Python and SCons
121+
if: ${{ ! matrix.legacy-scons }}
119122
uses: ./.github/actions/godot-deps
120123

124+
- name: Setup Python and SCons (legacy versions)
125+
if: ${{ matrix.legacy-scons }}
126+
uses: ./.github/actions/godot-deps
127+
with:
128+
# Sync with Ensure*Version in SConstruct.
129+
python-version: 3.6
130+
scons-version: 3.1.2
131+
121132
- name: Setup GCC problem matcher
122133
uses: ammaraskar/gcc-problem-matcher@master
123134

.github/workflows/macos_builds.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
cache-name: ${{ matrix.cache-name }}
4444
continue-on-error: true
4545

46-
- name: Setup python and scons
46+
- name: Setup Python and SCons
4747
uses: ./.github/actions/godot-deps
4848

4949
- name: Setup Vulkan SDK

.github/workflows/web_builds.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
cache-name: ${{ matrix.cache-name }}
5959
continue-on-error: true
6060

61-
- name: Setup python and scons
61+
- name: Setup Python and SCons
6262
uses: ./.github/actions/godot-deps
6363

6464
- name: Compilation

.github/workflows/windows_builds.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
cache-name: ${{ matrix.cache-name }}
4949
continue-on-error: true
5050

51-
- name: Setup python and scons
51+
- name: Setup Python and SCons
5252
uses: ./.github/actions/godot-deps
5353

5454
- name: Download Direct3D 12 SDK components

SConstruct

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python
22

3-
EnsureSConsVersion(3, 0, 0)
3+
EnsureSConsVersion(3, 1, 2)
44
EnsurePythonVersion(3, 6)
55

66
# System

0 commit comments

Comments
 (0)