This repository has been archived by the owner on Jan 25, 2023. It is now read-only.
forked from weidai11/cryptopp
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
655 lines (646 loc) · 17.2 KB
/
.travis.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
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
# In the YML below each job gets an environment that includes
# BUILD_OS and BUILD_MODE. The variables are used in the driver
# scripts and is used to select a test. For example, BUILD_OS=linux
# and BUILD_MODE=all means run 'make all' on Linux. The Android
# tests specify a ANDROID_API, ANDROID_CPU; and the iOS tests
# specify IOS_SDK and IOS_CPU. They are exported for the underlying
# setenv-*.sh scripts.
# DO NOT create top level (global) keys like env, arch, os, compiler.
# The top level/global keys invoke [unwanted] matrix expansion. Also
# see https://stackoverflow.com/q/58473000/608639 and
# https://docs.travis-ci.com/user/reference/overview/ and
# https://docs.travis-ci.com/user/multi-cpu-architectures and
# https://github.com/travis-ci/travis-yml/blob/master/schema.json.
language: cpp
dist: bionic
git:
depth: 5
# Use jobs rather than matrix since we are precisely
# specifiying our test cases. Do not move any of the
# keys (env, os, arch, compiler, etc) into global.
# Putting them in global invokes the matrix expansion.
jobs:
include:
- name: Standard build, GCC, Linux, amd64
os: linux
arch: amd64
compiler: gcc
env:
- BUILD_OS=linux
- BUILD_MODE=all
- name: Native build, GCC, Linux, amd64
os: linux
arch: amd64
compiler: gcc
env:
- BUILD_OS=linux
- BUILD_MODE=native
- name: No-asm build, GCC, Linux, amd64
os: linux
arch: amd64
compiler: gcc
env:
- BUILD_OS=linux
- BUILD_MODE=no-asm
- name: Debug build, GCC, Linux, amd64
os: linux
arch: amd64
compiler: gcc
env:
- BUILD_OS=linux
- BUILD_MODE=debug
- name: Asan build, GCC, Linux, amd64
os: linux
arch: amd64
compiler: gcc
env:
- BUILD_OS=linux
- BUILD_MODE=asan
- name: UBsan build, GCC, Linux, amd64
os: linux
arch: amd64
compiler: gcc
env:
- BUILD_OS=linux
- BUILD_MODE=ubsan
- name: PEM build, GCC, Linux, amd64
os: linux
arch: amd64
compiler: gcc
env:
- BUILD_OS=linux
- BUILD_MODE=pem
- name: Autotools build, GCC, Linux, amd64
os: linux
arch: amd64
compiler: gcc
env:
- BUILD_OS=linux
- BUILD_MODE=autotools
- name: CMake build, GCC, Linux, amd64
os: linux
arch: amd64
compiler: gcc
env:
- BUILD_OS=linux
- BUILD_MODE=cmake
- name: Standard build, Clang, Linux, amd64
os: linux
arch: amd64
compiler: clang
env:
- BUILD_OS=linux
- BUILD_MODE=all
- name: Native build, Clang, Linux, amd64
os: linux
arch: amd64
compiler: clang
env:
- BUILD_OS=linux
- BUILD_MODE=native
- name: No-asm build, Clang, Linux, amd64
os: linux
arch: amd64
compiler: clang
env:
- BUILD_OS=linux
- BUILD_MODE=no-asm
- name: Debug build, Clang, Linux, amd64
os: linux
arch: amd64
compiler: clang
env:
- BUILD_OS=linux
- BUILD_MODE=debug
- name: Asan build, Clang, Linux, amd64
os: linux
arch: amd64
compiler: clang
env:
- BUILD_OS=linux
- BUILD_MODE=asan
- name: UBsan build, Clang, Linux, amd64
os: linux
arch: amd64
compiler: clang
env:
- BUILD_OS=linux
- BUILD_MODE=ubsan
- name: PEM build, Clang, Linux, amd64
os: linux
arch: amd64
compiler: clang
env:
- BUILD_OS=linux
- BUILD_MODE=pem
- name: Autotools build, Clang, Linux, amd64
os: linux
arch: amd64
compiler: clang
env:
- BUILD_OS=linux
- BUILD_MODE=autotools
- name: CMake build, Clang, Linux, amd64
os: linux
arch: amd64
compiler: clang
env:
- BUILD_OS=linux
- BUILD_MODE=cmake
- name: Standard build, Clang, OS X, amd64
os: osx
osx_image: xcode10.1
arch: amd64
compiler: clang
env:
- BUILD_OS=osx
- BUILD_MODE=all
- name: Standard build (64-bit), Clang, OS X, amd64
os: osx
osx_image: xcode10.1
arch: amd64
compiler: clang
env:
- CXXFLAGS="-DNDEBUG -g2 -O3 -arch x86_64"
- BUILD_OS=osx
- BUILD_MODE=all
- name: Standard build (32-bit), Clang, OS X, amd64
os: osx
osx_image: xcode10.1
arch: amd64
compiler: clang
env:
- CXXFLAGS="-DNDEBUG -g2 -O3 -arch i386"
- BUILD_OS=osx
- BUILD_MODE=all
- name: Standard build (fat), Clang, OS X, amd64
os: osx
osx_image: xcode10.1
arch: amd64
compiler: clang
env:
- CXXFLAGS="-DNDEBUG -g2 -O3 -arch i386 -arch x86_64"
- BUILD_OS=osx
- BUILD_MODE=osx-fat
- name: Native build, Clang, OS X, amd64
os: osx
osx_image: xcode10.1
arch: amd64
compiler: clang
env:
- BUILD_OS=osx
- BUILD_MODE=native
- name: No-asm build, Clang, OS X, amd64
os: osx
osx_image: xcode10.1
arch: amd64
compiler: clang
env:
- BUILD_OS=osx
- BUILD_MODE=no-asm
- name: Debug build, Clang, OS X, amd64
os: osx
osx_image: xcode10.1
arch: amd64
compiler: clang
env:
- BUILD_OS=osx
- BUILD_MODE=debug
- name: Asan build, Clang, OS X, amd64
os: osx
osx_image: xcode10.1
arch: amd64
compiler: clang
env:
- BUILD_OS=osx
- BUILD_MODE=asan
- name: UBsan build, Clang, OS X, amd64
os: osx
osx_image: xcode10.1
arch: amd64
compiler: clang
env:
- BUILD_OS=osx
- BUILD_MODE=ubsan
- name: PEM build, Clang, OS X, amd64
os: osx
osx_image: xcode10.1
arch: amd64
compiler: clang
env:
- BUILD_OS=osx
- BUILD_MODE=pem
- name: Autotools build, Clang, OS X, amd64
os: osx
osx_image: xcode10.1
arch: amd64
compiler: clang
env:
- BUILD_OS=osx
- BUILD_MODE=autotools
- name: CMake build, Clang, OS X, amd64
os: osx
osx_image: xcode10.1
arch: amd64
compiler: clang
env:
- BUILD_OS=osx
- BUILD_MODE=cmake
- name: Standard build, GCC, Linux, arm64
os: linux
arch: arm64
compiler: gcc
dist: bionic
env:
- BUILD_OS=linux
- BUILD_MODE=all
- name: Native build, GCC, Linux, arm64
os: linux
arch: arm64
compiler: gcc
dist: bionic
env:
- BUILD_OS=linux
- BUILD_MODE=native
- name: No-asm build, GCC, Linux, arm64
os: linux
arch: arm64
compiler: gcc
dist: bionic
env:
- BUILD_OS=linux
- BUILD_MODE=no-asm
- name: Debug build, GCC, Linux, arm64
os: linux
arch: arm64
compiler: gcc
dist: bionic
env:
- BUILD_OS=linux
- BUILD_MODE=debug
- name: Asan build, GCC, Linux, arm64
os: linux
arch: arm64
compiler: gcc
dist: bionic
env:
- BUILD_OS=linux
- BUILD_MODE=asan
- name: UBsan build, GCC, Linux, arm64
os: linux
arch: arm64
compiler: gcc
dist: bionic
env:
- BUILD_OS=linux
- BUILD_MODE=ubsan
- name: PEM build, GCC, Linux, arm64
os: linux
arch: arm64
compiler: gcc
dist: bionic
env:
- BUILD_OS=linux
- BUILD_MODE=pem
- name: Autotools build, GCC, Linux, arm64
os: linux
arch: arm64
compiler: gcc
dist: bionic
env:
- BUILD_OS=linux
- BUILD_MODE=autotools
- name: CMake build, GCC, Linux, arm64
os: linux
arch: arm64
compiler: gcc
dist: bionic
env:
- BUILD_OS=linux
- BUILD_MODE=cmake
- name: Standard build, Clang, Linux, arm64
os: linux
arch: arm64
compiler: clang
dist: bionic
env:
- BUILD_OS=linux
- BUILD_MODE=all
- name: Native build, Clang, Linux, arm64
os: linux
arch: arm64
compiler: clang
dist: bionic
env:
- BUILD_OS=linux
- BUILD_MODE=native
- name: No-asm build, Clang, Linux, arm64
os: linux
arch: arm64
compiler: clang
dist: bionic
env:
- BUILD_OS=linux
- BUILD_MODE=no-asm
- name: Debug build, Clang, Linux, arm64
os: linux
arch: arm64
compiler: clang
dist: bionic
env:
- BUILD_OS=linux
- BUILD_MODE=debug
- name: Asan build, Clang, Linux, arm64
os: linux
arch: arm64
compiler: clang
dist: bionic
env:
- BUILD_OS=linux
- BUILD_MODE=asan
- name: UBsan build, Clang, Linux, arm64
os: linux
arch: arm64
compiler: clang
dist: bionic
env:
- BUILD_OS=linux
- BUILD_MODE=ubsan
- name: PEM build, Clang, Linux, arm64
os: linux
arch: arm64
compiler: clang
dist: bionic
env:
- BUILD_OS=linux
- BUILD_MODE=pem
- name: Autotools build, Clang, Linux, arm64
os: linux
arch: arm64
compiler: clang
dist: bionic
env:
- BUILD_OS=linux
- BUILD_MODE=autotools
- name: CMake build, Clang, Linux, arm64
os: linux
arch: arm64
compiler: clang
dist: bionic
env:
- BUILD_OS=linux
- BUILD_MODE=cmake
- name: Standard build, GCC, Linux, ppc64le
os: linux
arch: ppc64le
compiler: gcc
dist: bionic
env:
- BUILD_OS=linux
- BUILD_MODE=all
- name: Debug build, GCC, Linux, ppc64le
os: linux
arch: ppc64le
compiler: gcc
env:
- BUILD_OS=linux
- BUILD_MODE=debug
- name: Standard build, Clang, Linux, ppc64le
os: linux
arch: ppc64le
compiler: clang
dist: bionic
env:
- BUILD_OS=linux
- BUILD_MODE=all
- CC=clang-8
- CXX=clang++-8
- name: Debug build, Clang, Linux, ppc64le
os: linux
arch: ppc64le
compiler: clang
dist: bionic
env:
- BUILD_OS=linux
- BUILD_MODE=debug
- CC=clang-8
- CXX=clang++-8
- name: Standard build, GCC, Linux, s390x
os: linux
arch: s390x
compiler: gcc
dist: bionic
env:
- BUILD_OS=linux
- BUILD_MODE=all
- name: Debug build, GCC, Linux, s390x
os: linux
arch: s390x
compiler: gcc
env:
- BUILD_OS=linux
- BUILD_MODE=debug
- name: Standard build, Clang, Linux, s390x
os: linux
arch: s390x
compiler: clang
dist: bionic
env:
- BUILD_OS=linux
- BUILD_MODE=all
- CC=clang-8
- CXX=clang++-8
- name: Debug build, Clang, Linux, s390x
os: linux
arch: s390x
compiler: clang
dist: bionic
env:
- BUILD_OS=linux
- BUILD_MODE=debug
- CC=clang-8
- CXX=clang++-8
- name: Android, armv7a, Linux
os: linux
arch: amd64
env:
- BUILD_OS=linux
- BUILD_MODE=android
- ANDROID_CPU=armv7a
- ANDROID_API=23
- ANDROID_SDK_ROOT="$HOME/android-sdk"
- ANDROID_NDK_ROOT="$HOME/android-ndk"
- name: Android, aarch64, Linux
os: linux
arch: amd64
env:
- BUILD_OS=linux
- BUILD_MODE=android
- ANDROID_CPU=aarch64
- ANDROID_API=23
- ANDROID_SDK_ROOT="$HOME/android-sdk"
- ANDROID_NDK_ROOT="$HOME/android-ndk"
- name: Android, x86, Linux
os: linux
arch: amd64
env:
- BUILD_OS=linux
- BUILD_MODE=android
- ANDROID_CPU=x86
- ANDROID_API=23
- ANDROID_SDK_ROOT="$HOME/android-sdk"
- ANDROID_NDK_ROOT="$HOME/android-ndk"
- name: Android, x86_64, Linux
os: linux
arch: amd64
env:
- BUILD_OS=linux
- BUILD_MODE=android
- ANDROID_CPU=x86_64
- ANDROID_API=23
- ANDROID_SDK_ROOT="$HOME/android-sdk"
- ANDROID_NDK_ROOT="$HOME/android-ndk"
- name: iPhoneOS, armv7, iOS
os: osx
osx_image: xcode10.1
arch: amd64
env:
- BUILD_OS=osx
- BUILD_MODE=ios
- IOS_CPU=armv7s
- IOS_SDK=iPhoneOS
- name: iPhoneOS, arm64, iOS
os: osx
osx_image: xcode10.1
arch: amd64
env:
- BUILD_OS=osx
- BUILD_MODE=ios
- IOS_CPU=arm64
- IOS_SDK=iPhoneOS
- name: AppleTVOS, arm64, iOS
os: osx
osx_image: xcode10.1
arch: amd64
env:
- BUILD_OS=osx
- BUILD_MODE=ios
- IOS_CPU=arm64
- IOS_SDK=AppleTVOS
- name: WatchOS, armv7, iOS
os: osx
osx_image: xcode10.1
arch: amd64
env:
- BUILD_OS=osx
- BUILD_MODE=ios
- IOS_CPU=armv7k
- IOS_SDK=WatchOS
- name: iPhoneSimulator, i386, OS X
os: osx
osx_image: xcode10.1
arch: amd64
env:
- BUILD_OS=osx
- BUILD_MODE=ios
- IOS_CPU=i386
- IOS_SDK=iPhoneSimulator
- name: iPhoneSimulator, x86_64, OS X
os: osx
osx_image: xcode10.1
arch: amd64
env:
- BUILD_OS=osx
- BUILD_MODE=ios
- IOS_CPU=x86_64
- IOS_SDK=iPhoneSimulator
- name: AppleTVSimulator, x86_64, OS X
os: osx
osx_image: xcode10.1
arch: amd64
env:
- BUILD_OS=osx
- BUILD_MODE=ios
- IOS_CPU=x86_64
- IOS_SDK=AppleTVSimulator
- name: WatchSimulator, i386, OS X
os: osx
osx_image: xcode10.1
arch: amd64
env:
- BUILD_OS=osx
- BUILD_MODE=ios
- IOS_CPU=i386
- IOS_SDK=WatchSimulator
allow_failures:
# Clang has a fair amount of trouble
# on platforms Apple does not support
- os: linux
arch: s390x
compiler: clang
# Clang 7.0 and below will likely have trouble on ppc64le
# due to https://bugs.llvm.org/show_bug.cgi?id=39704.
- os: linux
arch: ppc64le
compiler: clang
before_install:
- |
if [[ "$BUILD_OS" == "linux" ]] && [[ "$BUILD_MODE" == "android" ]]; then
# https://github.com/travis-ci/travis-ci/issues/9037
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A145
sudo apt-get -qq -y update
bash TestScripts/install-ndk.sh
fi
if [[ "$BUILD_OS" == "linux" ]] && [[ "$BUILD_MODE" == "autotools" ]]; then
# https://github.com/travis-ci/travis-ci/issues/9037
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A145
sudo apt-get -qq -y install autoconf automake libtool
fi
# Clang 7 compiler is completely broken on PPC64 and s390x
if [[ "$TRAVIS_CPU_ARCH" == "ppc64le" ]] || [[ "$TRAVIS_CPU_ARCH" == "s390x" ]]; then
if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ "$TRAVIS_COMPILER" == "clang" ]]; then
# https://github.com/travis-ci/travis-ci/issues/9037
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A145
sudo apt-get -qq -y install --no-install-recommends clang-8
fi
fi
script:
- |
if [[ "$BUILD_MODE" == "ios" ]]; then
source TestScripts/setenv-ios.sh
make -f GNUmakefile-cross -j 2 all static dynamic
elif [[ "$BUILD_MODE" == "android" ]]; then
source TestScripts/setenv-android.sh
make -f GNUmakefile-cross -j 2 all static dynamic
elif [[ "$BUILD_MODE" == "autotools" ]]; then
bash TestScripts/cryptest-autotools.sh
elif [[ "$BUILD_MODE" == "cmake" ]]; then
bash TestScripts/cryptest-cmake.sh
elif [[ "$BUILD_MODE" == "pem" ]]; then
bash TestScripts/cryptest-pem.sh
elif [[ "$BUILD_MODE" == "osx-fat" ]]; then
CXXFLAGS="-DNDEBUG -g2 -O3 -arch i386 -arch x86_64" make -j 2
arch -i386 ./cryptest.exe v
arch -i386 ./cryptest.exe tv all
arch -x86_64 ./cryptest.exe v
arch -x86_64 ./cryptest.exe tv all
elif [[ "$BUILD_MODE" == "debug" ]]; then
CXXFLAGS="-DDEBUG -g2 -O1" make -j 2
./cryptest.exe v
./cryptest.exe tv all
else
make "$BUILD_MODE" -j 2
./cryptest.exe v
./cryptest.exe tv all
fi
# Whitelist branches to avoid testing feature branches twice
branches:
only:
- master
- /\/ci$/
notifications:
email:
recipients:
on_success: always # default: change
on_failure: always # default: always