From d1fbe4e89a62295ea5c59465d4f8d9dc088116ee Mon Sep 17 00:00:00 2001 From: Dennis Klein Date: Sun, 30 Nov 2025 19:58:19 +0100 Subject: [PATCH] ci: add named spack environments with boost187 variant --- .github/actions/setup-deps/action.yml | 5 ++++- .github/workflows/buildcache.yml | 12 ++++++++---- test/ci/{spack.yaml => spack-boost187.yaml} | 6 +++++- test/ci/spack-latest.yaml | 17 +++++++++++++++++ 4 files changed, 34 insertions(+), 6 deletions(-) rename test/ci/{spack.yaml => spack-boost187.yaml} (55%) create mode 100644 test/ci/spack-latest.yaml diff --git a/.github/actions/setup-deps/action.yml b/.github/actions/setup-deps/action.yml index 02162ee1..b81ccb77 100644 --- a/.github/actions/setup-deps/action.yml +++ b/.github/actions/setup-deps/action.yml @@ -5,6 +5,9 @@ inputs: gcc: description: 'GCC version to use' required: true + env: + description: 'Spack environment name (latest, boost187)' + default: 'latest' fresh: description: 'Use fresh concretization' default: 'false' @@ -28,7 +31,7 @@ runs: - name: Install dependencies shell: spack-bash {0} 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 config add "packages:all:require:'%gcc@${{ inputs.gcc }}'" spack -e fairmq install --fail-fast ${{ inputs.fresh == 'true' && '--fresh' || '' }} diff --git a/.github/workflows/buildcache.yml b/.github/workflows/buildcache.yml index bd238b5e..4a9f68e2 100644 --- a/.github/workflows/buildcache.yml +++ b/.github/workflows/buildcache.yml @@ -6,7 +6,7 @@ on: - cron: '0 3 * * 0' # Weekly on Sunday at 3am UTC push: paths: - - 'test/ci/spack.yaml' + - 'test/ci/spack-*.yaml' - '.github/workflows/buildcache.yml' concurrency: @@ -16,7 +16,7 @@ concurrency: jobs: build: if: github.repository == 'FairRootGroup/FairMQ' - name: gcc-${{ matrix.gcc }} + name: ${{ matrix.env }}-gcc-${{ matrix.gcc }} runs-on: ubuntu-latest permissions: packages: write @@ -24,6 +24,10 @@ jobs: fail-fast: false matrix: gcc: ['12', '13', '14', '15'] + env: ['latest'] + include: + - gcc: '15' + env: 'boost187' env: GITHUB_USER: ${{ github.actor }} @@ -42,7 +46,7 @@ jobs: - name: Create environment and login to OCI registry shell: spack-bash {0} 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 - name: Find system compiler @@ -87,6 +91,6 @@ jobs: - name: Update buildcache index shell: spack-bash {0} 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 buildcache update-index ghcr-buildcache diff --git a/test/ci/spack.yaml b/test/ci/spack-boost187.yaml similarity index 55% rename from test/ci/spack.yaml rename to test/ci/spack-boost187.yaml index 991dd112..fd82809f 100644 --- a/test/ci/spack.yaml +++ b/test/ci/spack-boost187.yaml @@ -1,6 +1,10 @@ spack: 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: install_tree: diff --git a/test/ci/spack-latest.yaml b/test/ci/spack-latest.yaml new file mode 100644 index 00000000..c7eac8c7 --- /dev/null +++ b/test/ci/spack-latest.yaml @@ -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