mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2026-06-17 09:17:05 +00:00
ci: cache gcc as a buildcache node instead of committed lockfiles
Committed lockfiles pinned gcc as a host-path external (from spack compiler find), which is not portable across runners and broke CI. Cache the gcc compiler itself as a buildcache node instead, so CI pulls it (~1 min) rather than building it from source (~1 h). - push the freshly-built gcc node in setup-deps BEFORE spack compiler find (which marks it external and excludes it from buildcache push), gated behind a push-gcc input used only by the buildcache workflow - drop the committed-lockfile approach: remove test/ci/locks, the lockfile install path in setup-deps, and the lockfile export in the buildcache workflow - drop the ignored ref input from setup-spack (v3 renamed it to spack_ref)
This commit is contained in:
committed by
Dennis Klein
parent
bb5c0a998c
commit
f374e228ff
18
.github/workflows/buildcache.yml
vendored
18
.github/workflows/buildcache.yml
vendored
@@ -40,6 +40,8 @@ jobs:
|
||||
gcc: ${{ matrix.gcc }}
|
||||
env: ${{ matrix.env }}
|
||||
fresh: 'true'
|
||||
push-gcc: 'true'
|
||||
push-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Push to buildcache
|
||||
if: ${{ !cancelled() }}
|
||||
@@ -50,21 +52,6 @@ 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
|
||||
@@ -79,7 +66,6 @@ jobs:
|
||||
- name: Setup spack
|
||||
uses: spack/setup-spack@v3
|
||||
with:
|
||||
ref: v1.1.0
|
||||
color: true
|
||||
|
||||
- name: Update buildcache index
|
||||
|
||||
Reference in New Issue
Block a user