-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (41 loc) · 1.18 KB
/
build.yml
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
name: Build cache
on:
workflow_dispatch: {}
push:
branches:
- main
paths:
- ubuntu-22.04/**
schedule:
- cron: "0 0 * * *"
jobs:
build:
runs-on: ubuntu-22.04
permissions:
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup spack
uses: spack/[email protected]
with:
ref: develop
- name: Add mochi-spack-packages
run: |
git clone https://github.com/mochi-hpc/mochi-spack-packages
spack -e ubuntu-22.04 repo add mochi-spack-packages
- name: Install spack environment
run: |
spack -e ubuntu-22.04 install
- name: Show spack-installed packages
run: |
spack -e ubuntu-22.04 find -dlv
- name: Push packages to buildcache and update index
if: ${{ !cancelled() }}
run: |
export MY_OCI_TOKEN=${{ secrets.GITHUB_TOKEN }}
spack -e ubuntu-22.04 mirror set --push \
--oci-username ${{ github.actor }} \
--oci-password-variable MY_OCI_TOKEN mochi-buildcache
spack -e ubuntu-22.04 buildcache push --base-image ubuntu:22.04 \
--unsigned --update-index mochi-buildcache