@@ -29,8 +29,6 @@ concurrency:
2929env :
3030 PYTHONUNBUFFERED : " 1"
3131 FORCE_COLOR : " 1"
32- TEST_MATRIX_OS : ' ["ubuntu-latest", "windows-latest", "macos-latest"]'
33- TEST_MATRIX_PYTHON : ' ["3.10", "3.14"]'
3432
3533jobs :
3634 compute-test-matrix :
@@ -39,13 +37,26 @@ jobs:
3937 run :
4038 working-directory : .
4139 outputs :
42- os : ${{ steps.set.outputs.os }}
43- python-version : ${{ steps.set.outputs.python-version }}
40+ matrix : ${{ steps.set.outputs.matrix }}
4441 steps :
4542 - id : set
4643 run : |
47- echo 'os=${{ github.event_name == 'push' && '["ubuntu-latest"]' || env.TEST_MATRIX_OS }}' >> "$GITHUB_OUTPUT"
48- echo 'python-version=${{ github.event_name == 'push' && '["3.10"]' || env.TEST_MATRIX_PYTHON }}' >> "$GITHUB_OUTPUT"
44+ if [ "${{ github.event_name }}" = "push" ]; then
45+ echo 'matrix=[{"os":"ubuntu-latest","python-version":"3.10"}]' >> "$GITHUB_OUTPUT"
46+ else
47+ MATRIX='['
48+ MATRIX+='{"os":"ubuntu-latest","python-version":"3.10"},'
49+ MATRIX+='{"os":"ubuntu-latest","python-version":"3.14"},'
50+ MATRIX+='{"os":"windows-latest","python-version":"3.10"},'
51+ MATRIX+='{"os":"windows-latest","python-version":"3.14"},'
52+ # On macOS, pre-built wheels for 3.14 are not available and installing from source
53+ # might fail due to missing dependencies (CMake fails with "OpenMP not found").
54+ # We test with 3.12 instead because pre-built wheels are available for this version.
55+ MATRIX+='{"os":"macos-latest","python-version":"3.10"},'
56+ MATRIX+='{"os":"macos-latest","python-version":"3.12"}'
57+ MATRIX+=']'
58+ echo "matrix=$MATRIX" >> "$GITHUB_OUTPUT"
59+ fi
4960
5061 run :
5162 name : Python ${{ matrix.python-version }} on ${{ startsWith(matrix.os, 'macos-') && 'macOS' || startsWith(matrix.os, 'windows-') && 'Windows' || 'Linux' }}
5768 strategy :
5869 fail-fast : false
5970 matrix :
60- os : ${{ fromJSON(needs.compute-test-matrix.outputs.os) }}
61- python-version : ${{ fromJSON(needs.compute-test-matrix.outputs.python-version) }}
71+ include : ${{ fromJSON(needs.compute-test-matrix.outputs.matrix) }}
6272
6373 steps :
6474 - name : Support longpaths
0 commit comments