-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (46 loc) · 1.56 KB
/
Copy pathci.yml
File metadata and controls
55 lines (46 loc) · 1.56 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: build spack buildcache
on:
push:
branches:
- main
workflow_dispatch:
inputs:
name:
type: boolean
description: Create a fresh buildcache
default: false
jobs:
buildcache-linux-x86:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-24.04 ]
stack: [ gysela ]
runs-on: ${{matrix.os}}
permissions:
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Spack
uses: spack/setup-spack@v3
with:
spack_ref: releases/v1.2 # Spack version (examples: develop, releases/v0.23)
packages_ref: develop
buildcache: true # Configure oci://ghcr.io/spack/github-actions-buildcache
- name: Spack compilers
run: spack compiler find
- name: Concretize (fresh)
run: spack -e ${{matrix.stack}} -v concretize --fresh
if: ${{ github.event.inputs.name == 'true' }}
- name: Concretize (reuse)
run: spack -e ${{matrix.stack}} -v concretize
if: ${{ github.event.inputs.name == 'false' || github.event_name != 'workflow_dispatch' }}
- name: Install
run: spack -e ${{matrix.stack}} install -j $(($(nproc) + 1))
- name: Push packages and update index
env:
GITHUB_USER: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: spack -e ${{matrix.stack}} buildcache push --j $(($(nproc) + 1)) --base-image ubuntu:22.04 --update-index numpex-buildcache
if: ${{ !cancelled() }}