-
Notifications
You must be signed in to change notification settings - Fork 22
71 lines (63 loc) · 1.7 KB
/
Linux.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
60
61
62
63
64
65
66
67
68
69
70
71
# This is a GitHub CI workflow for the NCEPLIBS-bufr project.
#
# This workflow tests on Linux with different compilers.
#
# Ed Hartnett, 1/10/23
name: Linux
on:
push:
branches:
- develop
pull_request:
branches:
- develop
jobs:
Linux:
runs-on: ubuntu-24.04
strategy:
matrix:
ccompiler: [clang, gcc-12, gcc-13]
steps:
- name: install-deps
run: |
sudo apt-get update
sudo apt-get install python3-pip python3-dev python3-numpy meson
sudo python3 -m pip install --break-system-packages -U netCDF4
sudo python3 -m pip install --break-system-packages -U pdoc
- name: checkout
uses: actions/checkout@v4
with:
path: bufr
submodules: true
- name: cache-data
id: cache-data
uses: actions/cache@v4
with:
path: ~/data
key: data-18
- name: build
run: |
if [[ ${{ matrix.ccompiler }} == "clang" ]]; then
export CC=clang
elif [[ ${{ matrix.ccompiler }} == "gcc-12" ]]; then
export CC=gcc-12
export FC=gfortran-12
elif [[ ${{ matrix.ccompiler }} == "gcc-13" ]]; then
export CC=gcc-13
export FC=gfortran-13
fi
cd bufr
mkdir build
cd build
cmake -DTEST_FILE_DIR=/home/runner/data -DCMAKE_INSTALL_PREFIX=./install -DENABLE_PYTHON=ON ..
make -j2 VERBOSE=1
make install
- name: test
run: |
cd bufr/build
ctest --verbose --output-on-failure --rerun-failed
- name: cache-data
if: steps.cache-data.outputs.cache-hit != 'true'
run: |
mkdir ~/data
cp $GITHUB_WORKSPACE/bufr/build/test/bufr-12.2.0.tgz ~/data