@@ -174,7 +174,119 @@ jobs:
174174 - name : Test p2p crate
175175 run : make test-p2p
176176
177+ # Fast builds specifically for test artifacts - no cross-platform matrix
178+ build-for-tests :
179+ timeout-minutes : 60
180+ runs-on : ubuntu-22.04
181+ steps :
182+ - name : Git checkout
183+ uses : actions/checkout@v5
184+
185+ - name : Setup build dependencies
186+ uses : ./.github/actions/setup-build-deps
187+
188+ - name : Use shared OCaml setting up steps
189+ uses : ./.github/actions/setup-ocaml
190+ with :
191+ ocaml_version : 4.14.2
192+
193+ - name : Setup Rust
194+ uses : ./.github/actions/setup-rust
195+ with :
196+ toolchain : 1.84
197+ cache-prefix : build-for-tests-v0
198+
199+ - name : Release build
200+ run : make build-release
201+
202+ - name : Verify build-info command
203+ run : |
204+ echo "Testing build-info command..."
205+ ./target/release/mina build-info
206+
207+ # Verify required fields are present
208+ ./target/release/mina build-info | grep -E "Version:|Build time:|Commit SHA:|Commit branch:|Rustc version:"
209+
210+ # Verify version format (should be a short commit hash)
211+ VERSION=$(./target/release/mina build-info | grep "Version:" | awk '{print $2}')
212+ if [[ ! "$VERSION" =~ ^[0-9a-f]{7}$ ]]; then
213+ echo "Error: Version should be a 7-character commit hash, got: $VERSION"
214+ exit 1
215+ fi
216+
217+ echo "Build info verification passed!"
218+
219+ - name : Upload binaries
220+ uses : actions/upload-artifact@v4
221+ with :
222+ name : bin-${{ github.sha }}
223+ path : target/release/mina
224+ retention-days : 7
225+
226+ build-tests-for-tests :
227+ timeout-minutes : 60
228+ runs-on : ubuntu-22.04
229+ steps :
230+ - name : Git checkout
231+ uses : actions/checkout@v5
232+
233+ - name : Setup build dependencies
234+ uses : ./.github/actions/setup-build-deps
235+
236+ - name : Use shared OCaml setting up steps
237+ uses : ./.github/actions/setup-ocaml
238+ with :
239+ ocaml_version : 4.14.2
240+
241+ - name : Setup Rust
242+ uses : ./.github/actions/setup-rust
243+ with :
244+ toolchain : 1.84
245+ cache-prefix : build-tests-for-tests-v0
246+
247+ - name : Build tests
248+ run : make build-tests
249+
250+ - name : Upload tests
251+ uses : actions/upload-artifact@v4
252+ with :
253+ name : tests-${{ github.sha }}
254+ path : target/release/tests
255+ retention-days : 7
256+
257+ build-tests-webrtc-for-tests :
258+ timeout-minutes : 60
259+ runs-on : ubuntu-22.04
260+ steps :
261+ - name : Git checkout
262+ uses : actions/checkout@v5
263+
264+ - name : Setup build dependencies
265+ uses : ./.github/actions/setup-build-deps
266+
267+ - name : Use shared OCaml setting up steps
268+ uses : ./.github/actions/setup-ocaml
269+ with :
270+ ocaml_version : 4.14.2
271+
272+ - name : Setup Rust
273+ uses : ./.github/actions/setup-rust
274+ with :
275+ toolchain : 1.84
276+ cache-prefix : build-tests-webrtc-for-tests-v0
277+
278+ - name : Build tests
279+ run : make build-tests-webrtc
280+
281+ - name : Upload tests
282+ uses : actions/upload-artifact@v4
283+ with :
284+ name : tests-webrtc-${{ github.sha }}
285+ path : target/release/tests
286+ retention-days : 7
287+
177288 build :
289+ if : github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/main'
178290 timeout-minutes : 60
179291 # NOTE: If you add or remove platforms from this matrix, make sure to update
180292 # the documentation at website/docs/developers/getting-started.mdx
@@ -222,15 +334,8 @@ jobs:
222334
223335 echo "Build info verification passed!"
224336
225- - name : Upload binaries
226- if : matrix.os == 'ubuntu-22.04'
227- uses : actions/upload-artifact@v4
228- with :
229- name : bin-${{ github.sha }}
230- path : target/release/mina
231- retention-days : 7
232-
233337 build-wasm :
338+ if : github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/main'
234339 timeout-minutes : 60
235340 # NOTE: If you add or remove platforms from this matrix, make sure to update
236341 # the documentation at website/docs/developers/getting-started.mdx
@@ -263,6 +368,7 @@ jobs:
263368 RUSTFLAGS : " "
264369
265370 build-tests :
371+ if : github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/main'
266372 timeout-minutes : 60
267373 # NOTE: If you add or remove platforms from this matrix, make sure to update
268374 # the documentation at website/docs/developers/getting-started.mdx
@@ -293,15 +399,8 @@ jobs:
293399 - name : Build tests
294400 run : make build-tests
295401
296- - name : Upload tests
297- if : matrix.os == 'ubuntu-22.04'
298- uses : actions/upload-artifact@v4
299- with :
300- name : tests-${{ github.sha }}
301- path : target/release/tests
302- retention-days : 7
303-
304402 build-tests-webrtc :
403+ if : github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/main'
305404 timeout-minutes : 60
306405 # NOTE: If you add or remove platforms from this matrix, make sure to update
307406 # the documentation at website/docs/developers/getting-started.mdx
@@ -332,16 +431,8 @@ jobs:
332431 - name : Build tests
333432 run : make build-tests-webrtc
334433
335- - name : Upload tests
336- if : matrix.os == 'ubuntu-22.04'
337- uses : actions/upload-artifact@v4
338- with :
339- name : tests-webrtc-${{ github.sha }}
340- path : target/release/tests
341- retention-days : 7
342-
343434 p2p-scenario-tests :
344- needs : [build-tests, build-tests-webrtc]
435+ needs : [build-tests-for-tests , build-tests-webrtc-for-tests ]
345436 runs-on : ubuntu-24.04
346437 timeout-minutes : 20
347438 container :
@@ -412,8 +503,8 @@ jobs:
412503 scenario-tests :
413504 timeout-minutes : 60
414505 needs :
415- - build-tests
416- - build-tests-webrtc
506+ - build-tests-for-tests
507+ - build-tests-webrtc-for-tests
417508 runs-on : ubuntu-24.04
418509 container :
419510 image : gcr.io/o1labs-192920/mina-daemon:3.2.0-beta2-939b08d-noble-devnet
@@ -499,8 +590,8 @@ jobs:
499590 record-replay-tests :
500591 timeout-minutes : 30
501592 needs :
502- - build-tests
503- - build-tests-webrtc
593+ - build-tests-for-tests
594+ - build-tests-webrtc-for-tests
504595 runs-on : ubuntu-24.04
505596 container :
506597 image : gcr.io/o1labs-192920/mina-daemon:3.2.0-beta2-939b08d-noble-devnet
@@ -536,7 +627,7 @@ jobs:
536627
537628 bootstrap-test :
538629 timeout-minutes : 10
539- needs : [build, build-tests]
630+ needs : [build-for-tests , build-tests-for -tests]
540631 runs-on : ubuntu-24.04
541632 env :
542633 MINA_HOME : data
0 commit comments