Skip to content

Commit ea0db03

Browse files
committed
CI: Make consistent with pFUnit CI
1 parent 199e39b commit ea0db03

File tree

3 files changed

+56
-42
lines changed

3 files changed

+56
-42
lines changed

.github/workflows/main.yml

+50-41
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,20 @@ jobs:
1515
runs-on: ${{ matrix.os }}
1616
strategy:
1717
matrix:
18-
os: [ubuntu-22.04, macos-12, macos-13]
19-
compiler: [gfortran-10, gfortran-11, gfortran-12, gfortran-13]
20-
exclude:
21-
- os: macos-12
22-
compiler: gfortran-10
23-
- os: macos-13
18+
os: [ubuntu-22.04, ubuntu-24.04, macos-13, macos-14]
19+
compiler: [gfortran-11, gfortran-12, gfortran-13]
20+
# gfortran-10 is only on ubuntu-22.04
21+
# gfortran-14 is available on ubuntu-24.04
22+
include:
23+
- os: ubuntu-22.04
2424
compiler: gfortran-10
25+
- os: ubuntu-24.04
26+
compiler: gfortran-14
27+
exclude:
28+
- os: ubuntu-24.04
29+
compiler: gfortran-11
30+
- os: ubuntu-22.04
31+
compiler: gfortran-13
2532

2633
# fail-fast if set to 'true' here is good for production, but when
2734
# debugging, set to 'false'. fail-fast means if *any* ci test in the matrix fails
@@ -80,18 +87,20 @@ jobs:
8087
${FC} --version
8188
mpirun --version
8289
mpifort --show
83-
- name: Build GFE
84-
run: |
85-
mkdir -p build
86-
cd build
87-
cmake .. -DSKIP_OPENMP=ON -DCMAKE_INSTALL_PREFIX=../install -DCMAKE_PREFIX_PATH=../install
88-
make -j$(nproc 2>/dev/null || sysctl -n hw.logicalcpu) install
89-
cmake .. -DSKIP_OPENMP=ON -DCMAKE_INSTALL_PREFIX=../install -DCMAKE_PREFIX_PATH=../install
90-
make -j$(nproc 2>/dev/null || sysctl -n hw.logicalcpu) install
91-
- name: Build and Run Tests
90+
91+
- name: Build and Install GFE
9292
run: |
93-
cd build
94-
make -j$(nproc 2>/dev/null || sysctl -n hw.logicalcpu) tests
93+
cmake -B build -DSKIP_OPENMP=ON -DCMAKE_INSTALL_PREFIX=../install -DCMAKE_PREFIX_PATH=../install
94+
cmake --build build --parallel 4 --target install
95+
cmake -B build -DSKIP_OPENMP=ON -DCMAKE_INSTALL_PREFIX=../install -DCMAKE_PREFIX_PATH=../install
96+
cmake --build build --parallel 4 --target install
97+
98+
- name: Build Tests
99+
run: cmake --build build --parallel 4 -target build-tests -DSKIP_OPENMP=ON -DCMAKE_INSTALL_PREFIX=../install -DCMAKE_PREFIX_PATH=../install
100+
101+
- name: Run Tests
102+
run: ctest --test-dir build --parallel 1 --output-on-failure --repeat until-pass:4 --schedule-random
103+
95104
- name: Archive log files on failure
96105
uses: actions/upload-artifact@v4
97106
if: failure()
@@ -118,6 +127,7 @@ jobs:
118127
- name: Set all directories as git safe
119128
run: |
120129
git config --global --add safe.directory '*'
130+
121131
- name: Setup Intel oneAPI repository
122132
run: |
123133
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
@@ -145,20 +155,20 @@ jobs:
145155
${FC} --version
146156
${CC} --version
147157
mpirun --version
158+
cmake --version
148159
149-
- name: Build GFE
160+
- name: Build and Install GFE
150161
run: |
151-
mkdir -p build
152-
cd build
153-
cmake .. -DSKIP_OPENMP=ON -DCMAKE_INSTALL_PREFIX=../install -DCMAKE_PREFIX_PATH=../install
154-
make -j$(nproc 2>/dev/null || sysctl -n hw.logicalcpu) install
155-
cmake .. -DSKIP_OPENMP=ON -DCMAKE_INSTALL_PREFIX=../install -DCMAKE_PREFIX_PATH=../install
156-
make -j$(nproc 2>/dev/null || sysctl -n hw.logicalcpu) install
157-
158-
- name: Build and Run Tests
159-
run: |
160-
cd build
161-
make -j$(nproc 2>/dev/null || sysctl -n hw.logicalcpu) tests
162+
cmake -B build -DSKIP_OPENMP=ON -DCMAKE_INSTALL_PREFIX=../install -DCMAKE_PREFIX_PATH=../install
163+
cmake --build build --parallel 4 --target install
164+
cmake -B build -DSKIP_OPENMP=ON -DCMAKE_INSTALL_PREFIX=../install -DCMAKE_PREFIX_PATH=../install
165+
cmake --build build --parallel 4 --target install
166+
167+
- name: Build Tests
168+
run: cmake --build build --parallel 4 -target build-tests -DSKIP_OPENMP=ON -DCMAKE_INSTALL_PREFIX=../install -DCMAKE_PREFIX_PATH=../install
169+
170+
- name: Run Tests
171+
run: ctest --test-dir build --parallel 1 --output-on-failure --repeat until-pass:4 --schedule-random
162172

163173
- name: Archive log files on failure
164174
uses: actions/upload-artifact@v4
@@ -196,19 +206,18 @@ jobs:
196206
apt-get update
197207
apt-get install -y python-is-python3
198208
199-
- name: Build GFE
200-
run: |
201-
mkdir -p build
202-
cd build
203-
cmake .. -DSKIP_OPENMP=ON -DCMAKE_INSTALL_PREFIX=../install -DCMAKE_PREFIX_PATH=../install
204-
make -j$(nproc 2>/dev/null || sysctl -n hw.logicalcpu) install
205-
cmake .. -DSKIP_OPENMP=ON -DCMAKE_INSTALL_PREFIX=../install -DCMAKE_PREFIX_PATH=../install
206-
make -j$(nproc 2>/dev/null || sysctl -n hw.logicalcpu) install
207-
208-
- name: Build and Run Tests
209+
- name: Build and Install GFE
209210
run: |
210-
cd build
211-
make -j$(nproc 2>/dev/null || sysctl -n hw.logicalcpu) tests
211+
cmake -B build -DSKIP_OPENMP=ON -DCMAKE_INSTALL_PREFIX=../install -DCMAKE_PREFIX_PATH=../install
212+
cmake --build build --parallel 4 --target install
213+
cmake -B build -DSKIP_OPENMP=ON -DCMAKE_INSTALL_PREFIX=../install -DCMAKE_PREFIX_PATH=../install
214+
cmake --build build --parallel 4 --target install
215+
216+
- name: Build Tests
217+
run: cmake --build build --parallel 4 -target build-tests -DSKIP_OPENMP=ON -DCMAKE_INSTALL_PREFIX=../install -DCMAKE_PREFIX_PATH=../install
218+
219+
- name: Run Tests
220+
run: ctest --test-dir build --parallel 1 --output-on-failure --repeat until-pass:4 --schedule-random
212221

213222
- name: Archive log files on failure
214223
uses: actions/upload-artifact@v4

ChangeLog.md

+5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
55

66
## [Unreleased]
77

8+
### Changed
9+
10+
- Update CI to match that of pFUnit
11+
- Remove `macos-11` from GitHub Actions, add `macos-12` and `gfortran-14` to Ubuntu 24.04
12+
813
## [1.15.0] - 2024-03-26
914

1015
### Changed

tools/ci-install-mpi.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ then
1515
tar xjf ${MPI_IMPL}-${MPI_VER}.tar.bz2 && rm ${MPI_IMPL}-${MPI_VER}.tar.bz2
1616
cd ${MPI_IMPL}-${MPI_VER}
1717
./configure --prefix=${HOME}/local/${MPI_IMPL} --disable-wrapper-rpath --disable-wrapper-runpath --with-hwloc=internal --with-libevent=internal
18-
make -j $(nproc 2>/dev/null || sysctl -n hw.logicalcpu)
18+
make -j 4
1919
make install-strip
2020
cd .. && rm -r ${MPI_IMPL}-${MPI_VER}
2121
exit 0

0 commit comments

Comments
 (0)