Skip to content

Build cache

Build cache #18

Workflow file for this run

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: |
spack -e ubuntu-22.04 mirror set --push \
--oci-username ${{ github.actor }} \
--oci-password "${{ secrets.GITHUB_TOKEN }}" mochi-buildcache
spack -e ubuntu-22.04 buildcache push --base-image ubuntu:22.04 \
--unsigned --update-index mochi-buildcache