Skip to content

Spack buildcache build #86

Spack buildcache build

Spack buildcache build #86

Workflow file for this run

name: Spack buildcache build
on:
push:
branches:
- main
workflow_dispatch:
inputs:
name:
type: boolean
description: Create a fresh buildcache
default: false
env:
SPACK_BACKTRACE: please
jobs:
rebuild:
runs-on: ubuntu-20.04
permissions:
packages: write
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- name: Setup Spack
uses: spack/setup-spack@5ab3c91bdefffffad9a7e45d1d156146afebb3a7
- name: Find compilers
run: spack -e . compiler find --mixed-toolchain
- name: Concretize (fresh)
run: spack -e . -v concretize
if: ${{ github.event.inputs.name == 'true' }}
- name: Concretize (reuse)
run: spack -e . -v concretize
if: ${{ github.event.inputs.name == 'false' || github.event_name != 'workflow_dispatch' }}
- name: Install
run: |
spack -e . env depfile -o Makefile
make -Orecurse -j $(($(nproc) + 1))
- name: Push packages and update index
env:
GITHUB_USER: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
spack mirror set --push --oci-username-variable GITHUB_USER --oci-password-variable GITHUB_TOKEN github-actions-buildcache
spack -e . buildcache push -j $(($(nproc) + 1)) --base-image ubuntu:20.04 --update-index github-actions-buildcache
if: ${{ !cancelled() }}