trying to fix spack.yaml #107
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: test | |
on: [push,pull_request,workflow_dispatch] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Allow cross-memory attach | |
run: | | |
sudo /usr/sbin/sysctl kernel.yama.ptrace_scope=0 | |
- name: Install mpich and boost | |
run: | | |
sudo apt install mpich libmpich-dev | |
- name: Add latest Spack release | |
run: | | |
git clone https://github.com/spack/spack.git /opt/spack && | |
cd /opt/spack && git checkout releases/latest | |
- name: Find external packages | |
run: | | |
eval `/opt/spack/bin/spack env activate --sh .` && | |
/opt/spack/bin/spack external find --not-buildable cmake && | |
/opt/spack/bin/spack external find --not-buildable mpich && | |
/opt/spack/bin/spack external find --not-buildable perl | |
- name: Add mochi-spack-packages | |
run: | | |
git clone https://github.com/mochi-hpc/mochi-spack-packages /opt/spack/mochi-spack-packages | |
/opt/spack/bin/spack repo add /opt/spack/mochi-spack-packages | |
- name: Install Package from Spack | |
run: | | |
eval `/opt/spack/bin/spack env activate --sh .` && | |
/opt/spack/bin/spack install --fail-fast | |
- name: Show Spack installed packages for debugging | |
run: | | |
eval `/opt/spack/bin/spack env activate --sh .` && | |
/opt/spack/bin/spack find -dlv | |
- name: Run test | |
run: | | |
export TIMEOUT=timeout MKTEMP=mktemp && | |
eval `/opt/spack/bin/spack env activate --sh .` && | |
mkdir build && cd build && | |
cmake .. -DENABLE_TESTS=ON -DCMAKE_CXX_COMPILER=mpicxx && | |
make && make test | |
- name: Show test results | |
if: ${{ failure() }} | |
run: | | |
cd build && cat Testing/Temporary/LastTest.log |