forked from OpenDDS/OpenDDS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
463 lines (458 loc) · 17.2 KB
/
azure-pipelines.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
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
schedules:
- cron: "0 7 * * SUN"
displayName: Weekly Sunday
branches:
include:
- master
always: true
jobs:
- job: VisualStudio2019
timeoutInMinutes: 120
pool:
vmImage: windows-2019
strategy:
matrix:
Debug64:
BuildPlatform: x64
BuildConfiguration: Debug
Release64:
BuildPlatform: x64
BuildConfiguration: Release
MessengerTests: true
Debug32:
BuildPlatform: Win32
BuildConfiguration: Debug
Release32:
BuildPlatform: Win32
BuildConfiguration: Release
MessengerTests: true
variables:
VCPKG_ROOT: $(Build.SourcesDirectory)\vcpkg
steps:
- script: |
if %BuildPlatform%==x64 (set VCVARS_ARCH=x64) else set VCVARS_ARCH=x86
echo ##vso[task.setvariable variable=VcVarsArch]%VCVARS_ARCH%
displayName: Set VcVarsArch
- script: |
git clone -q --depth 1 git://github.com/Microsoft/vcpkg %VCPKG_ROOT%
call %VCPKG_ROOT%\bootstrap-vcpkg.bat
set VCPKG_ARCH=$(VcVarsArch)-windows
%VCPKG_ROOT%\vcpkg install --triplet %VCPKG_ARCH% openssl xerces-c
rmdir /s/q %VCPKG_ROOT%\packages %VCPKG_ROOT%\buildtrees %VCPKG_ROOT%\downloads
echo ##vso[task.setvariable variable=VcPkgInst]%VCPKG_ROOT%\installed\%VCPKG_ARCH%
displayName: Vcpkg
- task: BatchScript@1
displayName: VcVars
inputs:
filename: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat"'
arguments: $(VcVarsArch)
modifyEnvironment: true
- task: BatchScript@1
displayName: Put perl on PATH
inputs:
filename: tools\scripts\prepend_path
arguments: 'C:\Strawberry\perl\bin'
modifyEnvironment: true
- script: |
if %BuildConfiguration%==Release set OPT=--no-tests --no-debug --optimize
call configure -v --ace-github-latest --tests --security --xerces3=$(VcPkgInst) --openssl=$(VcPkgInst) %OPT%
perl tools\scripts\show_build_config.pl
if %BuildConfiguration%==Release (set SLN=DDS_TAOv2.sln) else set SLN=DDS_TAOv2_all.sln
echo ##vso[task.setvariable variable=BuildSolution]%SLN%
failOnStderr: #
displayName: Run configure script
- script: |
for /d %%x in (tests\googletest\build\*) do @if not %%x==tests\googletest\build\install del /s/q %%x
del /s/q ACE_TAO\ACE\protocols ACE_TAO\ACE\contrib ACE_TAO\ACE\examples
del /s/q ACE_TAO\ACE\tests ACE_TAO\ACE\netsvcs ACE_TAO\ACE\websvcs
del /s/q ACE_TAO\ACE\ASNMP ACE_TAO\ACE\performance-tests
del /s/q ACE_TAO\ACE\tests ACE_TAO\ACE\Kokyu ACE_TAO\TAO\interop-tests
del /s/q ACE_TAO\TAO\DevGuideExamples ACE_TAO\TAO\examples
del /s/q ACE_TAO\TAO\orbsvcs\tests ACE_TAO\TAO\orbsvcs\performance-tests
del /s/q ACE_TAO\TAO\orbsvcs\examples
displayName: Remove unused files from external repos
- task: BatchScript@1
displayName: Setenv from configure script
inputs:
filename: setenv.cmd
modifyEnvironment: true
- task: VSBuild@1
displayName: Build solution
inputs:
solution: $(BuildSolution)
platform: $(BuildPlatform)
configuration: $(BuildConfiguration)
maximumCpuCount: true
- script: |
perl "%ACE_ROOT%/bin/mwc.pl" -type vs2019 tests\DCPS\Messenger DevGuideExamples\DCPS\Messenger
condition: and(succeeded(), ne(variables['MessengerTests'], ''))
displayName: Generate Messenger sln files
- task: VSBuild@1
condition: and(succeeded(), ne(variables['MessengerTests'], ''))
displayName: Build Messenger Test
inputs:
solution: $(DDS_ROOT)\tests\DCPS\Messenger\Messenger.sln
platform: $(BuildPlatform)
configuration: $(BuildConfiguration)
- task: VSBuild@1
condition: and(succeeded(), ne(variables['MessengerTests'], ''))
displayName: Build Messenger Example
inputs:
solution: $(DDS_ROOT)\DevGuideExamples\DCPS\Messenger\Messenger.sln
platform: $(BuildPlatform)
configuration: $(BuildConfiguration)
- script: |
perl tests\cmake_integration\run_ci_tests.pl --build-config=$(BuildConfiguration) --generator="Visual Studio 16 2019" --arch $(BuildPlatform)
displayName: Compile and run CMake tests
- script: |
del /s/q *.obj *.idb
displayName: Remove unused build outputs
- script: |
if %BuildConfiguration%==Release (set SUBDIR_FOR_MESSENGER=Release) else set SUBDIR_FOR_MESSENGER=.
cd tests\DCPS\Messenger
perl run_test.pl rtps -ExeSubDir %SUBDIR_FOR_MESSENGER%
displayName: Run DCPS Messenger Test
- script: |
if %BuildConfiguration%==Release (set SUBDIR_FOR_MESSENGER=Release) else set SUBDIR_FOR_MESSENGER=.
cd DevGuideExamples\DCPS\Messenger
perl integration_run_test.pl -ExeSubDir %SUBDIR_FOR_MESSENGER%
displayName: Run Examples DCPS Messenger
- job: VisualStudio2017
timeoutInMinutes: 120
pool:
vmImage: vs2017-win2016
strategy:
matrix:
Release64:
BuildPlatform: x64
BuildConfiguration: Release
variables:
VCPKG_ROOT: $(Build.SourcesDirectory)\vcpkg
steps:
- script: |
if %BuildPlatform%==x64 (set VCVARS_ARCH=x64) else set VCVARS_ARCH=x86
echo ##vso[task.setvariable variable=VcVarsArch]%VCVARS_ARCH%
displayName: Set VcVarsArch
- script: |
git clone -q --depth 1 git://github.com/Microsoft/vcpkg %VCPKG_ROOT%
call %VCPKG_ROOT%\bootstrap-vcpkg.bat
set VCPKG_ARCH=$(VcVarsArch)-windows
%VCPKG_ROOT%\vcpkg install --triplet %VCPKG_ARCH% openssl xerces-c
rmdir /s/q %VCPKG_ROOT%\packages %VCPKG_ROOT%\buildtrees %VCPKG_ROOT%\downloads
echo ##vso[task.setvariable variable=VcPkgInst]%VCPKG_ROOT%\installed\%VCPKG_ARCH%
displayName: Vcpkg
condition: not(and(eq(variables['BuildConfiguration'], 'Debug'), eq(variables['BuildPlatform'], 'x64')))
- task: BatchScript@1
displayName: VcVars
inputs:
filename: '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvarsall.bat"'
arguments: $(VcVarsArch)
modifyEnvironment: true
- task: BatchScript@1
displayName: Put perl on PATH
inputs:
filename: tools\scripts\prepend_path
arguments: 'C:\Strawberry\perl\bin'
modifyEnvironment: true
- script: |
if %BuildConfiguration%==Release set OPT=--no-tests --no-debug --optimize
if %BuildConfiguration%==Debug set OPT=--features=uses_wchar=1
set SEC=--security --xerces3=$(VcPkgInst) --openssl=$(VcPkgInst)
if %BuildConfiguration%==Debug if %BuildPlatform%==x64 set SEC=
call configure -v --ace-github-latest --tests %SEC% %OPT%
perl tools\scripts\show_build_config.pl
if %BuildConfiguration%==Release (set SLN=DDS_TAOv2.sln) else set SLN=DDS_TAOv2_all.sln
echo ##vso[task.setvariable variable=BuildSolution]%SLN%
failOnStderr: #
displayName: Run configure script
- script: |
for /d %%x in (tests\googletest\build\*) do @if not %%x==tests\googletest\build\install del /s/q %%x
del /s/q ACE_TAO\ACE\protocols ACE_TAO\ACE\contrib ACE_TAO\ACE\examples
del /s/q ACE_TAO\ACE\tests ACE_TAO\ACE\netsvcs ACE_TAO\ACE\websvcs
del /s/q ACE_TAO\ACE\ASNMP ACE_TAO\ACE\performance-tests
del /s/q ACE_TAO\ACE\tests ACE_TAO\ACE\Kokyu ACE_TAO\TAO\interop-tests
del /s/q ACE_TAO\TAO\DevGuideExamples ACE_TAO\TAO\examples
del /s/q ACE_TAO\TAO\orbsvcs\tests ACE_TAO\TAO\orbsvcs\performance-tests
del /s/q ACE_TAO\TAO\orbsvcs\examples
displayName: Remove unused files from external repos
- task: BatchScript@1
displayName: Setenv from configure script
inputs:
filename: setenv.cmd
modifyEnvironment: true
- task: VSBuild@1
displayName: Build solution
inputs:
solution: $(BuildSolution)
platform: $(BuildPlatform)
configuration: $(BuildConfiguration)
maximumCpuCount: true
- script: |
perl "%ACE_ROOT%/bin/mwc.pl" -type vs2017 tests\DCPS\Messenger DevGuideExamples\DCPS\Messenger
condition: ne(variables['BuildConfiguration'], 'Debug')
displayName: Generate Messenger sln files
- task: VSBuild@1
displayName: Build Messenger Test
inputs:
solution: $(DDS_ROOT)\tests\DCPS\Messenger\Messenger.sln
platform: $(BuildPlatform)
configuration: $(BuildConfiguration)
condition: ne(variables['BuildConfiguration'], 'Debug')
- task: VSBuild@1
displayName: Build Messenger Example
inputs:
solution: $(DDS_ROOT)\DevGuideExamples\DCPS\Messenger\Messenger.sln
platform: $(BuildPlatform)
configuration: $(BuildConfiguration)
condition: ne(variables['BuildConfiguration'], 'Debug')
- script: |
del /s/q *.obj *.idb
displayName: Remove unused build outputs
- script: |
if %BuildConfiguration%==Release (set SUBDIR_FOR_MESSENGER=Release) else set SUBDIR_FOR_MESSENGER=.
cd tests\DCPS\Messenger
perl run_test.pl rtps -ExeSubDir %SUBDIR_FOR_MESSENGER%
displayName: Run DCPS Messenger Test
- script: |
if %BuildConfiguration%==Release (set SUBDIR_FOR_MESSENGER=Release) else set SUBDIR_FOR_MESSENGER=.
cd DevGuideExamples\DCPS\Messenger
perl integration_run_test.pl -ExeSubDir %SUBDIR_FOR_MESSENGER%
displayName: Run Examples DCPS Messenger
- script: |
perl tests\cmake_integration\run_ci_tests.pl --build-config=$(BuildConfiguration) --generator="Visual Studio 15 2017" --arch $(BuildPlatform)
displayName: Compile and run CMake tests
- job: Linux
timeoutInMinutes: 120
pool:
vmImage: ubuntu-18.04
variables:
TEST_MESSENGER: true
TEST_FACE_MESSENGER: false
TEST_JAVA_MESSENGER: false
TEST_GITIGNORE: false
strategy:
matrix:
Debug:
ConfigOpts: --no-inline --java=$(JAVA_HOME_12_X64)
TEST_JAVA_MESSENGER: true
TEST_GITIGNORE: true
Release:
ConfigOpts: --no-debug --optimize --java=$(JAVA_HOME_12_X64)
TEST_JAVA_MESSENGER: true
DoMakeInstall: true
Safety:
ConfigOpts: --safety-profile
TEST_MESSENGER: false
SafetyBaseNoBuiltinTopics:
ConfigOpts: --safety-profile=base --no-built-in-topics
TEST_MESSENGER: false
Security:
ConfigOpts: --security --features=versioned_namespace=1
PackageDeps: libxerces-c-dev libssl-dev cmake
TEST_GITIGNORE: true
SecurityWithoutFeatures:
ConfigOpts: >
--security --no-inline --no-debug
--no-built-in-topics --no-content-subscription --no-ownership-profile
--no-object-model-profile --no-persistence-profile
TEST_MESSENGER: false
PackageDeps: libxerces-c-dev libssl-dev cmake
WChar:
ConfigOpts: --features=uses_wchar=1 --no-inline
CLANG5:
ConfigOpts: --compiler=clang++-5.0 --security --std=c++11 --features=uses_wchar=1 --no-inline
PackageDeps: libxerces-c-dev libssl-dev cmake clang-5.0
CLANG6:
ConfigOpts: --compiler=clang++-6.0 --security --std=c++11
PackageDeps: libxerces-c-dev libssl-dev cmake clang-6.0
CLANG10:
ConfigOpts: --compiler=clang++-10 --security --std=c++11
PackageDeps: libxerces-c-dev libssl-dev cmake clang-10
Repo: llvm-toolchain-$(lsb_release -cs)-10
GCC6_CPP03:
ConfigOpts: --compiler=g++-6 --std=c++03
PackageDeps: g++-6
CMakeTestOpts: --skip-cxx11
GCC6:
ConfigOpts: --compiler=g++-6 --xerces --features=uses_wchar=1 --no-debug
PackageDeps: libxerces-c-dev g++-6
GCC8:
ConfigOpts: --compiler=g++-8 --xerces --no-inline --java=$(JAVA_HOME_12_X64)
TEST_JAVA_MESSENGER: true
PackageDeps: libxerces-c-dev g++-8
GCC10:
ConfigOpts: --compiler=g++-10 --xerces --no-inline
TEST_FACE_MESSENGER: true
PackageDeps: libxerces-c-dev g++-10
steps:
- script: |
set -e
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
sudo apt-add-repository "deb http://apt.llvm.org/$(lsb_release -cs)/ $(Repo) main"
displayName: Add repository ($(Repo))
condition: and(succeeded(), ne(variables['Repo'], ''))
- script: |
set -e
sudo apt-get --yes update
sudo apt-get --yes install $(PackageDeps)
displayName: Install system packages
condition: and(succeeded(), ne(variables['PackageDeps'], ''))
- script: |
set -e
./configure -v --mpcopts="-workers 4" --ace-github-latest --tests $(ConfigOpts)
tools/scripts/show_build_config.pl
displayName: Run configure script
- script: make -sj6
displayName: Compile
- script: |
set -e
source setenv.sh
tests/cmake_integration/run_ci_tests.pl $(CMakeTestOpts)
displayName: Compile and run CMake tests
condition: >
and(succeeded(),
not(contains(variables['ConfigOpts'], '--safety-profile')),
not(contains(variables['ConfigOpts'], '--no-ownership-profile')))
- script: |
set -e
source setenv.sh
cd DevGuideExamples/DCPS/Messenger
perl integration_run_test.pl
condition: eq(variables['TEST_MESSENGER'], 'true')
displayName: Run Examples DCPS Messenger
- script: |
set -e
source setenv.sh
cd tests/DCPS/Messenger
perl run_test.pl rtps
condition: eq(variables['TEST_MESSENGER'], 'true')
displayName: Run DCPS Messenger Test
- script: |
set -e
# Make sure install using DESTDIR is also working
export DESTDIR=$(realpath install_temp)
export INSTALL_PREFIX=$(realpath install_prefix)
make install
cp -r $DESTDIR/$INSTALL_PREFIX .
cat << EOF > install_setenv.sh
export OPENDDS_INSTALL_PREFIX=$INSTALL_PREFIX
source \$OPENDDS_INSTALL_PREFIX/share/ace/ace-devel.sh
source \$OPENDDS_INSTALL_PREFIX/share/tao/tao-devel.sh
source \$OPENDDS_INSTALL_PREFIX/share/dds/dds-devel.sh
export PATH="\$OPENDDS_INSTALL_PREFIX/bin:\$PATH"
export LD_LIBRARY_PATH="\$OPENDDS_INSTALL_PREFIX/lib:\$LD_LIBRARY_PATH"
export MPC_ROOT=$(realpath ACE_TAO/ACE/MPC)
export PERL5LIB=$(realpath bin):$(realpath ACE_TAO/ACE/bin)
EOF
displayName: Install OpenDDS
condition: and(succeeded(), ne(variables['DoMakeInstall'], ''))
- script: |
set -e
source install_setenv.sh
cd tests/DCPS/Messenger
git clean -dfx .
$ACE_ROOT/bin/mwc.pl -type gnuace .
make
perl run_test.pl rtps
displayName: Build Messenger Using Installed OpenDDS and MPC
condition: and(succeeded(), ne(variables['DoMakeInstall'], ''))
- script: |
set -e
source install_setenv.sh
cd tests/cmake_integration/Messenger/Messenger_1
rm -fr build
mkdir build
cd build
cmake -DCMAKE_PREFIX_PATH=$OPENDDS_INSTALL_PREFIX ..
cmake --build .
perl run_test.pl rtps
displayName: Build Messenger Using Installed OpenDDS and CMake
condition: and(succeeded(), ne(variables['DoMakeInstall'], ''))
- script: |
set -e
source setenv.sh
cd tests/FACE/Messenger
perl run_test.pl
condition: eq(variables['TEST_FACE_MESSENGER'], 'true')
displayName: Run all FACE Messenger tests
- script: |
set -e
source setenv.sh
cd tests/FACE/Messenger
perl run_test.pl callback
condition: eq(variables['TEST_FACE_MESSENGER'], 'true')
displayName: Run callback FACE Messenger tests
- script: |
set -e
source setenv.sh
cd tests/FACE/Messenger
perl run_test.pl static
condition: eq(variables['TEST_FACE_MESSENGER'], 'true')
displayName: Run static FACE Messenger tests
- script: |
set -e
source setenv.sh
cd tests/FACE/Messenger
perl run_test.pl static callback
condition: eq(variables['TEST_FACE_MESSENGER'], 'true')
displayName: Run static callback FACE Messenger tests
- script: |
set -e
source setenv.sh
cd java/tests/messenger
perl run_test.pl tcp
condition: eq(variables['TEST_JAVA_MESSENGER'], 'true')
displayName: Run tcp JAVA Messenger tests
- script: |
set -e
source setenv.sh
cd java/tests/messenger
perl run_test.pl rtps
condition: eq(variables['TEST_JAVA_MESSENGER'], 'true')
displayName: Run rtps JAVA Messenger tests
- script: |
IFS=$'\n'
FILES=$(git clean -nd -e ext)
for f in $FILES; do
STATUS=1
echo "##vso[task.logissue type=error]" $f
done
exit $STATUS
condition: eq(variables['TEST_GITIGNORE'], 'true')
displayName: Check validity of .gitignore
- job: macOS
timeoutInMinutes: 120
pool:
vmImage: macOS-latest
variables:
TEST_MESSENGER: true
strategy:
maxParallel: 2
matrix:
Debug:
ConfigOpts: --no-inline
Release:
ConfigOpts: --no-debug --optimize
steps:
- script: |
./configure -v --std=c++11 --ace-github-latest --tests $(ConfigOpts)
tools/scripts/show_build_config.pl
displayName: Run configure script
- script: make -sj6
displayName: Compile
- script: >
source setenv.sh &&
tests/cmake_integration/run_ci_tests.pl
displayName: Compile and run CMake tests
- script: |
source setenv.sh
cd DevGuideExamples/DCPS/Messenger
perl integration_run_test.pl
condition: eq(variables['TEST_MESSENGER'], 'true')
displayName: Run Examples DCPS Messenger
- script: |
source setenv.sh
cd tests/DCPS/Messenger
perl run_test.pl all
condition: eq(variables['TEST_MESSENGER'], 'true')
displayName: Run DCPS Messenger Test