Build workflow #172
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: Build FoamAdapter | |
run-name: 'Build workflow' | |
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 to repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: true # Recursively clone submodules | |
- name: Add repos | |
run: | | |
sudo add-apt-repository 'deb https://dl.openfoam.com/repos/deb noble main' | |
sudo apt-key add .github/workflows/pubkey.gpg | |
- 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 | |
- 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 FoamAdapter | |
run: | | |
source /usr/lib/openfoam/openfoam2406/etc/bashrc || true | |
ctest --preset develop |