Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ permissions:
jobs:
build-native:
runs-on: ubuntu-latest
# The Meso-NH coupling code only compiles with MPI, and the build turns MPI
# on by itself when it finds it. The ON run installs it so that code is
# compiled and tested too.
strategy:
fail-fast: false
matrix:
mpi: ['OFF', 'ON']
name: build-native (MPI ${{ matrix.mpi }})
steps:
- name: Checkout repository
uses: actions/checkout@v6
Expand All @@ -48,7 +56,9 @@ jobs:
sudo apt-get install -y --no-install-recommends python3 python3-pip
# Keep strace installed for potential future debugging
sudo apt-get install -y --no-install-recommends strace
# === ADD ANY OTHER ForeFire build dependencies (e.g. MPI) ===
if [ "${{ matrix.mpi }}" = ON ]; then
sudo apt-get install -y --no-install-recommends libopenmpi-dev openmpi-bin
fi
# pip install Python test dependencies
pip3 install --no-cache-dir lxml xarray netCDF4

Expand All @@ -59,6 +69,12 @@ jobs:
- name: Check ForeFire version
run: ./bin/forefire -v

- name: Check MPI linkage matches the matrix
run: |
if ldd ./lib/libforefireL.so | grep -q libmpi; then linked=ON; else linked=OFF; fi
echo "MPI linked: $linked"
[ "$linked" = "${{ matrix.mpi }}" ]

# The unit tests are built by install-forefire.sh along with everything
# else (FOREFIRE_BUILD_TESTS defaults on outside wheel builds), so this
# only has to run them. They cover the propagation and flux models one
Expand Down
Loading