ci: install deps from committed lockfiles when present

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
This commit is contained in:
Dennis Klein
2026-05-31 21:08:42 +02:00
committed by Dennis Klein
parent ffc9c60f73
commit bb5c0a998c
3 changed files with 70 additions and 0 deletions

View File

@@ -50,6 +50,21 @@ jobs:
spack -e fairmq mirror set --oci-username ${{ github.actor }} --oci-password-variable GITHUB_TOKEN ghcr-buildcache
spack -e fairmq buildcache push --unsigned ghcr-buildcache
- name: Export lockfile
if: ${{ !cancelled() }}
shell: spack-bash {0}
run: |
mkdir -p test/ci/locks
cp "$(spack location -e fairmq)/spack.lock" \
"test/ci/locks/${{ matrix.env }}-gcc${{ matrix.gcc }}.lock"
- name: Upload lockfile
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v4
with:
name: lock-${{ matrix.env }}-gcc${{ matrix.gcc }}
path: test/ci/locks/${{ matrix.env }}-gcc${{ matrix.gcc }}.lock
update-index:
if: github.repository == 'FairRootGroup/FairMQ' && !cancelled()
needs: build