Skip to content

Replace module import with header include in test files #737

Replace module import with header include in test files

Replace module import with header include in test files #737

Workflow file for this run

name: BuildAndTest
on:
push:
paths:
- '**.c'
- '**.cpp'
- '**.cppm'
- '**.h'
- '**.hpp'
- '**.cmake'
- '**/CMakeLists.txt'
- '.github/workflows/Build.yml'
pull_request:
paths:
- '**.c'
- '**.cpp'
- '**.cppm'
- '**.h'
- '**.hpp'
- '**.cmake'
- '**/CMakeLists.txt'
- '.github/workflows/Build.yml'
jobs:
generate:
name: MPI${{ matrix.mpi }}/${{ matrix.mode }}
runs-on: ubuntu-24.04
container:
image: luohaothu/gcc-trunk:latest
strategy:
fail-fast: false
matrix:
mpi: [ON, OFF]
mode: [Debug, Release]
if: "!contains(github.event.head_commit.message, 'skip build')"
steps:
- name: Checkout
uses: actions/checkout@master
with:
submodules: recursive
fetch-depth: 0
- name: Make directory
run: mkdir -p build
- name: Generate
working-directory: ./build
run: |
wget https://github.com/Kitware/CMake/releases/download/v4.0.2/cmake-4.0.2-linux-x86_64.sh
chmod +x cmake-4.0.2-linux-x86_64.sh
mkdir -p cmake
./cmake-4.0.2-linux-x86_64.sh --skip-license --prefix=$(pwd)/cmake
apt update && apt install -y ninja-build libhdf5-dev libhdf5-openmpi-dev libboost-all-dev python3-pip python3-sphinx doxygen
export PATH=$(pwd)/cmake/bin:$PATH
cmake -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -G Ninja \
-DCMAKE_INSTALL_PREFIX=$(pwd)/install -DOPFLOW_BUILD_ALL=ON -DOPFLOW_ENABLE_MODULE=OFF \
-DCMAKE_BUILD_TYPE=${{ matrix.mode }} -DOPFLOW_WITH_HDF5=ON -DOPFLOW_WITH_MPI=${{ matrix.mpi }} \
..
if [ "$RUNNER_OS" == "Linux" ]; then
cmake --build . -t All_CI --parallel $(nproc) --config ${{ matrix.mode }}
else
cmake --build . -t All_CI --parallel $(nproc) --config ${{ matrix.mode }}
fi
- name: Test
working-directory: ./build
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
ctest --parallel $(nproc) -C ${{ matrix.mode }} -VV
else
ctest --parallel $(nproc) -C ${{ matrix.mode }} -VV
fi