Skip to content

Commit 04794cc

Browse files
authored
Merge pull request #237 from ZeugAusHH/cl_20250826_test_dpi
add tests for G4 build process with diagnostic plugins
2 parents e2b4de5 + 849d723 commit 04794cc

File tree

2 files changed

+81
-1
lines changed

2 files changed

+81
-1
lines changed

.github/scripts/build.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
#!/bin/bash
22

3+
# for test of diagnostic plugin interface (DPI), available only on Linux
4+
ARG_DPI=""
5+
if [ ! -z "$WITH_DPI" ] ; then
6+
ARG_DPI="-DUSE_DPI=1"
7+
fi
8+
39
set -xe
410

5-
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-Wall -Wextra $CMAKE_CXX_FLAGS"
11+
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release $ARG_DPI -DCMAKE_CXX_FLAGS="-Wall -Wextra $CMAKE_CXX_FLAGS"
612
make -C build
713

814
ls -la build/genesis4

.github/workflows/build_dpi.yaml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: Genesis4 - System Libraries Build & Test (diagnostic plugins)
2+
3+
on:
4+
push:
5+
pull_request:
6+
workflow_dispatch:
7+
8+
# Based on build.yaml from commit id bbed450 (Aug 6, 2025).
9+
# As of 2025-Aug, diagnostic plugins are only available on the Linux platform
10+
# -> kicking out all macos stuff
11+
12+
jobs:
13+
build-system:
14+
name: system-dpi-${{ matrix.os }}-${{ matrix.mpi }}
15+
runs-on: ${{ matrix.os }}
16+
defaults:
17+
run:
18+
shell: bash
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
include:
23+
- os: ubuntu-latest
24+
mpi: openmpi
25+
- os: ubuntu-latest
26+
mpi: mpich
27+
28+
steps:
29+
- uses: actions/checkout@v4
30+
31+
- name: Install system dependencies (Ubuntu) - OpenMPI
32+
if: runner.os == 'Linux' && matrix.mpi == 'openmpi'
33+
run: |
34+
sudo apt-get update
35+
sudo apt-get install -y \
36+
build-essential \
37+
pkg-config \
38+
cmake \
39+
libfftw3-mpi-dev \
40+
libhdf5-openmpi-dev \
41+
libopenmpi-dev \
42+
openmpi-bin
43+
44+
- name: Install system dependencies (Ubuntu) - MPICH
45+
if: runner.os == 'Linux' && matrix.mpi == 'mpich'
46+
run: |
47+
sudo apt-get update
48+
sudo apt-get install -y \
49+
build-essential \
50+
pkg-config \
51+
cmake \
52+
libfftw3-mpi-dev \
53+
libhdf5-mpich-dev \
54+
libmpich-dev \
55+
mpich
56+
57+
- name: Setup MPI environment
58+
run: |
59+
which mpicc
60+
which mpicxx
61+
which h5pcc
62+
mpicc --version
63+
mpicxx --version
64+
65+
- name: Build Genesis4 (with DPI)
66+
env:
67+
MPI: ${{ matrix.mpi }}
68+
WITH_DPI: 1
69+
shell: bash -eo pipefail -l {0}
70+
run: .github/scripts/build.sh
71+
72+
- name: Run tests (with DPI)
73+
run: |
74+
.github/scripts/run_tests.sh 2>&1 | tee -a "$GITHUB_STEP_SUMMARY"

0 commit comments

Comments
 (0)