@@ -40,156 +40,6 @@ jobs:
4040 - name : Clean cargo cache
4141 run : cargo clean
4242
43- ledger-tests :
44- timeout-minutes : 20
45- runs-on : ubuntu-24.04
46- steps :
47- - name : Git checkout
48- uses : actions/checkout@v5
49-
50- - name : Setup build dependencies
51- uses : ./.github/actions/setup-build-deps
52-
53- - name : Use shared OCaml setting up steps
54- uses : ./.github/actions/setup-ocaml
55- with :
56- ocaml_version : ${{ env.OCAML_VERSION }}
57-
58- - name : Setup Rust
59- uses : ./.github/actions/setup-rust
60- with :
61- toolchain : ${{ env.RUST_NIGHTLY_VERSION }}
62- cache-prefix : ledger-${{ env.CACHE_VERSION }}
63-
64- - name : Download circuits files
65- uses : ./.github/actions/setup-circuits
66-
67- - name : Build ledger tests
68- run : make build-ledger
69-
70- - name : Run ledger tests
71- run : make test-ledger
72-
73- mina-node-native-tests :
74- timeout-minutes : 30
75- runs-on : ubuntu-24.04
76- steps :
77- - name : Git checkout
78- uses : actions/checkout@v5
79-
80- - name : Setup build dependencies
81- uses : ./.github/actions/setup-build-deps
82-
83- - name : Setup Rust
84- uses : ./.github/actions/setup-rust
85- with :
86- toolchain : ${{ env.RUST_STABLE_VERSION }}
87- cache-prefix : mina-node-native-${{ env.CACHE_VERSION }}
88-
89- - name : Test mina-node-native crate
90- run : make test-node-native
91-
92- p2p-messages-tests :
93- timeout-minutes : 20
94- runs-on : ubuntu-24.04
95- steps :
96- - name : Git checkout
97- uses : actions/checkout@v5
98-
99- - name : Setup build dependencies
100- uses : ./.github/actions/setup-build-deps
101-
102- - name : Setup Rust
103- uses : ./.github/actions/setup-rust
104- with :
105- toolchain : ${{ env.RUST_NIGHTLY_VERSION }}
106- cache-prefix : p2p-messages-${{ env.CACHE_VERSION }}
107-
108- - name : Download circuits files
109- uses : ./.github/actions/setup-circuits
110-
111- - name : Run mina-p2p-messages
112- run : make test-p2p-messages
113-
114- # TODO: add back when reimplemented
115- # ledger-32x9-tests:
116- # runs-on: ubuntu-24.04
117- # steps:
118- # - name: Git checkout
119- # uses: actions/checkout@v5
120-
121- # - name: Setup build dependencies
122- # uses: ./.github/actions/setup-build-deps
123-
124- # - name: Setup Rust
125- # uses: ./.github/actions/setup-rust
126- # with:
127- # toolchain: nightly
128- # cache-prefix: ledger-32x9-v0
129-
130- # - name: Download circuits files
131- # uses: ./.github/actions/setup-circuits
132-
133- # - name: Enable 32x9 fields implementation
134- # run: |
135- # cargo install sd
136- # sd '^mina-curves.*$' '' ./Cargo.toml
137- # sd '^ark-ff = \{ version .*$' '' ./Cargo.toml
138- # sd -F '# UNCOMMENTED_IN_CI ' '' ./Cargo.toml
139- # cat ./Cargo.toml
140-
141- # - name: Build ledger tests
142- # run: make build-ledger
143-
144- # - name: Run ledger tests
145- # run: make test-ledger
146-
147- vrf-tests :
148- timeout-minutes : 20
149- runs-on : ubuntu-24.04
150- steps :
151- - name : Git checkout
152- uses : actions/checkout@v5
153-
154- - name : Setup build dependencies
155- uses : ./.github/actions/setup-build-deps
156-
157- - name : Use shared OCaml setting up steps
158- uses : ./.github/actions/setup-ocaml
159- with :
160- ocaml_version : ${{ env.OCAML_VERSION }}
161-
162- - name : Setup Rust
163- uses : ./.github/actions/setup-rust
164- with :
165- toolchain : ${{ env.RUST_NIGHTLY_VERSION }}
166- cache-prefix : vrf-${{ env.CACHE_VERSION }}
167-
168- - name : Build vrf tests
169- run : make build-vrf
170-
171- - name : Run vrf tests
172- run : make test-vrf
173-
174- p2p-tests :
175- timeout-minutes : 15
176- runs-on : ubuntu-24.04
177- steps :
178- - name : Git checkout
179- uses : actions/checkout@v5
180-
181- - name : Setup build dependencies
182- uses : ./.github/actions/setup-build-deps
183-
184- - name : Setup Rust
185- uses : ./.github/actions/setup-rust
186- with :
187- toolchain : ${{ env.RUST_STABLE_VERSION }}
188- cache-prefix : p2p-${{ env.CACHE_VERSION }}
189-
190- - name : Test p2p crate
191- run : make test-p2p
192-
19343 # Fast builds specifically for test artifacts - no cross-platform matrix
19444 build :
19545 timeout-minutes : 60
@@ -239,24 +89,56 @@ jobs:
23989 path : target/release/mina
24090 retention-days : 7
24191
242- account-tests :
243- timeout-minutes : 20
92+ # Generate matrix of all packages to test
93+ generate-test-matrix :
94+ runs-on : ubuntu-24.04
95+ outputs :
96+ matrix : ${{ steps.set-matrix.outputs.matrix }}
97+ steps :
98+ - name : Git checkout
99+ uses : actions/checkout@v5
100+
101+ - name : Generate test matrix
102+ id : set-matrix
103+ run : |
104+ MATRIX=$(./.github/scripts/list-test-packages.sh)
105+ echo "matrix=$MATRIX" >> $GITHUB_OUTPUT
106+ echo "Generated matrix:"
107+ echo "$MATRIX" | jq .
108+
109+ # Test all packages in parallel
110+ package-tests :
111+ needs : generate-test-matrix
112+ timeout-minutes : 30
244113 runs-on : ubuntu-24.04
114+ strategy :
115+ fail-fast : false
116+ matrix : ${{ fromJson(needs.generate-test-matrix.outputs.matrix) }}
117+ name : unit-integration-tests-${{ matrix.package }}
245118 steps :
246119 - name : Git checkout
247120 uses : actions/checkout@v5
248121
249122 - name : Setup build dependencies
250123 uses : ./.github/actions/setup-build-deps
251124
125+ - name : Setup OCaml (if needed)
126+ if : matrix.package == 'mina-tree' || matrix.package == 'vrf'
127+ uses : ./.github/actions/setup-ocaml
128+ with :
129+ ocaml_version : ${{ env.OCAML_VERSION }}
130+
131+ - name : Setup circuits
132+ uses : ./.github/actions/setup-circuits
133+
252134 - name : Setup Rust
253135 uses : ./.github/actions/setup-rust
254136 with :
255- toolchain : ${{ env.RUST_STABLE_VERSION }}
256- cache-prefix : build -${{ env.CACHE_VERSION }}
137+ toolchain : ${{ matrix.toolchain == 'nightly' && env.RUST_NIGHTLY_VERSION || env.RUST_STABLE_VERSION }}
138+ cache-prefix : test-${{ matrix.package }} -${{ env.CACHE_VERSION }}
257139
258- - name : Run account tests
259- run : make test-account
140+ - name : Test package
141+ run : make test-package PACKAGE=${{ matrix.package }} ALL_FEATURES=${{ matrix.all_features }}
260142
261143 wallet-tests :
262144 needs : [build]
0 commit comments