added CI with spack manager #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI tests with Spack | |
on: | |
pull_request: | |
branches: | |
- 'devel*' | |
# https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#workflow_dispatch | |
workflow_dispatch: | |
# https://docs.github.com/en/rest/repos/repos#create-a-repository-dispatch-event | |
repository_dispatch: | |
types: [ ci-spack-on-demand ] | |
# https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#schedule | |
# schedule: | |
# - cron: '30 10 * * *' | |
jobs: | |
tests-spack: | |
runs-on: ubuntu-latest | |
env: | |
ENV_NAME: rp-env | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
- uses: spack/setup-spack@v2 | |
with: | |
ref: develop # Spack version (examples: develop, releases/v0.23) | |
buildcache: true # Configure oci://ghcr.io/spack/github-actions-buildcache | |
path: spack # Where to clone Spack | |
- name: Create environment | |
shell: spack-bash {0} | |
run: | | |
spack env create ${{ env.ENV_NAME }} | |
spack env activate ${{ env.ENV_NAME }} | |
spack config add concretizer:unify:when_possible | |
spack config add concretizer:reuse:false | |
spack config add config:db_lock_timeout:300 | |
spack add py-radical-pilot ^[email protected] | |
spack concretize -f | |
spack install | |
- name: Run tests | |
shell: spack-bash {0} | |
run: | | |
spack env activate ${{ env.ENV_NAME }} | |
spack env status | |
bash -c "tests/bin/base_test.sh" | |