Skip to content

ci: make CI builds fast by closing dependency-cache gaps#547

Merged
dennisklein merged 4 commits into
FairRootGroup:devfrom
dennisklein:fix-ci-caching
May 31, 2026
Merged

ci: make CI builds fast by closing dependency-cache gaps#547
dennisklein merged 4 commits into
FairRootGroup:devfrom
dennisklein:fix-ci-caching

Conversation

@dennisklein
Copy link
Copy Markdown
Member

  • register the FairMQ buildcache mirror globally before Install GCC so the compiler is pulled as a binary instead of built from source; pin runners to ubuntu-24.04; bump setup-spack v2→v3
  • restrict the buildcache push trigger to branches: [dev, master]
  • add ccache (hendrikmuhs/ccache-action) to build/sanitizers/static-analysis, keyed per (job, env, gcc)
  • install deps from test/ci/locks/<env>-gcc<N>.lock when present, falling back to the spec yaml; buildcache exports each spack.lock as an artifact

gcc was built from source (~58 min/job) because the FairMQ buildcache mirror
is only configured inside the env yaml, while gcc is installed before the env
is created.

- register the mirror globally after spack setup so "Install GCC" pulls the
  compiler as a binary
- pin runners to ubuntu-24.04 so the weekly buildcache and weekday CI share an
  image and concretize to matching hashes
- bump setup-spack to v3 to match the update-index job
The push trigger had a path filter but no branch filter, so any PR-branch push
touching those paths (e.g. a dependabot rebase pulling in setup-deps changes)
launched the full fresh buildcache matrix concurrently with CI.

- restrict the push trigger to branches [dev, master]
- frees runners for CI; the cache still refreshes via cron and on dev/master
FairMQ's own sources (library, examples, tests) were recompiled from scratch
in every matrix job on every push.

- add hendrikmuhs/ccache-action to build, sanitizers and static-analysis jobs
- set CMAKE_C/CXX_COMPILER_LAUNCHER=ccache so cmake routes through it
- key the cache per (job, env, gcc) since ccache hashes the compiler
Reusing concretization between the weekly buildcache (fresh) and weekday CI
(reuse) can drift if runner externals change, causing avoidable cache misses.

- setup-deps installs from test/ci/locks/<env>-gcc<N>.lock when it exists,
  skipping concretization for byte-identical hashes; falls back to the spec
  yaml otherwise
- buildcache exports each env's spack.lock as a downloadable artifact so the
  lockfiles can be regenerated on the ubuntu-24.04 runner and committed
- document the manual regeneration flow in test/ci/locks/README.md
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 31, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a6476df0-23d5-420e-b031-eebe3a510dc1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@dennisklein dennisklein merged commit bb5c0a9 into FairRootGroup:dev May 31, 2026
1 of 9 checks passed
@dennisklein dennisklein deleted the fix-ci-caching branch May 31, 2026 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant