-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (42 loc) · 1.26 KB
/
build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Spack buildcache build
on:
push:
branches:
- main
pull_request:
env:
SPACK_COLOR: always
SPACK_BACKTRACE: please
REGISTRY: ghcr.io
IMAGE_NAME: ukri-excalibur/github-actions-buildcache
jobs:
rebuild:
timeout-minutes: 360
runs-on: ubuntu-22.04
permissions:
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Spack
run: |
git clone --depth=1 https://github.com/spack/spack.git
echo "${PWD}/spack/bin/" >> "${GITHUB_PATH}"
- name: Spack version
run: spack debug report
- name: Set authentication method for mirror
if: ${{ github.event_name == 'push' }}
run: |
spack -e . mirror set --oci-username ${{ github.actor }} --oci-password "${{ secrets.GITHUB_TOKEN }}" excalibur-buildcache
- name: Concretize
run: spack -e . concretize
- name: Install
timeout-minutes: 350
run: |
spack -e . env depfile -o Makefile
make -Orecurse -j $(($(nproc) + 1)) SPACK_INSTALL_FLAGS=--no-check-signature
- name: Push packages and update index
timeout-minutes: 10
run: |
spack -e . buildcache push -j $(($(nproc) + 1)) --unsigned --update-index excalibur-buildcache
if: always()