-
Notifications
You must be signed in to change notification settings - Fork 9
56 lines (49 loc) · 1.58 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
# This is a CI workflow for the NCEPLIBS-ip project.
#
# This workflow builds on Linux with different options.
#
# Ed Hartnett, 1/8/23
name: Linux
on:
push:
branches:
- develop
pull_request:
branches:
- develop
jobs:
Linux:
runs-on: ubuntu-24.04
strategy:
matrix:
openmp: [ ON, OFF ]
options: [ -DBUILD_D=OFF, -DBUILD_4=OFF, -DBUILD_8=ON ]
gcc-version: [12]
include:
- openmp: ON
options: -DBUILD_8=ON
gcc-version: 14
steps:
- name: get-gcc
run: |
if [ -z $(type -P gcc-${{ matrix.gcc-version }}) ]; then
sudo apt install gcc-${{ matrix.gcc-version }}
fi
- name: checkout
uses: actions/checkout@v4
with:
path: ip
- name: build
run: |
sudo apt install libopenblas-serial-dev
export CC=gcc-${{ matrix.gcc-version }} ; export FC=gfortran-${{ matrix.gcc-version }}
cmake -S ip -B ip/build -DCMAKE_PREFIX_PATH="~/" -DOPENMP=${{ matrix.openmp }} ${{ matrix.options }} -DCMAKE_INSTALL_PREFIX=~/install -DBLA_VENDOR=OpenBLAS
cmake --build ip/build --parallel 2 --verbose
cmake --install ip/build
# Ensure that manual setting of '-DBLA_VENDOR=...' is reflected in output CMake config
if [ $(grep -c "BLA_VENDOR OpenBLAS" ~/install/lib/cmake/ip/ip-config.cmake) -eq 0 ]; then
echo "OpenBLAS not set as BLA_VENDOR in ip-config.cmake!"
exit 1
fi
- name: test
run: ctest --test-dir ip/build --verbose --output-on-failure --rerun-failed