-
Notifications
You must be signed in to change notification settings - Fork 0
139 lines (115 loc) · 3.6 KB
/
test_library.yaml
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
name: Tests for Library
on: [push, pull_request]
env:
COMPILER: c++
jobs:
Tests-Viewshed-library:
runs-on: ubuntu-latest
env:
DEBIAN_FRONTEND: "noninteractive"
QT_QPA_PLATFORM: "offscreen"
XDG_RUNTIME_DIR: "/tmp"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Update and Upgrade
run: |
sudo apt update
sudo apt install ninja-build doxygen libgtest-dev libgmock-dev clang
- name: Install GDAL
run: |
sudo add-apt-repository ppa:ubuntugis/ppa
sudo apt update
sudo apt-get -y install gdal-bin libgdal-dev
- uses: robinraju/release-downloader@v1.8
with:
repository: "JanCaha/cpp-simplerasters"
latest: true
fileName: "*.deb"
tarBall: false
zipBall: false
- name: Install and remove artifact
run: |
sudo apt install ./simplerasters*.deb
rm simplerasters*
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Configure
run: |
mkdir build
cmake \
-S. \
-Bbuild \
-G Ninja \
-DCMAKE_CXX_COMPILER=${COMPILER} \
-DCMAKE_BUILD_TYPE=Release \
-DPACK_DEB:bool=off \
-DBUILD_DOCUMENTATION:bool=off \
-DBUILD_TESTS:bool=on \
-DCELL_EVENT_DATA_FLOAT:bool=on \
-DOUTPUT_RASTER_DATA_FLOAT:bool=on \
-DNEEDS_QT:bool=off
- name: Build
run: |
cmake --build build --config Release --target library_viewshed
- name: Run Tests
id: unittests
run: |
cmake --build build --config Release --target build_tests
cmake --build build --config Release --target run_tests
- name: Clean Build
run: |
rm -rf build
mkdir build
- name: Run Tests with double
id: unittestsdouble
run: |
cmake \
-S. \
-Bbuild \
-G Ninja \
-DCMAKE_CXX_COMPILER=${COMPILER} \
-DCMAKE_BUILD_TYPE=Release \
-DPACK_DEB:bool=off \
-DBUILD_DOCUMENTATION:bool=off \
-DBUILD_TESTS:bool=on \
-DCELL_EVENT_DATA_FLOAT:bool=off \
-DOUTPUT_RASTER_DATA_FLOAT:bool=off \
-DNEEDS_QT:bool=off
cmake --build build --config Release --target build_tests
cmake --build build --config Release --target run_tests
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: '5.15.2'
host: 'linux'
- name: Clean Build
run: |
rm -rf build
mkdir build
- name: Configure
run: |
cmake \
-S. \
-Bbuild \
-G Ninja \
-DCMAKE_CXX_COMPILER=${COMPILER} \
-DCMAKE_BUILD_TYPE=Release \
-DPACK_DEB:bool=off \
-DBUILD_DOCUMENTATION:bool=off \
-DBUILD_TESTS:bool=on \
-DCELL_EVENT_DATA_FLOAT:bool=on \
-DOUTPUT_RASTER_DATA_FLOAT:bool=on \
-DNEEDS_QT:bool=on \
-D CMAKE_INSTALL_PREFIX=/usr
- name: Run Tests even with Qt
id: unittestsqt
run: |
cmake --build build --config Release --target build_tests
cd build
ctest -VV
- name: Test Install
run: |
cmake --build build --config Release --target all
sudo cmake --build build --config Release --target install