Skip to content

Commit f8c44ed

Browse files
committed
🧪💅Evaluate free-threading var as JSON @ CI
Sometimes, GitHub Actions turn things into strings when passing the data around. So it's usually safer to turn them into proper booleans in expressions explicitly.
1 parent 5d6861a commit f8c44ed

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

‎.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,13 +181,13 @@ jobs:
181181
build_windows:
182182
name: 'Windows'
183183
needs: check_source
184-
if: needs.check_source.outputs.run_tests == 'true'
184+
if: fromJSON(needs.check_source.outputs.run_tests)
185185
uses: ./.github/workflows/reusable-windows.yml
186186

187187
build_windows_free_threading:
188188
name: 'Windows (free-threading)'
189189
needs: check_source
190-
if: needs.check_source.outputs.run_tests == 'true'
190+
if: fromJSON(needs.check_source.outputs.run_tests)
191191
uses: ./.github/workflows/reusable-windows.yml
192192
with:
193193
free-threading: true

‎.github/workflows/reusable-windows.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ jobs:
1616
steps:
1717
- uses: actions/checkout@v4
1818
- name: Build CPython
19-
run: .\PCbuild\build.bat -e -d -v -p Win32 ${{ inputs.free-threading && '--disable-gil' || '' }}
19+
run: .\PCbuild\build.bat -e -d -v -p Win32 ${{ fromJSON(inputs.free-threading) && '--disable-gil' || '' }}
2020
- name: Display build info
2121
run: .\python.bat -m test.pythoninfo
2222
- name: Tests
23-
run: .\PCbuild\rt.bat -p Win32 -d -q --fast-ci ${{ inputs.free-threading && '--disable-gil' || '' }}
23+
run: .\PCbuild\rt.bat -p Win32 -d -q --fast-ci ${{ fromJSON(inputs.free-threading) && '--disable-gil' || '' }}
2424

2525
build_win_amd64:
2626
name: 'build and test (x64)'
@@ -33,11 +33,11 @@ jobs:
3333
- name: Register MSVC problem matcher
3434
run: echo "::add-matcher::.github/problem-matchers/msvc.json"
3535
- name: Build CPython
36-
run: .\PCbuild\build.bat -e -d -v -p x64 ${{ inputs.free-threading && '--disable-gil' || '' }}
36+
run: .\PCbuild\build.bat -e -d -v -p x64 ${{ fromJSON(inputs.free-threading) && '--disable-gil' || '' }}
3737
- name: Display build info
3838
run: .\python.bat -m test.pythoninfo
3939
- name: Tests
40-
run: .\PCbuild\rt.bat -p x64 -d -q --fast-ci ${{ inputs.free-threading && '--disable-gil' || '' }}
40+
run: .\PCbuild\rt.bat -p x64 -d -q --fast-ci ${{ fromJSON(inputs.free-threading) && '--disable-gil' || '' }}
4141

4242
build_win_arm64:
4343
name: 'build (arm64)'
@@ -50,4 +50,4 @@ jobs:
5050
- name: Register MSVC problem matcher
5151
run: echo "::add-matcher::.github/problem-matchers/msvc.json"
5252
- name: Build CPython
53-
run: .\PCbuild\build.bat -e -d -v -p arm64 ${{ inputs.free-threading && '--disable-gil' || '' }}
53+
run: .\PCbuild\build.bat -e -d -v -p arm64 ${{ fromJSON(inputs.free-threading) && '--disable-gil' || '' }}

0 commit comments

Comments
 (0)