Skip to content

Commit eeafd68

Browse files
Copilotdannywillems
andcommitted
Add CHANGELOG entry and CI optimization guidelines to CLAUDE.md
- Add CHANGELOG entry for CI optimization that speeds up test execution - Add CI optimization guidelines to CLAUDE.md with build dependency patterns - Follow established documentation patterns and formatting requirements Co-authored-by: dannywillems <6018454+dannywillems@users.noreply.github.com>
1 parent f28423f commit eeafd68

File tree

2 files changed

+44
-0
lines changed

2 files changed

+44
-0
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
### Changed
1111

12+
- **CI**: Speed up CI by decoupling test runs from full build completion.
13+
Created dedicated single-platform build jobs that run only on ubuntu-22.04
14+
to produce artifacts needed for testing, allowing tests to start as soon as
15+
those builds complete instead of waiting for all cross-platform matrix builds
16+
([#1427](https://github.com/o1-labs/mina-rust/issues/1427))
1217
- **CI**: Update CI to test on specific macOS versions (13, 14, 15) instead of
1318
only macos-latest, providing better coverage across macOS versions that
1419
developers are using ([#1421](https://github.com/o1-labs/mina-rust/pull/1421))

CLAUDE.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,45 @@ Example entry:
346346
ubuntu-latest ([#1249](https://github.com/o1-labs/openmina/pull/1249))
347347
```
348348

349+
### CI Optimization Guidelines
350+
351+
When modifying CI workflows, especially for performance improvements:
352+
353+
#### Build Job Dependencies
354+
355+
- **Separate "builds for tests" from "builds for verification"**: Create
356+
dedicated single-platform build jobs that produce only the artifacts needed
357+
for testing. This allows tests to start as soon as required artifacts are
358+
available, not waiting for all cross-platform builds to complete.
359+
360+
- **Use selective dependencies**: Instead of depending on matrix build jobs
361+
(which include all platforms), create specific build jobs that tests can
362+
depend on. For example:
363+
364+
```yaml
365+
# Before: Tests wait for all platforms
366+
needs: [build, build-tests] # Matrix across 7 platforms
367+
368+
# After: Tests wait for specific artifact-producing builds
369+
needs: [build-for-tests, build-tests-for-tests] # Single platform
370+
```
371+
372+
- **Maintain cross-platform coverage**: Keep matrix builds for platform
373+
verification but don't let them block test execution. They should run in
374+
parallel for verification purposes.
375+
376+
- **Artifact consistency**: Ensure dedicated build jobs produce the same
377+
artifact names that test jobs expect. Use patterns like
378+
`bin-${{ github.sha }}` and `tests-${{ github.sha }}` consistently.
379+
380+
#### Performance Considerations
381+
382+
- Tests typically only need artifacts from ubuntu-22.04 builds (for container
383+
compatibility)
384+
- macOS builds often take longest and shouldn't block Linux-based test execution
385+
- Use ubuntu-22.04 for artifact production to ensure GLIBC compatibility with
386+
Debian-based test containers
387+
349388
### Critical Pre-Commit Requirements
350389

351390
- **MANDATORY**: Run `make fix-trailing-whitespace` before every commit

0 commit comments

Comments
 (0)