Skip to content

Commit 54a625a

Browse files
rem1776rem1776
authored andcommitted
enable unit testing for CMake CI
1 parent 2e3576b commit 54a625a

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

.github/workflows/github_cmake_gnu.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,42 +12,44 @@ jobs:
1212
runs-on: ubuntu-latest
1313
strategy:
1414
matrix:
15-
omp-flags: [ -DOPENMP=on, -DOPENMP=off ]
1615
libyaml-flag: [ "", -DWITH_YAML=on ]
1716
build-type: [ "-DCMAKE_BUILD_TYPE=Release", "-DCMAKE_BUILD_TYPE=Debug" ]
1817
container:
1918
image: ghcr.io/noaa-gfdl/fms/fms-ci-rocky-gnu:13.2.0
2019
env:
21-
CMAKE_FLAGS: "${{ matrix.build-type }} ${{ matrix.omp-flags }} ${{ matrix.libyaml-flag }}"
20+
CMAKE_FLAGS: "${{ matrix.build-type }} ${{ matrix.libyaml-flag }}"
2221
steps:
2322
- name: Checkout code
2423
uses: actions/[email protected]
2524
- name: Generate makefiles with CMake
2625
run: |
2726
mkdir build
2827
cd build
29-
cmake $CMAKE_FLAGS -DNetCDF_ROOT=/opt/view -DLIBYAML_ROOT=/opt/view ..
28+
cmake $CMAKE_FLAGS -DOPENMP=on -DNetCDF_ROOT=/opt/view -DLIBYAML_ROOT=/opt/view ..
3029
- name: Build the library
3130
run: make -C build
31+
- name: Run the unit tests
32+
run: cd build && ctest --verbose
3233

3334
build_arm:
3435
runs-on: ubuntu-24.04-arm
3536
strategy:
3637
matrix:
37-
omp-flags: [ -DOPENMP=on, -DOPENMP=off ]
3838
libyaml-flag: [ "", -DWITH_YAML=on ]
3939
build-type: [ "-DCMAKE_BUILD_TYPE=Release", "-DCMAKE_BUILD_TYPE=Debug" ]
4040
container:
4141
image: ghcr.io/noaa-gfdl/fms/fms-ci-rocky-gnu:13.2.0-arm
4242
env:
43-
CMAKE_FLAGS: "${{ matrix.build-type }} ${{ matrix.omp-flags }} ${{ matrix.libyaml-flag }}"
43+
CMAKE_FLAGS: "${{ matrix.build-type }} ${{ matrix.libyaml-flag }}"
4444
steps:
4545
- name: Checkout code
4646
uses: actions/[email protected]
4747
- name: Generate makefiles with CMake
4848
run: |
4949
mkdir build
5050
cd build
51-
cmake $CMAKE_FLAGS -DNetCDF_ROOT=/opt/view -DLIBYAML_ROOT=/opt/view ..
51+
cmake $CMAKE_FLAGS -DOPENMP=on -DNetCDF_ROOT=/opt/view -DLIBYAML_ROOT=/opt/view ..
5252
- name: Build the library
5353
run: make -C build
54+
- name: Run the unit tests
55+
run: cd build && ctest --verbose

0 commit comments

Comments
 (0)