forked from esmini/esmini
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
359 lines (254 loc) · 9.58 KB
/
appveyor.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
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
image:
- Visual Studio 2017
- Ubuntu1804
- macos
configuration: Release
platform:
- x64
cache:
- externals/googletest -> appveyor.yml
- externals/OpenSceneGraph -> appveyor.yml
- externals/OSI -> appveyor.yml
- externals/SUMO -> appveyor.yml
- resources/models -> appveyor.yml
skip_commits:
message: /#skip_build/
before_build:
- cmd: gitversion /l console /output buildserver
- ps: |
git submodule update --init --quiet
echo "const char* ESMINI_BUILD_VERSION=`"$env:APPVEYOR_BUILD_VERSION`";" | Out-File -Encoding ascii EnvironmentSimulator/Modules/CommonMini/buildnr.cpp
type EnvironmentSimulator/Modules/CommonMini/buildnr.cpp
# publish package on tag build
deploy:
- provider: GitHub
tag: $(APPVEYOR_REPO_TAG_NAME)
release: esmini $(GitVersion_MajorMinorPatch) (build $(APPVEYOR_BUILD_NUMBER))
description: 'Demo and binaries. For information about changes and new features see [release notes](https://github.com/esmini/esmini/blob/master/release_notes.md).'
auth_token:
secure: 'Zsjm85fzs4eTdDJg1VB+Y8Lk+5bEJRBkeaEtYtnbtv2IUg1sanoQTub/55QYNBsY'
on:
APPVEYOR_REPO_TAG: true # deploy on tag push only
for:
-
matrix:
only:
- image: Ubuntu1804
init:
- echo Ubuntu build script
- sh: >-
sudo apt-get update
sudo apt-get install -y libgl1-mesa-dev libxrandr-dev libxinerama-dev
build_script:
- sh: >-
# Normal (Release config with OSG)
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
cmake --build . -j --config Release --target install
cd ..
# No OSG, OSI and SUMO
mkdir build-no-osg
cd build-no-osg
cmake -DCMAKE_BUILD_TYPE=Release -D USE_OSG=False -D USE_SUMO=False -D USE_OSI=False ..
cmake --build . -j --config Release
cd ..
# Debug
mkdir build-debug
cd build-debug
cmake -DCMAKE_BUILD_TYPE=Debug ..
cmake --build . -j --config Debug
cd ..
after_build:
- sh: >-
if [[ $APPVEYOR_REPO_COMMIT_MESSAGE = *#store_bins* ]] || [ "$APPVEYOR_REPO_TAG" == "true" ];
then
cd ../;zip -r esmini/esmini-bin_ubuntu.zip esmini/bin esmini/EnvironmentSimulator/Applications/odrplot/xodr.py esmini/EnvironmentSimulator/Libraries/esminiRMLib/esminiRMLib.hpp esmini/EnvironmentSimulator/Libraries/esminiRMLib/esminiRMWrapper.cs esmini/EnvironmentSimulator/Libraries/esminiRMLib/esminiRMUnityUtil.cs esmini/EnvironmentSimulator/Libraries/esminiLib/esminiLib.hpp esmini/EnvironmentSimulator/Libraries/esminiLib/ESMiniWrapper.cs esmini/version.txt;cd -
else
echo "Skip binary artifacts";
fi
chmod -R +x ./run/*
chmod -R +x ./scripts/*
./generate_binary_dist.sh
if [ "$APPVEYOR_REPO_TAG" == "true" ];
then
mv esmini-demo.zip esmini-demo_ubuntu.zip;
else
rm esmini-demo.zip;
fi
test_script:
- sh: Xvfb :99 -screen 0 1920x1080x24+32 & export DISPLAY=:99
- ps: |
cd build/EnvironmentSimulator/Unittest
$env:path += "../../../bin"
./OperatingSystem_test
if ($lastExitCode -ne 0) {
throw "OperatingSystem_test failed"
}
./RoadManager_test
if ($lastExitCode -ne 0) {
throw "RoadManager_test failed"
}
./ScenarioEngine_test
if ($lastExitCode -ne 0) {
throw "ScenarioEngine_test failed"
}
./ScenarioEngineDll_test
if ($lastExitCode -ne 0) {
throw "ScenarioEngineDll_test failed"
}
dir *.tga, *.ppm
cd ../../../test
python3 smoke_test.py
$r0 = $LASTEXITCODE
python3 alks_suite.py
$r1 = $LASTEXITCODE
if (($r0 -ne 0) -or ($r1 -ne 0))
{
throw "Test NOK"
}
artifacts:
- path: esmini-*_ubuntu.zip
name: ubuntu_artifacts
-
matrix:
only:
- image: macos
build_script:
- echo MacOS Catalina build script
- sh: >-
# Normal build for release
mkdir build
cd build
cmake -G Xcode ..
cmake --build . -j --config Release --target install
cd ..
- sh: >-
# Also verify build Without OSG, OSI and SUMO
mkdir build-no-osg
cd build-no-osg
cmake -G Xcode -D USE_OSG=False -D USE_SUMO=False -D USE_OSI=False ..
cmake --build . -j --config Release
cd ..
after_build:
- sh: >-
lipo -create bin/libesminiRMLib.dylib -output bin/esminiRMLib.bundle
lipo -create bin/libesminiLib.dylib -output bin/esminiLib.bundle
if [[ $APPVEYOR_REPO_COMMIT_MESSAGE = *#store_bins* ]] || [ "$APPVEYOR_REPO_TAG" == "true" ];
then
cd ../;zip -r esmini/esmini-bin_mac_catalina.zip esmini/bin esmini/EnvironmentSimulator/Applications/odrplot/xodr.py esmini/EnvironmentSimulator/Libraries/esminiRMLib/esminiRMLib.hpp esmini/EnvironmentSimulator/Libraries/esminiRMLib/esminiRMWrapper.cs esmini/EnvironmentSimulator/Libraries/esminiRMLib/esminiRMUnityUtil.cs esmini/EnvironmentSimulator/Libraries/esminiLib/esminiLib.hpp esmini/EnvironmentSimulator/Libraries/esminiLib/ESMiniWrapper.cs esmini/version.txt;cd -
else
echo "Skip binary artifacts";
fi
chmod -R +x ./run/*
chmod -R +x ./scripts/*
./generate_binary_dist.sh
if [ "$APPVEYOR_REPO_TAG" == "true" ];
then
mv esmini-demo.zip esmini-demo_mac_catalina.zip;
else
rm esmini-demo.zip;
fi
test_script:
- ps: |
cd test
python3 smoke_test.py
$r0 = $LASTEXITCODE
python3 alks_suite.py
$r1 = $LASTEXITCODE
if (($r0 -ne 0) -or ($r1 -ne 0))
{
throw "Test NOK"
}
artifacts:
- path: esmini-*_mac_catalina.zip
name: mac_catalina_artifacts
# on_finish:
# - sh: export APPVEYOR_VNC_BLOCK=true
# - sh: curl -sflL 'https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-vnc.sh' | bash -e -
-
matrix:
only:
- image: Visual Studio 2017
platform: x64
build_script:
- echo Visual Studio 2017 x64 build script
- cmd:
mkdir build
cd build
cmake -G "Visual Studio 15 Win64" ..
msbuild /m /property:Configuration=Release EnvironmentSimulator.sln
cd..
generate_binary_dist.bat
echo Also verify build without OSG, OSI and SUMO
mkdir build-no-osg
cd build-no-osg
cmake -G "Visual Studio 15 Win64" -D USE_OSG=False -D USE_SUMO=False -D USE_OSI=False ..
cmake --build . -j --config Release
cd..
after_build:
- ps: |
if ($Env:APPVEYOR_REPO_COMMIT_MESSAGE -match '#store_bins' -Or $Env:APPVEYOR_REPO_TAG -eq $true)
{
cd ..;7z a esmini/esmini-bin_win_x64.zip esmini/bin/* esmini/EnvironmentSimulator/Applications/odrplot/xodr.py esmini/EnvironmentSimulator/Libraries/esminiRMLib/esminiRMLib.hpp esmini/EnvironmentSimulator/Libraries/esminiRMLib/esminiRMWrapper.cs esmini/EnvironmentSimulator/Libraries/esminiRMLib/esminiRMUnityUtil.cs esmini/EnvironmentSimulator/Libraries/esminiLib/esminiLib.hpp esmini/EnvironmentSimulator/Libraries/esminiLib/ESMiniWrapper.cs esmini/version.txt;cd esmini
}
else
{
echo "Skip binary artifacts"
}
if ($Env:APPVEYOR_REPO_TAG -eq $true)
{
7z a esmini-demo_win.zip esmini-demo/*
}
else
{
echo "Skip demos"
}
- cmd:
cd ..
curl -L "https://downloads.fdossena.com/geth.php?r=mesa64-latest" -o mesa_win64.7z
7z x mesa_win64.7z -omesa
cp mesa/opengl32.dll esmini/bin
cp mesa/opengl32.dll esmini/build/EnvironmentSimulator/Unittest/Release
cd esmini
# on_finish:
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
test_script:
- ps: |
cd build/EnvironmentSimulator/Unittest
$env:path += ";../../../bin"
./Release/OperatingSystem_test
if ($lastExitCode -ne 0) {
throw "OperatingSystem_test failed"
}
./Release/RoadManager_test
if ($lastExitCode -ne 0) {
throw "RoadManager_test failed"
}
./Release/ScenarioEngine_test
if ($lastExitCode -ne 0) {
throw "ScenarioEngine_test failed"
}
./Release/ScenarioEngineDll_test
if ($lastExitCode -ne 0) {
throw "ScenarioEngineDll_test failed"
}
dir *.tga, *.ppm
- cmd:
cd ../../../test
C:/Python38/python smoke_test.py
C:/Python38/python alks_suite.py
artifacts:
- path: esmini-*_win*.zip
name: windows_artifacts
-
matrix:
exclude:
- image: Ubuntu1804
platform: x86
- image: macos-mojave
platform: x86
- image: macos
platform: x86
- image: Visual Studio 2015
platform: x86