Skip to content

Commit

Permalink
add separate lockfile for geant4-data
Browse files Browse the repository at this point in the history
  • Loading branch information
paulgessinger committed Dec 13, 2024
1 parent b7dc639 commit 848950a
Showing 1 changed file with 27 additions and 4 deletions.
31 changes: 27 additions & 4 deletions .github/workflows/spack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ jobs:
echo "BASE IMAGE: ${BASE_IMAGE}"
echo "BASE_IMAGE=${BASE_IMAGE}" >> "$GITHUB_ENV"
- name: Copy spack.lock to target-triplet
- name: Derive target teiplet
run: |
TARGET_TRIPLET=""
TARGET_TRIPLET="$(spack arch --family)"
Expand All @@ -103,16 +103,39 @@ jobs:
fi
echo "TARGET_TRIPLET=${TARGET_TRIPLET}" >> "$GITHUB_ENV"
- name: Copy spack.lock to target-triplet
run: |
echo "TARGET_TRIPLET=${TARGET_TRIPLET}" >> "$GITHUB_ENV"
cp spack.lock "spack-${TARGET_TRIPLET}.lock"
- name: Clear spack environment and concretize geant4-data
run: |
spack -e . remove --all
spack -e . [email protected]
spack -e . concretize -Uf
spack -e . find
- name: Copy geant4-data spack.lock to target-triplet
run: |
echo "TARGET_TRIPLET=${TARGET_TRIPLET}" >> "$GITHUB_ENV"
cp spack.lock "spack-${TARGET_TRIPLET}-geant4-data.lock"
- name: Upload spack.lock
- name: Upload lock files
uses: actions/upload-artifact@v4
with:
name: spack-${{ env.TARGET_TRIPLET }}.lock
path: spack-${{ env.TARGET_TRIPLET }}.lock
name: spack-${{ env.TARGET_TRIPLET }}-locks
path: |
spack-*.lock
if-no-files-found: error

- name: Add tarball to release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
spack-*.lock
- name: Push packages and update index
if: (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')) && !cancelled()
env:
Expand Down

0 comments on commit 848950a

Please sign in to comment.