-
Notifications
You must be signed in to change notification settings - Fork 9
51 lines (47 loc) · 1.06 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
name: Linux
on:
push:
branches:
- develop
pull_request:
branches:
- develop
jobs:
Linux:
runs-on: ubuntu-latest
env:
FC: gfortran
CC: gcc
strategy:
matrix:
config:
- {
options: "-DCMAKE_BUILD_TYPE=Debug"
}
- {
options: "-DBUILD_SHARED_LIBS=ON"
}
steps:
- name: checkout
uses: actions/checkout@v4
with:
path: g2tmpl
submodules: true
- name: build
run: |
cd g2tmpl
mkdir build
cd build
cmake ${{ matrix.config.options }} -DCMAKE_INSTALL_PREFIX=~/g2tmpl/install ..
make -j2 VERBOSE=1
- name: test
run: |
set -x
cd $GITHUB_WORKSPACE/g2tmpl/build
ctest --verbose --output-on-failure --rerun-failed
make install
if [ "${{ matrix.config.options }}" = "-DBUILD_SHARED_LIBS=ON" ]; then
ls -l ~/g2tmpl/install/lib/lib*.so || exit 1
else
ls -l ~/g2tmpl/install/lib/lib*.a || exit 1
fi