Foam Adapter Integration Test #877
Workflow file for this run
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 6 * * 1" | |
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: | |
if: ${{!contains(github.event.pull_request.labels.*.name, 'Skip-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: Select branch to checkout | |
run: | | |
if [[ $(git ls-remote --exit-code --heads https://github.com/exasim-project/FoamAdapter ${{ github.head_ref }}) ]] | |
then | |
echo "checkout ${{ github.head_ref }}" | |
echo checkout=${{ github.head_ref }} >> $GITHUB_ENV | |
else | |
echo "checkout main" | |
echo checkout=main >> $GITHUB_ENV | |
fi | |
- name: Checkout FoamAdapter | |
uses: actions/checkout@v4 | |
with: | |
repository: exasim-project/FoamAdapter | |
ref: '${{ env.checkout }}' | |
- name: Checkout NeoFOAM submodule | |
uses: actions/checkout@v4 | |
with: | |
repository: exasim-project/NeoFOAM | |
path: NeoFOAM | |
ref: '${{ github.head_ref }}' | |
- name: Set up OpenFOAM | |
uses: gerlero/setup-openfoam@v1 | |
with: | |
openfoam-version: 2406 | |
- name: Install dependencies | |
uses: gerlero/apt-install@v1 | |
with: | |
packages: >- | |
ninja-build | |
clang-16 | |
gcc-10 | |
libomp-16-dev | |
python3 | |
python3-dev | |
build-essential | |
libopenmpi-dev | |
openmpi-bin | |
- 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: | | |
source /usr/lib/openfoam/openfoam2406/etc/bashrc || true | |
ctest --preset develop |