-
Notifications
You must be signed in to change notification settings - Fork 3
53 lines (43 loc) · 1.31 KB
/
build.yaml
File metadata and controls
53 lines (43 loc) · 1.31 KB
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
52
53
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-22.04
permissions:
packages: write
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup Spack
uses: spack/setup-spack@v3
- name: Find compilers
run: spack -e . compiler find
- name: Show packages config
run: spack -e . config get packages
- name: Concretize (fresh)
run: spack -e . -v concretize --fresh
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 -e . buildcache push -j $(($(nproc) + 1)) --base-image ubuntu:22.04 --update-index github-actions-buildcache
if: ${{ !cancelled() }}