-
Notifications
You must be signed in to change notification settings - Fork 8
59 lines (52 loc) · 1.88 KB
/
Linux_options.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# This is a CI workflow for the NCEPLIBS-w3emc project.
#
# This workflow builds on Linux with different CMake build options.
#
# Ed Hartnett, 1/8/23
name: Linux_options
on:
push:
branches:
- develop
pull_request:
branches:
- develop
jobs:
Linux_options:
runs-on: ubuntu-24.04
strategy:
matrix:
options: ['-DBUILD_D=OFF -DBUILD_8=ON', '-DBUILD_4=OFF -DBUILD_DEPRECATED=ON -DBUILD_WITH_BUFR=ON', '-DBUILD_SHARED_LIBS=ON']
gcc-version: [12]
include:
- gcc-version: 14
options: '-DBUILD_8=ON'
steps:
- name: get-gcc
run: |
if [ -z $(type -P gcc-${{ matrix.gcc-version }}) ]; then
sudo apt-get install gcc-${{ matrix.gcc-version }} gfortran-${{ matrix.gcc-version}}
fi
echo "CC=gcc-${{ matrix.gcc-version }}" >> $GITHUB_ENV
echo "FC=gfortran-${{ matrix.gcc-version }}" >> $GITHUB_ENV
- name: "Build dependencies"
uses: NOAA-EMC/ci-build-nceplibs@develop
with:
bacio-version: v2.6.0
bacio-cmake-args: -DBUILD_TESTING=OFF ${{ matrix.options == '-DBUILD_SHARED_LIBS=ON' && matrix.options || '' }}
bufr-version: bufr_v12.0.0
bufr-cmake-args: -DBUILD_TESTING=OFF ${{ matrix.options == '-DBUILD_SHARED_LIBS=ON' && matrix.options || '' }}
key-suffix: -gcc${{ matrix.gcc-version }}
- name: checkout-w3emc
uses: actions/checkout@v4
with:
path: w3emc
- name: build-w3emc
run: |
set -x
cmake -S w3emc -B w3emc/build -DCMAKE_PREFIX_PATH="$GITHUB_WORKSPACE/nceplibs/NCEPLIBS-bacio;$GITHUB_WORKSPACE/nceplibs/NCEPLIBS-bufr" -DCMAKE_INSTALL_PREFIX="~/w3emc/install" ${{ matrix.options }}
cmake --build w3emc/build --parallel 2 --verbose
- name: test-w3emc
run: |
ctest --test-dir w3emc/build --output-on-failure --rerun-failed --verbose
cmake --install w3emc/build