-
Notifications
You must be signed in to change notification settings - Fork 124
83 lines (82 loc) · 2.41 KB
/
build.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
75
76
77
78
79
80
81
82
83
name: CI
on:
push:
branches:
- main
pull_request:
jobs:
base:
name: ${{ matrix.platform }} with FGT ${{ matrix.fgt }}
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: true
matrix:
platform: ['ubuntu-latest', 'macos-latest']
fgt: ['ON', 'OFF']
env:
PLATFORM: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
channels: conda-forge
auto-update-conda: true
- name: Setup
shell: bash -l {0}
run: |
conda update -n base -c defaults conda -y
conda install ninja cmake ninja eigen compilers jsoncpp -y
- name: JSONCPP
shell: bash -l {0}
run: |
git clone https://github.com/open-source-parsers/jsoncpp.git
cd jsoncpp
git checkout 1.9.3
mkdir build
cd build
cmake .. \
-G Ninja \
-DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \
-DBUILD_SHARED_LIBS=ON \
-DJSONCPP_WITH_CMAKE_PACKAGE=ON \
-DJSONCPP_WITH_TESTS=OFF \
-DJSONCPP_WITH_POST_BUILD_UNITTEST=OFF \
-DCMAKE_BUILD_TYPE=Release
ninja install
- name: FGT
shell: bash -l {0}
if: matrix.fgt == 'ON'
run: |
git clone https://github.com/gadomski/fgt.git
mkdir fgt/build
cd fgt/build
cmake .. \
-G Ninja \
-DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \
-DWITH_TESTS=OFF \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=OFF
ninja
ninja install
- name: Configure
shell: bash -l {0}
run: |
mkdir build; cd build;
cmake .. \
-G Ninja \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \
-DWITH_DOCS=OFF \
-DWITH_FGT=${{ matrix.fgt }} \
-DWITH_JSONCPP=OFF \
-DWITH_STRICT_WARNINGS=ON \
-DWITH_TESTS=ON
- name: Build
shell: bash -l {0}
working-directory: ./build
run: ninja
- name: Test
shell: bash -l {0}
working-directory: ./build
run: ctest