mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2026-06-15 08:17:05 +00:00
- buildcache push expands its selection into the full dependency closure, build-time dependencies included; specs that were satisfied from the buildcache do not have those installed locally, and the push fails with PackageNotInstalledError - both push sites (the early gcc node push and the env-level push) only ever ran in fresh-build scenarios before, so the failure surfaced once the cache was warm - pass --allow-missing to skip what is not installed (a best-effort push of everything that is); a freshly built gcc thus still uploads its build-time dependencies, which a future gcc rebuild can then pull as binaries
80 lines
2.3 KiB
YAML
80 lines
2.3 KiB
YAML
name: Spack Buildcache
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
- cron: '0 3 * * 0' # Weekly on Sunday at 3am UTC
|
|
push:
|
|
branches: [dev, master]
|
|
paths:
|
|
- 'test/ci/spack-*.yaml'
|
|
- '.github/workflows/buildcache.yml'
|
|
- '.github/actions/setup-deps/**'
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build:
|
|
if: github.repository == 'FairRootGroup/FairMQ'
|
|
name: ${{ matrix.env }}-gcc-${{ matrix.gcc }}
|
|
runs-on: ubuntu-24.04
|
|
permissions:
|
|
packages: write
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
gcc: ['12', '13', '14', '15']
|
|
env: ['latest']
|
|
include:
|
|
- gcc: '15'
|
|
env: 'boost187'
|
|
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- name: Setup spack environment
|
|
uses: ./.github/actions/setup-deps
|
|
with:
|
|
gcc: ${{ matrix.gcc }}
|
|
env: ${{ matrix.env }}
|
|
fresh: 'true'
|
|
push-gcc: 'true'
|
|
push-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Push to buildcache
|
|
if: ${{ !cancelled() }}
|
|
shell: spack-bash {0}
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: |
|
|
spack -e fairmq mirror set --oci-username ${{ github.actor }} --oci-password-variable GITHUB_TOKEN ghcr-buildcache
|
|
# --allow-missing: build-time dependencies of specs that were
|
|
# satisfied from the buildcache are not installed locally and
|
|
# would otherwise fail the whole push.
|
|
spack -e fairmq buildcache push --unsigned --allow-missing ghcr-buildcache
|
|
|
|
update-index:
|
|
if: github.repository == 'FairRootGroup/FairMQ' && !cancelled()
|
|
needs: build
|
|
runs-on: ubuntu-24.04
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
permissions:
|
|
packages: write
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- name: Setup spack
|
|
uses: spack/setup-spack@v3
|
|
with:
|
|
color: true
|
|
|
|
- name: Update buildcache index
|
|
shell: spack-bash {0}
|
|
run: |
|
|
spack env create fairmq test/ci/spack-latest.yaml
|
|
spack -e fairmq mirror set --oci-username ${{ github.actor }} --oci-password-variable GITHUB_TOKEN ghcr-buildcache
|
|
spack -e fairmq buildcache update-index ghcr-buildcache
|