Skip to content

Fix mpi tests on github CI; Add CMake conf vars for changing mpirun f… #8

Fix mpi tests on github CI; Add CMake conf vars for changing mpirun f…

Fix mpi tests on github CI; Add CMake conf vars for changing mpirun f… #8

name: CMake build and test fsgrid
on:
push:
branches: [ "master", "development", "ctest_gtest" ]
pull_request:
branches: [ "master", "development", "ctest_gtest" ]
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
PROJECT_NAME: fsgrid
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install OpenMPI
run: >
sudo apt-get install
openmpi-bin
libopenmpi-dev
openmpi-common
- name: Configure CMake
run: >
cmake
-B ${{github.workspace}}/build
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
-Dproject_name=${{env.PROJECT_NAME}}
-DMPI_TEST_NUM_PROCS=4
-DMPI_TEST_EXTRA_FLAGS=--oversubscribe
- name: Build
run: >
cmake
--build ${{github.workspace}}/build
--config ${{env.BUILD_TYPE}}
- name: Test
id: test
working-directory: ${{github.workspace}}/build
run: >
ctest
-C ${{env.BUILD_TYPE}}
- name: Verbose re-run failed tests
if: failure() && steps.test.outcome == 'failure'
working-directory: ${{github.workspace}}/build
run: >
ctest
-C ${{env.BUILD_TYPE}}
--rerun-failed
--output-on-failure