Skip to content

Commit 5fbc829

Browse files
committed
ci:build:consoliate
1 parent 80d2dd3 commit 5fbc829

File tree

1 file changed

+20
-53
lines changed

1 file changed

+20
-53
lines changed

.github/workflows/ci_build.yml

Lines changed: 20 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,38 @@ on:
66
- "scripts/CMakeLists.txt"
77
- "cmake/libraries.json"
88
- ".github/workflows/ci_build.yml"
9-
release:
10-
types: [published]
119

1210
jobs:
1311

14-
linux:
15-
runs-on: ubuntu-latest
16-
timeout-minutes: 15
12+
linux_mac:
13+
timeout-minutes: 20
1714

1815
strategy:
1916
matrix:
17+
cfg: [{os: ubuntu-latest, fc: gfortran},
18+
{os: macos-latest, fc: gfortran-11}]
2019
shared: [true, false]
20+
mpi: [mpich, openmpi]
21+
exclude:
22+
- cfg: {os: macos-latest, fc: gfortran-11}
23+
shared: true
24+
25+
runs-on: ${{ matrix.cfg.os}}
26+
27+
env:
28+
FC: ${{ matrix.cfg.fc }}
2129

2230
steps:
2331

24-
- name: install MPI
32+
- name: install MPI (Linux)
33+
if: runner.os == 'Linux'
2534
run: |
2635
sudo apt update
27-
sudo apt install --no-install-recommends libopenmpi-dev openmpi-bin
36+
sudo apt install --no-install-recommends lib${{ matrix.mpi }}-dev
37+
38+
- name: install MPI (MacOS)
39+
if: runner.os == 'macOS'
40+
run: brew install ${{ matrix.mpi }}
2841

2942
- uses: actions/checkout@v2
3043

@@ -52,49 +65,3 @@ jobs:
5265
run: cmake --build example/build --parallel
5366
- name: Test Examples
5467
run: ctest --test-dir example/build -V
55-
56-
57-
58-
macos:
59-
runs-on: macos-latest
60-
timeout-minutes: 20
61-
62-
strategy:
63-
matrix:
64-
shared: [false]
65-
mpi: [mpich, open-mpi]
66-
# HDF5-MPI upstream is broken for shared MacOS builds.
67-
68-
steps:
69-
70-
- uses: actions/checkout@v2
71-
72-
- name: Install MPI
73-
run: brew install ${{ matrix.mpi }}
74-
75-
- name: Configure HDF5 with ${{ matrix.mpi }}
76-
run: cmake -S scripts -B scripts/build -DCMAKE_INSTALL_PREFIX=${{ runner.temp }} -DBUILD_SHARED_LIBS:BOOL=${{ matrix.shared }}
77-
78-
- name: Build/install HDF5
79-
run: cmake --build scripts/build --parallel
80-
81-
- name: configure h5fortran with ${{ matrix.mpi }}
82-
run: cmake -B build -DCMAKE_INSTALL_PREFIX=${{ runner.temp }} -DBUILD_SHARED_LIBS:BOOL=${{ matrix.shared }} -DCMAKE_PREFIX_PATH=${{ runner.temp }}
83-
84-
- name: build h5fortran
85-
run: cmake --build build --parallel
86-
87-
- name: test h5fortran
88-
run: ctest --test-dir build --preset default
89-
90-
- name: install h5fortran
91-
run: cmake --install build
92-
93-
- name: configure examples
94-
run: cmake -S example -B example/build -DCMAKE_PREFIX_PATH:PATH=${{ runner.temp }} -DBUILD_SHARED_LIBS:BOOL=${{ matrix.shared }}
95-
96-
- name: build Examples
97-
run: cmake --build example/build --parallel
98-
99-
- name: Test Examples
100-
run: ctest --test-dir example/build -V

0 commit comments

Comments
 (0)