]> Git Repo - secp256k1.git/blob - .travis.yml
Merge #722: Context isn't freed in the ECDH benchmark
[secp256k1.git] / .travis.yml
1 language: c
2 os: linux
3 addons:
4   apt:
5     packages:
6       - libgmp-dev
7       - valgrind
8       - libtool-bin
9 compiler:
10   - clang
11   - gcc
12 env:
13   global:
14     - FIELD=auto  BIGNUM=auto  SCALAR=auto  ENDOMORPHISM=no  STATICPRECOMPUTATION=yes  ECMULTGENPRECISION=auto  ASM=no  BUILD=check  EXTRAFLAGS=  HOST=  ECDH=no  RECOVERY=no  EXPERIMENTAL=no CTIMETEST=yes BENCH=yes SECP256K1_BENCH_ITERS=2
15   matrix:
16     - SCALAR=32bit    RECOVERY=yes
17     - SCALAR=32bit    FIELD=32bit       ECDH=yes  EXPERIMENTAL=yes
18     - SCALAR=64bit
19     - FIELD=64bit     RECOVERY=yes
20     - FIELD=64bit     ENDOMORPHISM=yes
21     - FIELD=64bit     ENDOMORPHISM=yes  ECDH=yes EXPERIMENTAL=yes
22     - FIELD=64bit                       ASM=x86_64
23     - FIELD=64bit     ENDOMORPHISM=yes  ASM=x86_64
24     - FIELD=32bit     ENDOMORPHISM=yes
25     - BIGNUM=no
26     - BIGNUM=no       ENDOMORPHISM=yes RECOVERY=yes EXPERIMENTAL=yes
27     - BIGNUM=no       STATICPRECOMPUTATION=no
28     - BUILD=distcheck CTIMETEST= BENCH=
29     - EXTRAFLAGS=CPPFLAGS=-DDETERMINISTIC
30     - EXTRAFLAGS=CFLAGS=-O0
31     - ECMULTGENPRECISION=2
32     - ECMULTGENPRECISION=8
33 matrix:
34   fast_finish: true
35   include:
36     - compiler: clang
37       env: HOST=i686-linux-gnu ENDOMORPHISM=yes
38       addons:
39         apt:
40           packages:
41             - gcc-multilib
42             - libgmp-dev:i386
43             - valgrind
44             - libtool-bin
45             - libc6-dbg:i386
46     - compiler: clang
47       env: HOST=i686-linux-gnu
48       addons:
49         apt:
50           packages:
51             - gcc-multilib
52             - valgrind
53             - libtool-bin
54             - libc6-dbg:i386
55     - compiler: gcc
56       env: HOST=i686-linux-gnu ENDOMORPHISM=yes
57       addons:
58         apt:
59           packages:
60             - gcc-multilib
61             - valgrind
62             - libtool-bin
63             - libc6-dbg:i386
64     - compiler: gcc
65       env: HOST=i686-linux-gnu
66       addons:
67         apt:
68           packages:
69             - gcc-multilib
70             - libgmp-dev:i386
71             - valgrind
72             - libtool-bin
73             - libc6-dbg:i386
74     - compiler: gcc
75       env:
76         - BIGNUM=no  ENDOMORPHISM=yes  ASM=x86_64 EXPERIMENTAL=yes ECDH=yes  RECOVERY=yes
77         - VALGRIND=yes EXTRAFLAGS="--disable-openssl-tests CPPFLAGS=-DVALGRIND" BUILD=
78     - compiler: gcc
79       env: # The same as above but without endomorphism.
80         - BIGNUM=no  ENDOMORPHISM=no  ASM=x86_64 EXPERIMENTAL=yes ECDH=yes  RECOVERY=yes
81         - VALGRIND=yes EXTRAFLAGS="--disable-openssl-tests CPPFLAGS=-DVALGRIND" BUILD=
82
83 before_script: ./autogen.sh
84
85 script:
86  - if [ -n "$HOST" ]; then export USE_HOST="--host=$HOST"; fi
87  - if [ "x$HOST" = "xi686-linux-gnu" ]; then export CC="$CC -m32"; fi
88  - ./configure --enable-experimental=$EXPERIMENTAL --enable-endomorphism=$ENDOMORPHISM --with-field=$FIELD --with-bignum=$BIGNUM --with-asm=$ASM --with-scalar=$SCALAR --enable-ecmult-static-precomputation=$STATICPRECOMPUTATION --with-ecmult-gen-precision=$ECMULTGENPRECISION --enable-module-ecdh=$ECDH --enable-module-recovery=$RECOVERY $EXTRAFLAGS $USE_HOST
89  - if [ -n "$BUILD" ]; then make -j2 $BUILD; fi
90  - # travis_wait extends the 10 minutes without output allowed (https://docs.travis-ci.com/user/common-build-problems/#build-times-out-because-no-output-was-received)
91  - # the `--error-exitcode` is required to make the test fail if valgrind found errors, otherwise it'll return 0 (http://valgrind.org/docs/manual/manual-core.html)
92  - if [ -n "$VALGRIND" ]; then
93    make -j2 &&
94    travis_wait 30 valgrind --error-exitcode=42 ./tests 16 &&
95    travis_wait 30 valgrind --error-exitcode=42 ./exhaustive_tests;
96    fi
97  - if [ -n "$BENCH" ]; then
98      if [ -n "$VALGRIND" ]; then EXEC='libtool --mode=execute valgrind --error-exitcode=42'; else EXEC= ; fi &&
99      $EXEC ./bench_ecmult &>> bench.log && $EXEC ./bench_internal &>> bench.log && $EXEC ./bench_sign &>> bench.log && $EXEC ./bench_verify &>> bench.log &&
100      if [ "$RECOVERY" == "yes" ]; then $EXEC ./bench_recover &>> bench.log; fi &&
101      if [ "$ECDH" == "yes" ]; then $EXEC ./bench_ecdh &>> bench.log; fi;
102    fi
103  - if [ -n "$CTIMETEST" ]; then
104    libtool --mode=execute valgrind  ./valgrind_ctime_test &> valgrind_ctime_test.log;
105    fi
106
107 after_script:
108     - cat ./tests.log
109     - cat ./exhaustive_tests.log
110     - cat ./valgrind_ctime_test.log
111     - cat ./bench.log
This page took 0.029488 seconds and 4 git commands to generate.