Skip to content

don't double find MPI #270

don't double find MPI

don't double find MPI #270

Workflow file for this run

name: ci
env:
HOMEBREW_NO_INSTALL_CLEANUP: 1
CTEST_NO_TESTS_ACTION: error
CTEST_PARALLEL_LEVEL: 0
CMAKE_INSTALL_PREFIX: ~/libs
CMAKE_PREFIX_PATH: ~/libs
CMAKE_GENERATOR: Ninja
on:
push:
paths:
- "**.c"
- "**.cpp"
- "**.f90"
- "**.F90"
- "**/CMakeLists.txt"
- "**.cmake"
- ".github/workflows/ci.yml"
- "!memcheck.cmake"
- "!coverage.cmake"
workflow_dispatch:
# avoid wasted runs
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
gcc-new:
timeout-minutes: 15
strategy:
matrix:
conf: [ { os: ubuntu-24.04, mpi: openmpi },
{ os: ubuntu-24.04, mpi: mpich },
{ os: macos-latest, mpi: openmpi } ]
runs-on: ${{ matrix.conf.os }}
steps:
- uses: actions/setup-python@v6
with:
python-version: '3.13'
- name: Python pkgs
run: pip install numpy h5py
- name: install MPI (Linux)
if: runner.os == 'Linux'
run: |
sudo apt update
sudo apt install --no-install-recommends lib${{ matrix.conf.mpi }}-dev
- name: Install HDF5-${{ matrix.conf.mpi }} and MPI (MacOS)
if: runner.os == 'macOS'
run: brew install hdf5-mpi ${{ matrix.conf.mpi }}
- name: GCC (macOS)
if: runner.os == 'macOS'
run: |
echo "CC=gcc-15" >> $GITHUB_ENV
echo "FC=gfortran-15" >> $GITHUB_ENV
- uses: actions/checkout@v6
- name: Configure
run: cmake -B build -Dhdf5_req="2.0"
- name: build
run: cmake --build build
- name: Test
run: ctest --test-dir build
- name: install package
run: cmake --install build
- name: example config
run: cmake --preset default
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: gcc-new
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
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 --preset coverage
- name: Code coverage
run: cmake --build --preset run-coverage
- uses: actions/upload-artifact@v4
with:
name: coverage-report-html
path: build-coverage/coverage/