|
7 | 7 | pull_request: |
8 | 8 |
|
9 | 9 | jobs: |
| 10 | + # Build dynamically the matrix on which the "break" job will run. |
| 11 | + # The matrix contains the packages that depend on ${{ env.pkg }}. |
| 12 | + # Job "setup_matrix" outputs variable "matrix", which is in turn |
| 13 | + # the output of the "getmatrix" step. |
| 14 | + # The contents of "matrix" is a JSON description of a matrix used |
| 15 | + # in the next step. It has the form |
| 16 | + # { |
| 17 | + # "pkg": [ |
| 18 | + # "PROPACK", |
| 19 | + # "LLSModels", |
| 20 | + # "FletcherPenaltySolver" |
| 21 | + # ] |
| 22 | + # } |
| 23 | + setup_matrix: |
| 24 | + runs-on: ubuntu-latest |
| 25 | + outputs: |
| 26 | + matrix: ${{ steps.getmatrix.outputs.matrix }} |
| 27 | + env: |
| 28 | + pkg: ${{ github.event.repository.name }} |
| 29 | + steps: |
| 30 | + - uses: actions/checkout@v4 |
| 31 | + - uses: julia-actions/setup-julia@v2 |
| 32 | + with: |
| 33 | + version: 1 |
| 34 | + arch: x64 |
| 35 | + - id: getmatrix |
| 36 | + run: | |
| 37 | + julia -e 'using Pkg; Pkg.Registry.add(RegistrySpec(url = "https://github.com/JuliaRegistries/General.git"))' |
| 38 | + julia --project=.breakage -e 'using Pkg; Pkg.update(); Pkg.instantiate()' |
| 39 | + pkgs=$(julia --project=.breakage .breakage/get_jso_users.jl ${{ env.pkg }}) |
| 40 | + vs='["latest", "stable"]' |
| 41 | + matrix=$(jq -cn --argjson deps "$pkgs" --argjson vers "$vs" '{pkg: $deps, pkgversion: $vers}') # don't escape quotes like many posts suggest |
| 42 | + echo "matrix=$matrix" >> "$GITHUB_OUTPUT" |
| 43 | +
|
10 | 44 | break: |
| 45 | + needs: setup_matrix |
11 | 46 | runs-on: ubuntu-latest |
12 | 47 | strategy: |
13 | 48 | fail-fast: false |
14 | | - matrix: |
15 | | - pkg: [ |
16 | | - "CaNNOLeS.jl", |
17 | | - "DCISolver.jl", |
18 | | - "FletcherPenaltySolver.jl", |
19 | | - "JSOSolvers.jl", |
20 | | - "Krylov.jl", |
21 | | - "NLPModels.jl", |
22 | | - "NLPModelsModifiers.jl", |
23 | | - "Percival.jl", |
24 | | - "PROPACK.jl", |
25 | | - "QuadraticModels.jl", |
26 | | - "SolverTools.jl" |
27 | | - ] |
28 | | - pkgversion: [latest, stable] |
| 49 | + matrix: ${{ fromJSON(needs.setup_matrix.outputs.matrix) }} |
29 | 50 |
|
30 | 51 | steps: |
31 | 52 | - uses: actions/checkout@v4 |
|
55 | 76 | run: | |
56 | 77 | set -v |
57 | 78 | mkdir -p ./breakage |
58 | | - git clone https://github.com/JuliaSmoothOptimizers/$PKG |
59 | | - cd $PKG |
| 79 | + git clone https://github.com/JuliaSmoothOptimizers/$PKG.jl.git |
| 80 | + cd $PKG.jl |
60 | 81 | if [ $VERSION == "stable" ]; then |
61 | 82 | TAG=$(git tag -l "v*" --sort=-creatordate | head -n1) |
62 | 83 | if [ -z "$TAG" ]; then |
|
0 commit comments