Spack buildcache build #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Spack buildcache build | |
on: | |
workflow_dispatch: | |
workflow_call: | |
push: | |
branches: | |
- main | |
env: | |
SPACK_BACKTRACE: please | |
SPACK_REF: ee1fa3e50c1d9dce481572a69fb255f8ca3cee6b | |
jobs: | |
rebuild: | |
runs-on: ubuntu-22.04 | |
permissions: | |
packages: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | |
- name: Setup Spack | |
uses: spack/setup-spack@5ab3c91bdefffffad9a7e45d1d156146afebb3a7 | |
with: | |
ref: ${{env.SPACK_REF}} | |
buildcache: true | |
color: true | |
- name: Find compilers | |
run: spack -e . compiler find --mixed-toolchain | |
- name: Set buildcache | |
run: | | |
spack mirror add --unsigned old-buildcache oci://ghcr.io/sethrj/spack-buildcache | |
spack mirror add --unsigned celer-buildcache oci://ghcr.io/spack/celer-buildcache | |
- name: Concretize | |
run: spack -e . -v concretize | |
- name: Install | |
run: | | |
spack -e . env depfile -o Makefile | |
make -Orecurse -j $(($(nproc) + 1)) SPACK_INSTALL_FLAGS=--no-check-signature | |
- name: Push packages and update index | |
run: | | |
spack mirror set --push --oci-username ${{ github.actor }} --oci-password "${{ secrets.GITHUB_TOKEN }}" celer-buildcache | |
spack -e . buildcache push -j $(($(nproc) + 1)) --base-image ubuntu:22.04 --update-index celer-buildcache | |
if: ${{ !cancelled() }} |