diff --git a/.github/workflows/build_spack.yml b/.github/workflows/build_spack.yml index d5fbee8..b6de43e 100644 --- a/.github/workflows/build_spack.yml +++ b/.github/workflows/build_spack.yml @@ -17,10 +17,22 @@ jobs: fail-fast: false matrix: include: + + - os: macos-14 + xcode: "15.0.1" + compiler: "apple-clang@15.0.0" + publish: false + - os: macos-14 xcode: "16.0.0" + compiler: "apple-clang@16.0.0" + publish: true + - os: macos-15 xcode: "16.0.0" + compiler: "apple-clang@16.0.0" + publish: true + uses: ./.github/workflows/spack.yml with: os: ${{ matrix.os }} @@ -31,9 +43,20 @@ jobs: strategy: fail-fast: false matrix: - os: - - ubuntu-22.04 - - ubuntu-24.04 + include: + + - os: ubuntu-22.04 + compiler: gcc@12.3.0 + publish: true + + - os: ubuntu-24.04 + compiler: gcc@13.2.0 + publish: true + + - os: ubuntu-24.04 + compiler: clang@18.1.3 + publish: false + uses: ./.github/workflows/spack.yml with: os: ${{ matrix.os }} @@ -43,8 +66,12 @@ jobs: strategy: fail-fast: false matrix: - image: - - ghcr.io/acts-project/alma9-base:67 + + include: + - image: ghcr.io/acts-project/alma9-base:67 + compiler: gcc@11.4.1 + publish: true + uses: ./.github/workflows/spack.yml with: os: ubuntu-latest diff --git a/.github/workflows/spack.yml b/.github/workflows/spack.yml index 893d66d..2b8fedf 100644 --- a/.github/workflows/spack.yml +++ b/.github/workflows/spack.yml @@ -14,10 +14,14 @@ on: required: false type: string default: "latest-stable" + compiler: + required: false + type: string + default: "" publish: required: false type: boolean - default: true + default: false jobs: @@ -38,7 +42,8 @@ jobs: git config user.email 41898282+github-actions[bot]@users.noreply.github.com curl https://patch-diff.githubusercontent.com/raw/spack/spack/pull/47370.patch | git am - - run: | + - name: List visible compilers + run: | spack compiler find spack compilers @@ -74,6 +79,11 @@ jobs: rm -rf /usr/share/dotnet/ df -h + - name: Select compiler + if: inputs.compiler != '' + run: | + spack -e .config add 'packages:all:compiler: ["%${{ inputs.compiler }}"]' + - name: Spack concretize run: | spack -e . concretize -Uf @@ -102,12 +112,16 @@ jobs: - name: Derive target triplet run: | - echo "TARGET_TRIPLET=$(spack arch --family)" >> "$GITHUB_ENV" + if [ "${{ inputs.compiler }}" != "" ]; then + echo "TARGET_TRIPLET=$(spack arch --family)_${{ inputs.compiler }}" >> "$GITHUB_ENV" + else + echo "TARGET_TRIPLET=$(spack arch --family)" >> "$GITHUB_ENV" + fi - name: Copy spack.lock to target-triplet run: | echo "TARGET_TRIPLET=${TARGET_TRIPLET}" >> "$GITHUB_ENV" - cp spack.lock "spack-${TARGET_TRIPLET}.lock" + cp spack.lock "spack_${TARGET_TRIPLET}.lock" - name: Upload lock files if: inputs.publish @@ -115,7 +129,7 @@ jobs: with: name: spack-${{ env.TARGET_TRIPLET }}-locks path: | - spack-*.lock + spack_*.lock if-no-files-found: error - name: Add lock files to release @@ -123,7 +137,7 @@ jobs: if: inputs.publish && startsWith(github.ref, 'refs/tags/') with: files: | - spack-*.lock + spack_*.lock - name: Push packages and update index if: (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')) && !cancelled()