cmake build and CI testing (#67) #1
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: CMAKE GNU MPI+OpenMP CI | |
on: | |
push: | |
branches: [ "master", "dev" ] | |
paths-ignore: | |
- LICENSE.md | |
- README.md | |
pull_request: | |
branches: [ "master", "dev" ] | |
jobs: | |
build_and_test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
omp_num_threads: [1, 2, 4, 8] | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Install MPI | |
run: | | |
sudo apt update | |
sudo apt install -y mpich | |
which mpicc | |
which mpicxx | |
- name: Clean up | |
run: | | |
rm -rf ${{runner.workspace}}/Quicksilver/build | |
mkdir ${{runner.workspace}}/Quicksilver/build | |
- name: Make the code | |
run: | | |
cd ${{runner.workspace}}/Quicksilver/build | |
cmake .. -DENABLE_MPI=ON -DENABLE_OMP=ON | |
make -j16 | |
- name: Run smoke test | |
run: | | |
export OMP_NUM_THREADS=${{ matrix.omp_num_threads }} | |
mpirun -n 1 ${{runner.workspace}}/Quicksilver/build/qs |