|
1 | | -language: c |
| 1 | +############################################################################# |
| 2 | +# # |
| 3 | +# Travis-ci test-suite for LibTomMath # |
| 4 | +# (https://github.com/libtom/libtommath.git) # |
| 5 | +# # |
| 6 | +############################################################################# |
2 | 7 |
|
3 | | -install: |
4 | | - - sudo apt-get update -qq |
5 | | - - sudo apt-get install gcc-multilib |
| 8 | +# Run the tests based on Ubuntu 16.04 |
| 9 | +dist: xenial |
6 | 10 |
|
7 | | -matrix: |
8 | | - fast_finish: true |
| 11 | +# Compilation failures are in gcc_errors_*.log |
| 12 | +# Failed tests in test_*.log |
| 13 | +# Files do not exist in case of success |
| 14 | +after_failure: |
| 15 | + - cat test_*.log |
| 16 | + - cat valgrind_test.log |
| 17 | + - cat gcc_errors_*.log |
| 18 | + |
| 19 | +# In case of a Travis error a success might get signaled |
| 20 | +# even without any test run. This file also keeps any notes |
| 21 | +# printed from the tests which might come handy from time |
| 22 | +# to time. |
| 23 | +# Valgrid will print its output to stderr which will not show up |
| 24 | +# in test_*.log. testme.sh accepts one additional option to |
| 25 | +# valgrind and "--valgrind-options=--log-fd=1" sends the output |
| 26 | +# of Valgrind to stdout instead. |
| 27 | +after_success: |
| 28 | + - cat test_*.log |
| 29 | + |
| 30 | +# Tests restricted to the following branches of LTM. |
9 | 31 | branches: |
10 | 32 | only: |
11 | 33 | - master |
12 | 34 | - develop |
13 | | - - /^release\/.*$/ |
| 35 | + - /^release/ |
| 36 | + - /^travis/ |
14 | 37 |
|
15 | | -compiler: |
16 | | - - gcc |
17 | | - - clang |
18 | | -script: |
19 | | - - ./testme.sh --with-cc=$CC ${BUILDOPTIONS} |
20 | | -env: |
21 | | - - | |
22 | | - BUILDOPTIONS="--test-vs-mtest=333333" |
23 | | - - | |
24 | | - BUILDOPTIONS="--test-vs-mtest=333333 --mtest-real-rand" |
25 | | - - | |
26 | | - BUILDOPTIONS="--with-low-mp" |
27 | | - - | |
28 | | - BUILDOPTIONS="--with-m64 --with-m32 --with-mx32" |
| 38 | +# Additional installs: Valgrind for memory tests. |
| 39 | +install: |
| 40 | + - sudo apt-get update -qq |
| 41 | + - sudo apt-get install valgrind |
| 42 | + - apt-cache search gcc | grep '^gcc-[0-9\.]* ' |
| 43 | + - apt-cache search clang | grep compiler |
29 | 44 |
|
30 | | -after_failure: |
31 | | - - cat test_*.log |
32 | | - - cat gcc_errors_*.log |
| 45 | +# The language is C and it will load the respective dependencies |
| 46 | +language: c |
33 | 47 |
|
| 48 | +# The actual workspace. Will run the individual jobs in parallel |
| 49 | +# which also means that the jobs must be able to run in parallel. |
| 50 | +# Either specify sets which will be combined or, as in this case, |
| 51 | +# specify all builds individually. The number of jobs is currently |
| 52 | +# restricted to 200 jobs at most. |
| 53 | +matrix: |
| 54 | + # Will mark as finished if all of the remaining tests are allowed to fail |
| 55 | + # or one test has failed already. |
| 56 | + fast_finish: true |
| 57 | + |
| 58 | + # The individual jobs |
| 59 | + include: |
| 60 | + # The environment given to the programs in the build |
| 61 | + # We have only one program and the variable $BUILDOPTIONS |
| 62 | + # has only the options to that program: testme.sh |
| 63 | + |
| 64 | + # Check source code format |
| 65 | + - env: BUILDOPTIONS='--format' |
| 66 | + addons: |
| 67 | + apt: |
| 68 | + packages: |
| 69 | + - astyle |
| 70 | + |
| 71 | + # Run always with valgrind (no sanitizer, but debug info) |
| 72 | + - env: COMPILE_DEBUG=1 BUILDOPTIONS='--with-cc=gcc-4.9 --with-m64 --with-valgrind' |
| 73 | + addons: |
| 74 | + apt: |
| 75 | + packages: |
| 76 | + - gcc-4.9 |
| 77 | + |
| 78 | + # GCC for the 32-bit architecture (no valgrind) |
| 79 | + - env: BUILDOPTIONS='--with-cc=gcc-5 --with-m32' |
| 80 | + addons: |
| 81 | + apt: |
| 82 | + packages: |
| 83 | + - libc6-dev-i386 |
| 84 | + - gcc-multilib |
| 85 | + |
| 86 | + # clang for the 32-bit architecture (no valgrind) |
| 87 | + - env: BUILDOPTIONS='--with-cc=clang-7 --with-m32' |
| 88 | + addons: |
| 89 | + apt: |
| 90 | + packages: |
| 91 | + - libc6-dev-i386 |
| 92 | + - gcc-multilib |
| 93 | + |
| 94 | + # RSA superclass with tests (no sanitizer, but debug info) |
| 95 | + - env: COMPILE_DEBUG=1 BUILDOPTIONS='--with-cc=gcc-5 --with-m64 --cflags=-DLTM_NOTHING --cflags=-DSC_RSA_1_WITH_TESTS --with-travis-valgrind' |
| 96 | + |
| 97 | + # Test "autotuning", the automatic evaluation and setting of the Toom-Cook cut-offs. |
| 98 | + #- env: SANITIZER=1 BUILDOPTIONS='--with-cc=gcc-5 --cflags=-DMP_16BIT --with-travis-valgrind --make-option=tune' |
| 99 | + #- env: SANITIZER=1 BUILDOPTIONS='--with-cc=gcc-5 --cflags=-DMP_32BIT --with-travis-valgrind --make-option=tune' |
| 100 | + #- env: SANITIZER=1 BUILDOPTIONS='--with-cc=gcc-5 --with-travis-valgrind --make-option=tune' |
| 101 | + #- env: SANITIZER=1 BUILDOPTIONS='--with-cc=clang-7 --cflags=-DMP_16BIT --with-travis-valgrind --make-option=tune' |
| 102 | + #- env: SANITIZER=1 BUILDOPTIONS='--with-cc=clang-7 --cflags=-DMP_32BIT --with-travis-valgrind --make-option=tune' |
| 103 | + - env: SANITIZER=1 BUILDOPTIONS='--with-cc=clang-7 --with-travis-valgrind --make-option=tune' |
| 104 | + |
| 105 | + # GCC for the x86-64 architecture testing against a different Bigint-implementation |
| 106 | + # with 333333 different inputs. |
| 107 | + #- env: BUILDOPTIONS='--with-cc=gcc-5 --test-vs-mtest=333333 --with-travis-valgrind' |
| 108 | + # ... and a better random source. |
| 109 | + - env: BUILDOPTIONS='--with-cc=gcc-5 --test-vs-mtest=333333 --mtest-real-rand --with-travis-valgrind' |
| 110 | + |
| 111 | + # clang for the x86-64 architecture testing against a different Bigint-implementation |
| 112 | + # with 333333 different inputs |
| 113 | + - env: BUILDOPTIONS='--with-cc=clang-7 --test-vs-mtest=333333 --with-travis-valgrind' |
| 114 | + # ... and a better random source. |
| 115 | + #- env: BUILDOPTIONS='--with-cc=clang-7 --test-vs-mtest=333333 --mtest-real-rand --with-travis-valgrind' |
| 116 | + |
| 117 | + # GCC for the x64_32 architecture (32-bit longs and 32-bit pointers) |
| 118 | + # TODO: Probably not possible to run anything in x32 in Travis |
| 119 | + # but needs to be checked to be sure. |
| 120 | + - env: SANITIZER=1 BUILDOPTIONS='--with-cc=gcc-5 --with-mx32' |
| 121 | + addons: |
| 122 | + apt: |
| 123 | + packages: |
| 124 | + - libc6-dev-x32 |
| 125 | + - gcc-multilib |
| 126 | + |
| 127 | + # GCC for the x86-64 architecture (64-bit longs and 64-bit pointers) |
| 128 | + - env: SANITIZER=1 BUILDOPTIONS='--with-cc=gcc-5 --with-m64 --with-travis-valgrind' |
| 129 | + - env: BUILDOPTIONS='--with-cc=gcc-4.7 --with-m64 --with-travis-valgrind' |
| 130 | + addons: |
| 131 | + apt: |
| 132 | + packages: |
| 133 | + - gcc-4.7 |
| 134 | + - env: BUILDOPTIONS='--with-cc=gcc-4.8 --with-m64 --with-travis-valgrind' |
| 135 | + addons: |
| 136 | + apt: |
| 137 | + packages: |
| 138 | + - gcc-4.8 |
| 139 | + |
| 140 | + # clang for x86-64 architecture (64-bit longs and 64-bit pointers) |
| 141 | + - env: SANITIZER=1 CONV_WARNINGS=relaxed BUILDOPTIONS='--with-cc=clang-7 --with-m64 --with-travis-valgrind' |
| 142 | + - env: SANITIZER=1 CONV_WARNINGS=strict BUILDOPTIONS='--with-cc=clang-7 --with-m64 --with-travis-valgrind' |
| 143 | + - env: SANITIZER=1 BUILDOPTIONS='--with-cc=clang-6.0 --with-m64 --with-travis-valgrind' |
| 144 | + addons: |
| 145 | + apt: |
| 146 | + packages: |
| 147 | + - clang-6.0 |
| 148 | + - env: SANITIZER=1 BUILDOPTIONS='--with-cc=clang-5.0 --with-m64 --with-travis-valgrind' |
| 149 | + addons: |
| 150 | + apt: |
| 151 | + packages: |
| 152 | + - clang-5.0 |
| 153 | + - env: BUILDOPTIONS='--with-cc=clang-4.0 --with-m64 --with-travis-valgrind' |
| 154 | + addons: |
| 155 | + apt: |
| 156 | + packages: |
| 157 | + - clang-4.0 |
| 158 | + |
| 159 | + # GCC for the x86-64 architecture with restricted limb sizes |
| 160 | + # formerly started with the option "--with-low-mp" to testme.sh |
| 161 | + # but testing all three in one run took to long and timed out. |
| 162 | + - env: SANITIZER=1 BUILDOPTIONS='--with-cc=gcc-5 --cflags=-DMP_16BIT --with-travis-valgrind' |
| 163 | + - env: SANITIZER=1 BUILDOPTIONS='--with-cc=gcc-5 --cflags=-DMP_32BIT --with-travis-valgrind' |
| 164 | + |
| 165 | + # clang for the x86-64 architecture with restricted limb sizes |
| 166 | + - env: SANITIZER=1 BUILDOPTIONS='--with-cc=clang-7 --cflags=-DMP_16BIT --with-travis-valgrind' |
| 167 | + - env: SANITIZER=1 BUILDOPTIONS='--with-cc=clang-7 --cflags=-DMP_32BIT --with-travis-valgrind' |
| 168 | + |
| 169 | +# Notifications go to |
| 170 | +# An email address is also possible. |
34 | 171 | notifications: |
35 | 172 | irc: "chat.freenode.net#libtom-notifications" |
| 173 | + |
| 174 | +# The actual script the jobs run. |
| 175 | +# Because of a default timeout of 10 minutes it was necessary to use |
| 176 | +# a Travis tool to extend that timeout to 40 minutes. 50 minutes |
| 177 | +# seem to be the max and 20 the default if travis_wait is called without |
| 178 | +# any options. |
| 179 | +script: |
| 180 | + - ./testme.sh ${BUILDOPTIONS} |
0 commit comments