@@ -14,18 +14,39 @@ concurrency:
1414 cancel-in-progress : ${{ startsWith(github.ref, 'refs/pull/') }}
1515
1616jobs :
17+ build_matrix :
18+ name : Build Test Matrix
19+ runs-on : ubuntu-latest
20+ outputs :
21+ matrix : ${{ steps.set-matrix.outputs.matrix }}
22+ steps :
23+ - run : |
24+ cat > matrix.yaml <<- EOM
25+ - {mode: stable, arch: x64, os: ubuntu-latest, payload: minimal }
26+ - {mode: stable, arch: x64, os: ubuntu-latest, payload: nominimal-noslow }
27+ - {mode: stable, arch: x64, os: ubuntu-latest, payload: example }
28+ - {mode: stable, arch: aarch64, os: macOS-latest, payload: minimal }
29+ - {mode: stable, arch: x64, os: ubuntu-latest, payload: noslow-mpi }
30+ - {mode: latest, arch: x64, os: ubuntu-latest, payload: minimal }
31+ EOM
32+ # Windows tests are disabled for PR builds
33+ - if : ${{ github.event_name != 'pull_request' }}
34+ run : |
35+ cat >> matrix.yaml <<- EOM
36+ - {mode: latest, arch: x64, os: windows-latest, payload: minimal }
37+ EOM
38+ - name : Convert to JSON
39+ run : |
40+ python3 -c 'import sys, yaml, json; json.dump(yaml.safe_load(sys.stdin), sys.stdout)' < matrix.yaml > matrix.json
41+ - id : set-matrix
42+ run : echo "matrix={\"include\":$(cat matrix.json)}" >> $GITHUB_OUTPUT
1743 test :
1844 name : Julia ${{ matrix.mode }} - ${{ matrix.os }} - ${{ matrix.payload }}
45+ needs : build_matrix
1946 runs-on : ${{ matrix.os }}
2047 strategy :
2148 fail-fast : false
22- matrix :
23- include :
24- - {mode: stable, os: ubuntu-latest, payload: noslow-example }
25- - {mode: stable, os: macOS-latest, payload: noslow }
26- - {mode: stable, os: windows-latest, payload: noslow }
27- - {mode: stable, os: ubuntu-latest, payload: noslow-mpi }
28- - {mode: latest, os: ubuntu-latest, payload: noslow }
49+ matrix : ${{ fromJson(needs.build_matrix.outputs.matrix) }}
2950 env :
3051 GKS_ENCODING : utf8
3152 GKSwstype : 100 # Needed for Plots-related tests
3960 uses : julia-actions/setup-julia@v2
4061 with :
4162 version : ' 1.10'
42- arch : x64
63+ arch : ${{ matrix.arch }}
4364 if : ${{ matrix.mode == 'stable' }}
4465 - name : Setup Julia latest (pre-releases included)
4566 uses : julia-actions/setup-julia@v2
0 commit comments