-
Notifications
You must be signed in to change notification settings - Fork 9
74 lines (66 loc) · 1.64 KB
/
MacOS.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
72
73
74
# This is a CI workflow for the NCEPLIBS-ip project.
#
# This workflow builds on MacOS with different options.
#
# Ed Hartnett, 1/8/23
name: MacOS
on:
push:
branches:
- develop
pull_request:
branches:
- develop
jobs:
MacOS:
runs-on: macos-latest
env:
FC: gfortran-11
CC: gcc-11
strategy:
matrix:
openmp: [ ON, OFF ]
sharedlibs: [ON, OFF]
steps:
- name: cache-sp
id: cache-sp
uses: actions/cache@v2
with:
path: ~/sp
key: sp-${{ matrix.openmp }}-MacOS-2.3.3
- name: checkout-sp
if: steps.cache-sp.outputs.cache-hit != 'true'
uses: actions/checkout@v2
with:
repository: NOAA-EMC/NCEPLIBS-sp
path: sp
ref: v2.3.3
- name: build-sp
if: steps.cache-sp.outputs.cache-hit != 'true'
run: |
cd sp
mkdir build
cd build
cmake -DOPENMP=${{ matrix.openmp }} -DCMAKE_INSTALL_PREFIX=~/sp -DBUILD_SHARED_LIBS=${{ matrix.sharedlibs }} ..
make -j2
make install
ls -l ~/sp
ls -l ~/sp/lib
- name: checkout
uses: actions/checkout@v2
with:
path: ip
- name: build
run: |
cd ip
mkdir build
cd build
cmake -DOPENMP=${{ matrix.openmp }} -DCMAKE_PREFIX_PATH="~/sp" -DBUILD_SHARED_LIBS=${{ matrix.sharedlibs }} -DCMAKE_INSTALL_PREFIX=~/install ..
make -j2 VERBOSE=2
make install
ls -l ~/install
ls -l ~/install/lib
- name: test
run: |
cd $GITHUB_WORKSPACE/ip/build
ctest --verbose --output-on-failure --rerun-failed