Skip to content

Commit

Permalink
Try Spack GH Action
Browse files Browse the repository at this point in the history
  • Loading branch information
ax3l committed Mar 12, 2024
1 parent 60e28cf commit 1f6fccd
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .github/ci/spack-envs/clang7_nopy_ompi_h5_ad2/spack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,6 @@ spack:

mirrors:
E4S: https://cache.e4s.io
local-buildcache:
url: oci://ghcr.io/openPMD/spack-buildcache
signed: false
19 changes: 17 additions & 2 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ jobs:
clang7_nopy_ompi_h5_ad2:
runs-on: ubuntu-20.04
permissions:
packages: write
if: github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v3
Expand All @@ -95,12 +97,19 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install clang-7 gfortran libopenmpi-dev python3
sudo .github/workflows/dependencies/install_spack
- name: Set up Spack
uses: spack/setup-spack@v2
with:
ref: 187b8adb4faa7ad8e5de0baab9a610d158772823
buildcache: true
color: true
path: /opt/spack
- name: Build
env: {CC: clang-7, CXX: clang++-7, CXXFLAGS: -Werror}
shell: spack-bash {0}
run: |
eval $(spack env activate --sh .github/ci/spack-envs/clang7_nopy_ompi_h5_ad2/)
spack install
spack install --no-check-signature
share/openPMD/download_samples.sh build
cmake -S . -B build \
Expand All @@ -114,6 +123,12 @@ jobs:
cd build
ctest --output-on-failure
- name: Push packages and update index
run: |
spack -e . mirror set --push --oci-username ${{ github.actor }} --oci-password "${{ secrets.GITHUB_TOKEN }}" local-buildcache
spack -e . buildcache push --base-image ubuntu:20.04 --update-index local-buildcache
if: ${{ !cancelled() }}

# TODO
# clang7_py36_nompi_h5_ad2_libstdc++

Expand Down

0 comments on commit 1f6fccd

Please sign in to comment.