-
Notifications
You must be signed in to change notification settings - Fork 8
/
.gitlab-ci.yml
235 lines (219 loc) · 7.67 KB
/
.gitlab-ci.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
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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
stages:
- build
- test
# - regression
- deploy
default:
image: debian:10
before_script:
- apt-get update -qy
- apt-get install -y make g++ clang qt5-default libwxgtk3.0-dev wx3.0-headers wx-common libtbb-dev wget
gcc_debug:
stage: build
script:
- mkdir gcc_debug
- cd gcc_debug
- qmake -spec linux-g++ CONFIG+=debug ../sph.pro
- make
gcc_release:
stage: build
script:
- mkdir gcc_release
- cd gcc_release
- qmake -spec linux-g++ CONFIG+=release ../sph.pro
- make
gcc_single_precision:
stage: build
script:
- mkdir gcc_float
- cd gcc_float
- qmake -spec linux-g++ CONFIG+=debug DEFINES+=SPH_SINGLE_PRECISION ../sph.pro
- make
clang_debug:
stage: build
script:
- mkdir gcc_debug
- cd gcc_debug
- qmake -spec linux-clang CONFIG+=debug ../sph.pro
- make
clang_release:
stage: build
script:
- mkdir gcc_release
- cd gcc_release
- qmake -spec linux-clang CONFIG+=release ../sph.pro
- make
test_debug:
stage: test
only:
refs:
- devel
- master
script:
- wget -P /usr/include/catch2/ "https://github.com/catchorg/Catch2/releases/download/v2.5.0/catch.hpp"
- mkdir tests
- cd tests
- qmake -spec linux-g++ DEFINES+="SPH_CONFIG_SET SPH_TEST_RESOURCE_PATH=\"../../test/resources/\"" CONFIG+=debug CONFIG+=use_tbb ../test.pro
- make
- cd test
- ./test -d yes exclude:[output] exclude:[filesystem] exclude:[path] exclude:[thread] exclude:[grid]
test_release:
stage: test
only:
refs:
- devel
- master
script:
- wget -P /usr/include/catch2/ "https://github.com/catchorg/Catch2/releases/download/v2.5.0/catch.hpp"
- mkdir tests
- cd tests
- qmake -spec linux-g++ DEFINES+="SPH_CONFIG_SET SPH_TEST_RESOURCE_PATH=\"../../test/resources\"" CONFIG+=release CONFIG+=use_tbb ../test.pro
- make
- cd test
- ./test -d yes exclude:[filesystem] exclude:[path] exclude:[thread] exclude:[grid]
#cppcheck:
#stage: test
#allow_failure: true
#script:
#- apt-get install -y cppcheck
#- cppcheck --language=c++ --std=c++14 --error-exitcode=1 \
#--quiet --enable=all \
#-DNAMESPACE_SPH_BEGIN -DNAMESPACE_SPH_END -DASSERT \
#lib \
#`ls -d lib/*/test lib/*/*/test lib/*/*/*/test | awk '{printf("-i %s ", $0)}'` # exclude tests
#flawfinder:
#stage: test
#allow_failure: true
#script:
#- apt-get install -y flawfinder
#- flawfinder --quiet --falsepositive --error-level=4 lib/
#examples:
# stage: test
# only:
# refs:
# - devel
# - master
# script:
# - mkdir examples_build
# - cd examples_build
# - qmake -spec linux-clang CONFIG+=devel ../examples.pro
# - make
# - cd examples
# - 01_hello_asteroid/01_hello_asteroid
# - 02_death_star/02_death_star
# - 03_van_der_waals/03_van_der_waals
# - 04_simple_collision/04_simple_collision
# - 05_fragmentation_reaccumulation/05_fragmentation_reaccumulation
# - 06_heat_diffusion/06_heat_diffusion
#regression:
# tags:
# - opensph # might take a long time, do not run on shared runners
# stage: regression
# only:
# refs:
# - devel
# - master
# script:
# - apt-get install -y gnuplot
# - mkdir regression_build
# - cd regression_build
# - qmake -spec linux-g++ CONFIG+=release CONFIG+=use_tbb DEFINES+="SPH_VERSION=$OPENSPH_VERSION" ../sph.pro
# - make
# - cd ..
# - cd regression
# - cd impact # impact simulation
# - ../../regression_build/cli/launcher/opensph-cli -p impact.sph -n "save text file"
# - gnuplot plot.plt
# - ../../regression_build/cli/launcher/opensph-cli -p impact.sph -n "compare with reference"
# - cd ..
# - cd nbody-merge # N-body run with perfect merging
# - ../../regression_build/cli/launcher/opensph-cli -p nbody-merge.sph -n "save result"
# - gnuplot plot.plt
#- ../../regression_build/cli/launcher/opensph-cli -p nbody-merge.sph -n "compare with reference"
# - cd ..
# - cd nbody-merge-or-bounce # N-body run with conditional merging
# - ../../regression_build/cli/launcher/opensph-cli -p nbody-merge-or-bounce.sph -n "save result"
# - gnuplot plot.plt
#- ../../regression_build/cli/launcher/opensph-cli -p nbody-merge-or-bounce.sph -n "compare with reference"
# - cd ..
# - cd nbody-bounce # N-body run with elastic bouncing
# - ../../regression_build/cli/launcher/opensph-cli -p nbody-bounce.sph -n "save result"
# - gnuplot plot.plt
#- ../../regression_build/cli/launcher/opensph-cli -p nbody-bounce.sph -n "compare with reference"
# - cd ..
# - cd rotation # rotation
# - ../../regression_build/cli/launcher/opensph-cli -p rotate.sph -n "save result"
# - gnuplot plot.plt
# - cd ..
#
# artifacts:
# when: always
# expire_in: 3 mos
# paths:
# - regression/impact/result.scf
# - regression/impact/plot.png
# - regression/nbody-merge/result.scf
# - regression/nbody-merge/plot.png
# - regression/nbody-bounce/result.scf
# - regression/nbody-bounce/plot.png
# - regression/nbody-merge-or-bounce/result.scf
# - regression/nbody-merge-or-bounce/plot.png
# - regression/rotation/result.scf
# - regression/rotation/plot.png
#performance:
# tags:
# - opensph # might take a long time, do not run on shared runners
# stage: regression
# only:
# refs:
# - devel
# - master
# script:
# - apt-get install -y gnuplot pdftk
# - mkdir performance_build
# - cd performance_build
# - qmake -spec linux-g++ CONFIG+=release CONFIG+=use_tbb DEFINES+="SPH_VERSION=$OPENSPH_VERSION" ../bench.pro
# - make
# - cd ../bench
# - ../performance_build/bench/bench -b
# - git clone https://github.com/pavelsevecek/pavelsevecek.github.io.git web
# - mkdir -p web/perf
# - cp perf*.csv web/perf/
# - cd web
# - git add perf/*.csv
# - git config user.name "gitlab CI"
# - git config user.email "[email protected]"
# - git commit -m "performance test"
# - git push https://pavelsevecek:[email protected]/pavelsevecek/pavelsevecek.github.io.git --all
# - cd ..
# - cp web/perf/perf*.csv .
# - ./make_plots.sh
# - pdftk *.pdf cat output result.pdf
#
# artifacts:
# when: always
# expire_in: 1 week
# paths:
# - bench/result.pdf
build_package:
stage: deploy
only:
refs:
- master
script:
- apt-get install -y dpkg
- mkdir gcc_deploy
- cd gcc_deploy
- qmake -spec linux-g++ CONFIG+=release CONFIG+=use_tbb DEFINES+="SPH_VERSION=$OPENSPH_VERSION" ../sph.pro
- make
- cd ..
- mkdir -p opensph_$OPENSPH_VERSION/usr/local/bin
- cp gcc_deploy/gui/launcherGui/opensph opensph_$OPENSPH_VERSION/usr/local/bin/
- cp gcc_deploy/cli/launcher/opensph-cli opensph_$OPENSPH_VERSION/usr/local/bin/
- cp gcc_deploy/cli/info/opensph-info opensph_$OPENSPH_VERSION/usr/local/bin/
- mkdir -p opensph_$OPENSPH_VERSION/DEBIAN
- cp control opensph_$OPENSPH_VERSION/DEBIAN/control
- dpkg-deb --build opensph_$OPENSPH_VERSION
artifacts:
paths:
- opensph_$OPENSPH_VERSION.deb