@@ -30,31 +30,45 @@ jobs:
3030 define-matrix :
3131 runs-on : ubuntu-latest
3232 outputs :
33- rust_toolchain_version : ${{ steps.rust.outputs.version }}
34- default_rust_version : ${{ fromJson(steps.rust.outputs.version)[0] }}
3533 ocaml_version : ${{ steps.ocaml.outputs.version }}
3634 node : ${{ steps.node.outputs.version }}
37- os : ${{ steps.os.outputs.version }}
38- default_os : ${{ fromJson(steps.os.outputs.version)[0] }}
35+ matrix : ${{ steps.matrix.outputs.value }}
36+ default_rust_version : ${{ steps.defaults.outputs.rust_version }}
37+ default_os : ${{ steps.defaults.outputs.os }}
3938 steps :
40- - id : rust
41- run : echo 'version=["1.81", "1.82"]' >> "$GITHUB_OUTPUT"
4239 # FIXME: currently not available for 5.0.0.
4340 # It might be related to boxroot dependency, and we would need to bump
4441 # up the ocaml-rs dependency
4542 - id : ocaml
4643 run : echo 'version=["4.14.2"]' >> "$GITHUB_OUTPUT"
4744 - id : node
4845 run : echo 'version=["20"]' >> "$GITHUB_OUTPUT"
49- - id : os
50- run : echo 'version=["ubuntu-latest", "ubuntu-24.04-arm"]' >> "$GITHUB_OUTPUT"
46+ - id : defaults
47+ run : |
48+ echo 'rust_version=1.81' >> "$GITHUB_OUTPUT"
49+ echo 'os=ubuntu-latest' >> "$GITHUB_OUTPUT"
50+ - id : matrix
51+ run : |
52+ # NOTE: This custom matrix configuration is needed to use Rust 1.84 specifically for macOS.
53+ # When https://github.com/o1-labs/proof-systems/issues/3254 is fixed,
54+ # this can be simplified to use a standard matrix configuration.
55+ cat > matrix.json << 'EOF'
56+ {
57+ "include": [
58+ {"rust_toolchain_version": "1.81", "os": "ubuntu-latest"},
59+ {"rust_toolchain_version": "1.82", "os": "ubuntu-latest"},
60+ {"rust_toolchain_version": "1.81", "os": "ubuntu-24.04-arm"},
61+ {"rust_toolchain_version": "1.82", "os": "ubuntu-24.04-arm"},
62+ {"rust_toolchain_version": "1.84", "os": "macos-latest"}
63+ ]
64+ }
65+ EOF
66+ echo "value=$(cat matrix.json | jq -c .)" >> "$GITHUB_OUTPUT"
5167
5268 refresh-cache :
5369 needs : ['define-matrix']
5470 strategy :
55- matrix :
56- rust_toolchain_version : ${{ fromJSON(needs.define-matrix.outputs.rust_toolchain_version) }}
57- os : ${{ fromJSON(needs.define-matrix.outputs.os) }}
71+ matrix : ${{ fromJSON(needs.define-matrix.outputs.matrix) }}
5872 runs-on : ${{ matrix.os }}
5973 steps :
6074 # if 'workflow_run'
6478 - uses : ./.github/actions/toolchain-shared
6579 if : ${{ github.event_name == 'workflow_run' }}
6680 with :
67- rust_toolchain_version : ${{ matrix.rust_toolchain_version }}
81+ rust_toolchain_version : ${{ matrix.rust_and_os. rust_toolchain_version }}
6882 - name : start-fresh
6983 if : ${{ github.event_name == 'workflow_run' }}
7084 shell : bash
@@ -81,11 +95,14 @@ jobs:
8195 needs : ['define-matrix', 'refresh-cache']
8296 strategy :
8397 matrix :
84- rust_toolchain_version : ${{ fromJSON(needs.define-matrix.outputs.rust_toolchain_version) }}
98+ rust_and_os : ${{ fromJSON(needs.define-matrix.outputs.matrix).include }}
8599 ocaml_version : ${{ fromJSON(needs.define-matrix.outputs.ocaml_version) }}
86100 node : ${{ fromJSON(needs.define-matrix.outputs.node) }}
87- os : ${{ fromJSON(needs.define-matrix.outputs.os) }}
88- runs-on : ${{ matrix.os }}
101+ exclude :
102+ # Skip Rust 1.84 due to linting issues - remove when
103+ # https://github.com/o1-labs/proof-systems/pull/3245 is fixed
104+ - rust_and_os : {rust_toolchain_version: '1.84', os: 'macos-latest'}
105+ runs-on : ${{ matrix.rust_and_os.os }}
89106 steps :
90107 - name : Checkout repository
91108 uses : actions/checkout@v5
@@ -100,7 +117,7 @@ jobs:
100117 - name : Use shared Rust toolchain setting up steps
101118 uses : ./.github/actions/toolchain-shared
102119 with :
103- rust_toolchain_version : ${{ matrix.rust_toolchain_version }}
120+ rust_toolchain_version : ${{ matrix.rust_and_os. rust_toolchain_version }}
104121
105122 - name : Use shared OCaml setting up steps
106123 uses : ./.github/actions/ocaml-shared
@@ -159,10 +176,10 @@ jobs:
159176
160177 - name : Rerun doc generation with different args and copy into book directory
161178 if : >-
162- github.event_name == 'push' &&
179+ github.event_name == 'push' &&
163180 github.ref == 'refs/heads/master' &&
164- matrix.rust_toolchain_version == needs.define-matrix.outputs.default_rust_version &&
165- matrix.os == needs.define-matrix.outputs.default_os
181+ matrix.rust_and_os. rust_toolchain_version == needs.define-matrix.outputs.default_rust_version &&
182+ matrix.rust_and_os. os == needs.define-matrix.outputs.default_os
166183 run : |
167184 eval $(opam env)
168185 RUSTDOCFLAGS="--enable-index-page -Zunstable-options" cargo +nightly doc --all-features --no-deps --workspace --exclude xtask
@@ -171,10 +188,10 @@ jobs:
171188 - name : Deploy
172189 uses : peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e
173190 if : >-
174- github.event_name == 'push' &&
191+ github.event_name == 'push' &&
175192 github.ref == 'refs/heads/master' &&
176- matrix.rust_toolchain_version == needs.define-matrix.outputs.default_rust_version &&
177- matrix.os == needs.define-matrix.outputs.default_os
193+ matrix.rust_and_os. rust_toolchain_version == needs.define-matrix.outputs.default_rust_version &&
194+ matrix.rust_and_os. os == needs.define-matrix.outputs.default_os
178195 with :
179196 github_token : ${{ secrets.GITHUB_TOKEN }}
180197 publish_dir : ./book/book/html
@@ -183,11 +200,14 @@ jobs:
183200 needs : ['define-matrix', 'refresh-cache']
184201 strategy :
185202 matrix :
186- rust_toolchain_version : ${{ fromJSON(needs.define-matrix.outputs.rust_toolchain_version) }}
203+ rust_and_os : ${{ fromJSON(needs.define-matrix.outputs.matrix).include }}
187204 ocaml_version : ${{ fromJSON(needs.define-matrix.outputs.ocaml_version) }}
188205 node : ${{ fromJSON(needs.define-matrix.outputs.node) }}
189- os : ${{ fromJSON(needs.define-matrix.outputs.os) }}
190- runs-on : ${{ matrix.os }}
206+ exclude :
207+ # Skip Rust 1.84 due to linting issues - remove when
208+ # https://github.com/o1-labs/proof-systems/pull/3245 is fixed
209+ - rust_and_os : {rust_toolchain_version: '1.84', os: 'macos-latest'}
210+ runs-on : ${{ matrix.rust_and_os.os }}
191211 steps :
192212 - name : Checkout repository
193213 uses : actions/checkout@v5
@@ -197,7 +217,7 @@ jobs:
197217 - name : Use shared Rust toolchain setting up steps
198218 uses : ./.github/actions/toolchain-shared
199219 with :
200- rust_toolchain_version : ${{ matrix.rust_toolchain_version }}
220+ rust_toolchain_version : ${{ matrix.rust_and_os. rust_toolchain_version }}
201221
202222 - name : Use shared OCaml setting up steps
203223 uses : ./.github/actions/ocaml-shared
@@ -216,11 +236,10 @@ jobs:
216236 needs : ['define-matrix', 'refresh-cache']
217237 strategy :
218238 matrix :
219- rust_toolchain_version : ${{ fromJSON(needs.define-matrix.outputs.rust_toolchain_version) }}
239+ rust_and_os : ${{ fromJSON(needs.define-matrix.outputs.matrix).include }}
220240 ocaml_version : ${{ fromJSON(needs.define-matrix.outputs.ocaml_version) }}
221241 node : ${{ fromJSON(needs.define-matrix.outputs.node) }}
222- os : ${{ fromJSON(needs.define-matrix.outputs.os) }}
223- runs-on : ${{ matrix.os }}
242+ runs-on : ${{ matrix.rust_and_os.os }}
224243 steps :
225244 - name : Checkout repository
226245 uses : actions/checkout@v5
@@ -230,7 +249,7 @@ jobs:
230249 - name : Use shared Rust toolchain setting up steps
231250 uses : ./.github/actions/toolchain-shared
232251 with :
233- rust_toolchain_version : ${{ matrix.rust_toolchain_version }}
252+ rust_toolchain_version : ${{ matrix.rust_and_os. rust_toolchain_version }}
234253
235254 - name : Use shared OCaml setting up steps
236255 uses : ./.github/actions/ocaml-shared
@@ -249,11 +268,14 @@ jobs:
249268 needs : ['define-matrix', 'refresh-cache']
250269 strategy :
251270 matrix :
252- rust_toolchain_version : ${{ fromJSON(needs.define-matrix.outputs.rust_toolchain_version) }}
271+ rust_and_os : ${{ fromJSON(needs.define-matrix.outputs.matrix).include }}
253272 ocaml_version : ${{ fromJSON(needs.define-matrix.outputs.ocaml_version) }}
254273 node : ${{ fromJSON(needs.define-matrix.outputs.node) }}
255- os : ${{ fromJSON(needs.define-matrix.outputs.os) }}
256- runs-on : ${{ matrix.os }}
274+ exclude :
275+ # Skip Rust 1.84 due to linting issues - remove when
276+ # https://github.com/o1-labs/proof-systems/pull/3245 is fixed
277+ - rust_and_os : {rust_toolchain_version: '1.84', os: 'macos-latest'}
278+ runs-on : ${{ matrix.rust_and_os.os }}
257279 steps :
258280 - name : Checkout repository
259281 uses : actions/checkout@v5
@@ -263,7 +285,7 @@ jobs:
263285 - name : Use shared Rust toolchain setting up steps
264286 uses : ./.github/actions/toolchain-shared
265287 with :
266- rust_toolchain_version : ${{ matrix.rust_toolchain_version }}
288+ rust_toolchain_version : ${{ matrix.rust_and_os. rust_toolchain_version }}
267289 components : llvm-tools-preview
268290
269291 - name : Use shared OCaml setting up steps
0 commit comments