Skip to content

Simplify gha

Simplify gha #25

Workflow file for this run

name: Spack buildcache build

Check failure on line 1 in .github/workflows/build.yaml

View workflow run for this annotation

GitHub Actions / Spack buildcache build

Invalid workflow file

The workflow is not valid. .github/workflows/build.yaml: Unexpected tag '!cancelled()'
on:
push:
branches:
- main
pull_request:
jobs:
rebuild:
timeout-minutes: 180
runs-on: ubuntu-22.04
permissions:
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Spack
uses: spack/setup-spack@v2
- name: Spack version
run: spack debug report
- name: Set authentication method for mirror
if: ${{ github.event_name == 'push' }}
run: spack -e . mirror set --push --oci-username ${{ github.actor }} --oci-password "${{ secrets.GITHUB_TOKEN }}" local-buildcache
- name: Concretize
run: spack -e . concretize
- name: Install
timeout-minutes: 150
run: |
spack -e . env depfile -o Makefile
make -Orecurse -j $(($(nproc) + 1))
- name: Push packages and update index
run: |
spack -e . buildcache push -j $(($(nproc) + 1)) --base-image ubuntu:22.04 --update-index local-buildcache
if: !cancelled()