diff --git a/.github/actions/setup-deps/action.yml b/.github/actions/setup-deps/action.yml index 81b94054..2a78282d 100644 --- a/.github/actions/setup-deps/action.yml +++ b/.github/actions/setup-deps/action.yml @@ -56,8 +56,11 @@ runs: # Push the gcc node now, BEFORE `spack compiler find` registers it as an # external -- externals are excluded from `buildcache push`. This is what # lets CI pull gcc from the cache (~1 min) instead of building it (~1 h). + # --allow-missing: when gcc itself was pulled from the cache, its + # build-time dependencies are not installed locally and would + # otherwise fail the push. spack mirror set --oci-username ${{ github.actor }} --oci-password-variable GITHUB_TOKEN ghcr-buildcache - spack buildcache push --unsigned ghcr-buildcache /$gcc_hash + spack buildcache push --unsigned --allow-missing ghcr-buildcache /$gcc_hash fi spack compiler find "$(spack location -i /$gcc_hash)" echo "::endgroup::" diff --git a/.github/workflows/buildcache.yml b/.github/workflows/buildcache.yml index 955eafd5..ab7179e6 100644 --- a/.github/workflows/buildcache.yml +++ b/.github/workflows/buildcache.yml @@ -50,7 +50,10 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | spack -e fairmq mirror set --oci-username ${{ github.actor }} --oci-password-variable GITHUB_TOKEN ghcr-buildcache - spack -e fairmq buildcache push --unsigned ghcr-buildcache + # --allow-missing: build-time dependencies of specs that were + # satisfied from the buildcache are not installed locally and + # would otherwise fail the whole push. + spack -e fairmq buildcache push --unsigned --allow-missing ghcr-buildcache update-index: if: github.repository == 'FairRootGroup/FairMQ' && !cancelled()