Foam Adapter Integration Test #7
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: FoamAdapter Integration Test | |
run-name: 'Foam Adapter Integration Test' | |
on: | |
push: | |
branches: | |
- dev | |
- main | |
pull_request: | |
types: synchronize | |
schedule: | |
- cron: "* 0 * * 0" | |
env: | |
CTEST_OUTPUT_ON_FAILURE: 1 | |
OMPI_MCA_rmaps_base_oversubscribe: 1 | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
name: Build FoamAdapter | |
strategy: | |
fail-fast: false | |
matrix: | |
compiler: | |
- CC: clang | |
CXX: clang++ | |
- CC: gcc | |
CXX: g++ | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout FoamAdapter | |
uses: actions/checkout@v4 | |
with: | |
repository: exasim-project/FoamAdapter | |
- name: Checkout NeoFOAM submodule | |
uses: actions/checkout@v4 | |
with: | |
repository: exasim-project/NeoFOAM | |
path: NeoFOAM | |
ref: '${{ github.head_ref }}' | |
- name: Add repos | |
run: | | |
sudo add-apt-repository 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main' | |
wget -q -O - https://dl.openfoam.com/add-debian-repo.sh | sudo bash | |
wget https://apt.llvm.org/llvm-snapshot.gpg.key | |
sudo apt-key add llvm-snapshot.gpg.key | |
- name: Install dependencies | |
run: | | |
sudo apt update | |
sudo apt install \ | |
ninja-build \ | |
clang-16 \ | |
gcc-10 \ | |
libomp-16-dev \ | |
python3 \ | |
python3-dev \ | |
build-essential \ | |
libopenmpi-dev \ | |
openmpi-bin \ | |
openfoam2406-dev | |
sudo apt remove clang-14 | |
sudo rm /usr/bin/clang | |
sudo rm /usr/bin/clang++ | |
sudo ln -s /usr/bin/clang-16 /usr/bin/clang | |
sudo ln -s /usr/bin/clang++-16 /usr/bin/clang++ | |
- name: Get versions | |
run: | | |
clang --version | |
ninja --version | |
cmake --version | |
- name: Build FoamAdapter | |
run: | | |
source /usr/lib/openfoam/openfoam2406/etc/bashrc || true | |
CC=${{matrix.compiler.CC}} \ | |
CXX=${{matrix.compiler.CXX}} \ | |
cmake --preset develop \ | |
-DNEOFOAM_DEVEL_TOOLS=OFF \ | |
-DNEOFOAM_ENABLE_MPI_WITH_THREAD_SUPPORT=OFF | |
cmake --build --preset develop | |
- name: Execute unit tests NeoFOAM | |
run: | | |
ctest --preset develop |