Skip to content

Commit

Permalink
change what gets pushed to the release
Browse files Browse the repository at this point in the history
  • Loading branch information
paulgessinger committed Dec 13, 2024
1 parent fea6aab commit 69ca5a2
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 23 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/build_spack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,24 @@ jobs:
- os: macos-14
xcode: "15.0.1"
compiler: "[email protected]"
publish: false
default: false

- os: macos-14
xcode: "16.0.0"
compiler: "[email protected]"
publish: true
default: true

- os: macos-15
xcode: "16.0.0"
compiler: "[email protected]"
publish: true
default: true

uses: ./.github/workflows/spack.yml
with:
os: ${{ matrix.os }}
xcode: ${{ matrix.xcode }}
compiler: ${{ matrix.compiler }}
publish: ${{ matrix.publish }}
default: ${{ matrix.default }}
secrets: inherit

build_native:
Expand All @@ -49,21 +49,21 @@ jobs:

- os: ubuntu-22.04
compiler: [email protected]
publish: true
default: true

- os: ubuntu-24.04
compiler: [email protected]
publish: true
default: true

- os: ubuntu-24.04
compiler: [email protected]
publish: false
default: false

uses: ./.github/workflows/spack.yml
with:
os: ${{ matrix.os }}
compiler: ${{ matrix.compiler }}
publish: ${{ matrix.publish }}
default: ${{ matrix.default }}
secrets: inherit

build_container:
Expand All @@ -74,12 +74,12 @@ jobs:
include:
- image: ghcr.io/acts-project/alma9-base:67
compiler: [email protected]
publish: true
default: true

uses: ./.github/workflows/spack.yml
with:
os: ubuntu-latest
image: ${{ matrix.image }}
compiler: ${{ matrix.compiler }}
publish: ${{ matrix.publish }}
default: ${{ matrix.default }}
secrets: inherit
23 changes: 10 additions & 13 deletions .github/workflows/spack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:
required: false
type: string
default: ""
publish:
default:
required: false
type: boolean
default: false
Expand Down Expand Up @@ -108,21 +108,18 @@ jobs:
echo "BASE IMAGE: ${BASE_IMAGE}"
echo "BASE_IMAGE=${BASE_IMAGE}" >> "$GITHUB_ENV"
- name: Derive target triplet
- name: Lockfile bookkeeping
run: |
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"
arch=$(spack arch --family)
echo "TARGET_TRIPLET=${arch}_${{ inputs.compiler }}" >> "$GITHUB_ENV"
cp spack.lock "spack_${TARGET_TRIPLET}.lock"
if [ "${{ inputs.default }}" != "" ]; then
# this will be become the default combination for this architecture
cp spack.lock "spack_${arch}.lock"
fi
- name: Upload lock files
if: inputs.publish
if: inputs.default
uses: actions/upload-artifact@v4
with:
name: spack-${{ env.TARGET_TRIPLET }}-locks
Expand All @@ -132,7 +129,7 @@ jobs:

- name: Add lock files to release
uses: softprops/action-gh-release@v2
if: inputs.publish && startsWith(github.ref, 'refs/tags/')
if: inputs.default && startsWith(github.ref, 'refs/tags/')
with:
files: |
spack_*.lock
Expand Down

0 comments on commit 69ca5a2

Please sign in to comment.