@@ -29,6 +29,8 @@ 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"]'
3234
3335jobs :
3436 compute-test-matrix :
@@ -37,26 +39,13 @@ jobs:
3739 run :
3840 working-directory : .
3941 outputs :
40- matrix : ${{ steps.set.outputs.matrix }}
42+ os : ${{ steps.set.outputs.os }}
43+ python-version : ${{ steps.set.outputs.python-version }}
4144 steps :
4245 - id : set
4346 run : |
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
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"
6049
6150 run :
6251 name : Python ${{ matrix.python-version }} on ${{ startsWith(matrix.os, 'macos-') && 'macOS' || startsWith(matrix.os, 'windows-') && 'Windows' || 'Linux' }}
6857 strategy :
6958 fail-fast : false
7059 matrix :
71- include : ${{ fromJSON(needs.compute-test-matrix.outputs.matrix) }}
60+ os : ${{ fromJSON(needs.compute-test-matrix.outputs.os) }}
61+ python-version : ${{ fromJSON(needs.compute-test-matrix.outputs.python-version) }}
7262
7363 steps :
7464 - name : Support longpaths
0 commit comments