1717 - " integrations/llama_cpp/**"
1818 - " !integrations/llama_cpp/*.md"
1919 - " .github/workflows/llama_cpp.yml"
20-
2120defaults :
2221 run :
2322 working-directory : integrations/llama_cpp
@@ -29,6 +28,8 @@ concurrency:
2928env :
3029 PYTHONUNBUFFERED : " 1"
3130 FORCE_COLOR : " 1"
31+ TEST_MATRIX_OS : ' ["ubuntu-latest", "windows-latest", "macos-latest"]'
32+ TEST_MATRIX_PYTHON : ' ["3.10", "3.14"]'
3233
3334jobs :
3435 compute-test-matrix :
@@ -37,26 +38,13 @@ jobs:
3738 run :
3839 working-directory : .
3940 outputs :
40- matrix : ${{ steps.set.outputs.matrix }}
41+ os : ${{ steps.set.outputs.os }}
42+ python-version : ${{ steps.set.outputs.python-version }}
4143 steps :
4244 - id : set
4345 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
46+ echo 'os=${{ github.event_name == 'push' && '["ubuntu-latest"]' || env.TEST_MATRIX_OS }}' >> "$GITHUB_OUTPUT"
47+ echo 'python-version=${{ github.event_name == 'push' && '["3.10"]' || env.TEST_MATRIX_PYTHON }}' >> "$GITHUB_OUTPUT"
6048
6149 run :
6250 name : Python ${{ matrix.python-version }} on ${{ startsWith(matrix.os, 'macos-') && 'macOS' || startsWith(matrix.os, 'windows-') && 'Windows' || 'Linux' }}
6856 strategy :
6957 fail-fast : false
7058 matrix :
71- include : ${{ fromJSON(needs.compute-test-matrix.outputs.matrix) }}
59+ os : ${{ fromJSON(needs.compute-test-matrix.outputs.os) }}
60+ python-version : ${{ fromJSON(needs.compute-test-matrix.outputs.python-version) }}
7261
7362 steps :
7463 - name : Support longpaths
0 commit comments