v2.1.0 #242
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 | |
env: | |
HOMEBREW_NO_INSTALL_CLEANUP: 1 | |
CTEST_NO_TESTS_ACTION: error | |
on: | |
push: | |
paths: | |
- "**.c" | |
- "**.cpp" | |
- "**.f90" | |
- "**.F90" | |
- "**/CMakeLists.txt" | |
- "**.cmake" | |
- ".github/workflows/ci.yml" | |
- "!memcheck.cmake" | |
- "!coverage.cmake" | |
jobs: | |
core: | |
timeout-minutes: 15 | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
shared: [true, false] | |
gcc: [9, 10, 11, 12, 13] | |
mpi: [openmpi] | |
include: | |
- os: macos-latest | |
mpi: openmpi | |
gcc: 13 | |
- os: ubuntu-latest | |
mpi: mpich | |
gcc: 13 | |
runs-on: ${{ matrix.os }} | |
env: | |
CC: gcc-${{ matrix.gcc }} | |
FC: gfortran-${{ matrix.gcc }} | |
steps: | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Python pkgs | |
run: pip install numpy h5py | |
- name: install HDF5-${{ matrix.mpi }} (Linux) | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt update | |
sudo apt install --no-install-recommends ninja-build libhdf5-${{ matrix.mpi }}-dev hdf5-tools lib${{ matrix.mpi }}-dev | |
- name: Install HDF5-${{ matrix.mpi }} (MacOS) | |
if: runner.os == 'macOS' | |
run: brew install hdf5-mpi ninja ${{ matrix.mpi }} | |
- uses: actions/checkout@v4 | |
- name: Configure | |
run: >- | |
cmake | |
--preset multi | |
--install-prefix ${{ runner.temp }} | |
-DBUILD_SHARED_LIBS:BOOL=${{ matrix.shared }} | |
- name: Build Debug | |
run: cmake --build --preset debug | |
- name: Test Debug | |
run: ctest --preset debug | |
- name: Build Release | |
run: cmake --build --preset release | |
- name: Test Release | |
run: ctest --preset release | |
- name: install package | |
run: cmake --install build | |
- name: example config | |
run: >- | |
cmake | |
--preset default | |
-GNinja | |
-DCMAKE_PREFIX_PATH:PATH=${{ runner.temp }} | |
working-directory: example | |
- name: example build | |
run: cmake --build --preset default | |
working-directory: example | |
- name: example test | |
run: ctest --preset default | |
working-directory: example | |
linux-coverage: | |
# GCOVR doesn't work with .inc files right now | |
if: false | |
needs: core | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: install hdf5 | |
run: | | |
sudo apt update | |
sudo apt install --no-install-recommends libhdf5-mpi-dev mpi-default-dev mpi-default-bin | |
- name: install Gcovr | |
run: pip install gcovr | |
- run: cmake --preset coverage | |
- run: cmake --build --parallel --preset coverage | |
- name: Code coverage | |
run: cmake --build --parallel --preset run-coverage | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: coverage-report-html | |
path: build-coverage/coverage/ |