ci: add named spack environments with boost187 variant

This commit is contained in:
Dennis Klein
2025-11-30 19:58:19 +01:00
parent ef98c9c7ec
commit d1fbe4e89a
4 changed files with 34 additions and 6 deletions

View File

@@ -5,6 +5,9 @@ inputs:
gcc: gcc:
description: 'GCC version to use' description: 'GCC version to use'
required: true required: true
env:
description: 'Spack environment name (latest, boost187)'
default: 'latest'
fresh: fresh:
description: 'Use fresh concretization' description: 'Use fresh concretization'
default: 'false' default: 'false'
@@ -28,7 +31,7 @@ runs:
- name: Install dependencies - name: Install dependencies
shell: spack-bash {0} shell: spack-bash {0}
run: | run: |
spack env create fairmq test/ci/spack.yaml spack env create fairmq test/ci/spack-${{ inputs.env }}.yaml
spack -e fairmq add gcc@${{ inputs.gcc }} spack -e fairmq add gcc@${{ inputs.gcc }}
spack -e fairmq config add "packages:all:require:'%gcc@${{ inputs.gcc }}'" spack -e fairmq config add "packages:all:require:'%gcc@${{ inputs.gcc }}'"
spack -e fairmq install --fail-fast ${{ inputs.fresh == 'true' && '--fresh' || '' }} spack -e fairmq install --fail-fast ${{ inputs.fresh == 'true' && '--fresh' || '' }}

View File

@@ -6,7 +6,7 @@ on:
- cron: '0 3 * * 0' # Weekly on Sunday at 3am UTC - cron: '0 3 * * 0' # Weekly on Sunday at 3am UTC
push: push:
paths: paths:
- 'test/ci/spack.yaml' - 'test/ci/spack-*.yaml'
- '.github/workflows/buildcache.yml' - '.github/workflows/buildcache.yml'
concurrency: concurrency:
@@ -16,7 +16,7 @@ concurrency:
jobs: jobs:
build: build:
if: github.repository == 'FairRootGroup/FairMQ' if: github.repository == 'FairRootGroup/FairMQ'
name: gcc-${{ matrix.gcc }} name: ${{ matrix.env }}-gcc-${{ matrix.gcc }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions: permissions:
packages: write packages: write
@@ -24,6 +24,10 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
gcc: ['12', '13', '14', '15'] gcc: ['12', '13', '14', '15']
env: ['latest']
include:
- gcc: '15'
env: 'boost187'
env: env:
GITHUB_USER: ${{ github.actor }} GITHUB_USER: ${{ github.actor }}
@@ -42,7 +46,7 @@ jobs:
- name: Create environment and login to OCI registry - name: Create environment and login to OCI registry
shell: spack-bash {0} shell: spack-bash {0}
run: | run: |
spack env create fairmq test/ci/spack.yaml spack env create fairmq test/ci/spack-${{ matrix.env }}.yaml
spack -e fairmq mirror set --oci-username ${{ github.actor }} --oci-password-variable GITHUB_TOKEN ghcr-buildcache spack -e fairmq mirror set --oci-username ${{ github.actor }} --oci-password-variable GITHUB_TOKEN ghcr-buildcache
- name: Find system compiler - name: Find system compiler
@@ -87,6 +91,6 @@ jobs:
- name: Update buildcache index - name: Update buildcache index
shell: spack-bash {0} shell: spack-bash {0}
run: | run: |
spack env create fairmq test/ci/spack.yaml 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 mirror set --oci-username ${{ github.actor }} --oci-password-variable GITHUB_TOKEN ghcr-buildcache
spack -e fairmq buildcache update-index ghcr-buildcache spack -e fairmq buildcache update-index ghcr-buildcache

View File

@@ -1,6 +1,10 @@
spack: spack:
specs: specs:
- zlib-ng - "fairlogger@2.2.0 ^fmt@:11"
- "boost@1.87 +container +program_options +filesystem +date_time +regex"
- "libzmq@4.1.4:"
- ninja
- "cmake@3.15:"
config: config:
install_tree: install_tree:

17
test/ci/spack-latest.yaml Normal file
View File

@@ -0,0 +1,17 @@
spack:
specs:
- "fairlogger@2.2.0 ^fmt@:11"
- "boost@1.66: +container +program_options +filesystem +date_time +regex"
- "libzmq@4.1.4:"
- ninja
- "cmake@3.15:"
config:
install_tree:
root: /opt/spack
padded_length: 128
mirrors:
ghcr-buildcache:
url: oci://ghcr.io/fairrootgroup/fairmq-spack-buildcache
signed: false