-
Notifications
You must be signed in to change notification settings - Fork 2
31 lines (30 loc) · 1.31 KB
/
run_test.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
name: run-test
on:
push:
jobs:
build:
name: run-test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-20.04 ]
config:
- {cmake_option: "-DSONATA_REPORT_ENABLE_SUBMODULES=ON -DSONATA_REPORT_ENABLE_CONVERTER=ON", mpi: ON}
- {cmake_option: "-DSONATA_REPORT_ENABLE_SUBMODULES=ON -DSONATA_REPORT_ENABLE_MPI=OFF -DSONATA_REPORT_ENABLE_CONVERTER=ON", mpi: OFF}
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Fetch repository
run: git fetch --prune --unshallow
- name: Get submodules
run: git submodule update --init --force --recursive
- name: Install parallel packages
if: ${{ matrix.config.mpi == 'ON' }}
run: sudo apt-get install mpich libmpich-dev libhdf5-mpich-dev hdf5-tools
- name: Install serial packages
if: ${{ matrix.config.mpi == 'OFF' }}
run: sudo apt-get install libhdf5-dev hdf5-tools
- name: Build and run tests
run: mkdir BUILD && cd BUILD && cmake ${cmake_option} .. && make all && ctest --output-on-failure
env:
cmake_option: ${{ matrix.config.cmake_option }}