]> Git Repo - secp256k1.git/blob - .travis.yml
Merge #813: Enable configuring Valgrind support
[secp256k1.git] / .travis.yml
1 language: c
2 os:
3   - linux
4   - osx
5
6 dist: bionic
7 # Valgrind currently supports upto macOS 10.13, the latest xcode of that version is 10.1
8 osx_image: xcode10.1
9 addons:
10   apt:
11     packages:
12       - libgmp-dev
13       - valgrind
14       - libtool-bin
15 compiler:
16   - clang
17   - gcc
18 env:
19   global:
20     - WIDEMUL=auto  BIGNUM=auto  ENDOMORPHISM=no  STATICPRECOMPUTATION=yes  ECMULTGENPRECISION=auto  ASM=no  BUILD=check  EXTRAFLAGS=  HOST=  ECDH=no  RECOVERY=no SCHNORRSIG=no EXPERIMENTAL=no CTIMETEST=yes BENCH=yes ITERS=2
21   matrix:
22     - WIDEMUL=int64   RECOVERY=yes
23     - WIDEMUL=int64   ECDH=yes  EXPERIMENTAL=yes SCHNORRSIG=yes
24     - WIDEMUL=int64   ENDOMORPHISM=yes
25     - WIDEMUL=int128
26     - WIDEMUL=int128  RECOVERY=yes EXPERIMENTAL=yes SCHNORRSIG=yes
27     - WIDEMUL=int128  ENDOMORPHISM=yes
28     - WIDEMUL=int128  ENDOMORPHISM=yes  ECDH=yes EXPERIMENTAL=yes SCHNORRSIG=yes
29     - WIDEMUL=int128                    ASM=x86_64
30     - WIDEMUL=int128  ENDOMORPHISM=yes  ASM=x86_64
31     - BIGNUM=no
32     - BIGNUM=no       ENDOMORPHISM=yes RECOVERY=yes EXPERIMENTAL=yes SCHNORRSIG=yes
33     - BIGNUM=no       STATICPRECOMPUTATION=no
34     - BUILD=distcheck CTIMETEST=no BENCH=no
35     - CPPFLAGS=-DDETERMINISTIC
36     - CFLAGS=-O0 CTIMETEST=no
37     - ECMULTGENPRECISION=2
38     - ECMULTGENPRECISION=8
39     - VALGRIND=yes ENDOMORPHISM=yes BIGNUM=no ASM=x86_64 EXPERIMENTAL=yes ECDH=yes  RECOVERY=yes EXTRAFLAGS="--disable-openssl-tests" CPPFLAGS=-DVALGRIND BUILD=
40     - VALGRIND=yes                  BIGNUM=no ASM=x86_64 EXPERIMENTAL=yes ECDH=yes  RECOVERY=yes EXTRAFLAGS="--disable-openssl-tests" CPPFLAGS=-DVALGRIND BUILD=
41 matrix:
42   fast_finish: true
43   include:
44     - compiler: clang
45       os: linux
46       env: HOST=i686-linux-gnu ENDOMORPHISM=yes
47       addons:
48         apt:
49           packages:
50             - gcc-multilib
51             - libgmp-dev:i386
52             - valgrind
53             - libtool-bin
54             - libc6-dbg:i386
55     - compiler: clang
56       env: HOST=i686-linux-gnu
57       os: linux
58       addons:
59         apt:
60           packages:
61             - gcc-multilib
62             - valgrind
63             - libtool-bin
64             - libc6-dbg:i386
65     - compiler: gcc
66       env: HOST=i686-linux-gnu ENDOMORPHISM=yes
67       os: linux
68       addons:
69         apt:
70           packages:
71             - gcc-multilib
72             - valgrind
73             - libtool-bin
74             - libc6-dbg:i386
75     - compiler: gcc
76       os: linux
77       env: HOST=i686-linux-gnu
78       addons:
79         apt:
80           packages:
81             - gcc-multilib
82             - libgmp-dev:i386
83             - valgrind
84             - libtool-bin
85             - libc6-dbg:i386
86     # S390x build (big endian system)
87     - compiler: gcc
88       env: HOST=s390x-unknown-linux-gnu ECDH=yes RECOVERY=yes EXPERIMENTAL=yes CTIMETEST=
89       arch: s390x
90
91 # We use this to install macOS dependencies instead of the built in `homebrew` plugin,
92 # because in xcode earlier than 11 they have a bug requiring updating the system which overall takes ~8 minutes.
93 # https://travis-ci.community/t/macos-build-fails-because-of-homebrew-bundle-unknown-command/7296
94 before_install:
95  - if [ "${TRAVIS_OS_NAME}" = "osx" ]; then HOMEBREW_NO_AUTO_UPDATE=1 brew install gmp valgrind gcc@9; fi
96
97 before_script: ./autogen.sh
98
99 # travis auto terminates jobs that go for 10 minutes without printing to stdout, but travis_wait doesn't work well with forking programs like valgrind (https://docs.travis-ci.com/user/common-build-problems/#build-times-out-because-no-output-was-received https://github.com/bitcoin-core/secp256k1/pull/750#issuecomment-623476860)
100 script:
101   - function keep_alive() { while true; do echo -en "\a"; sleep 60; done }
102   - keep_alive &
103   - ./contrib/travis.sh
104   - kill %keep_alive
105
106 after_script:
107     - cat ./tests.log
108     - cat ./exhaustive_tests.log
109     - cat ./valgrind_ctime_test.log
110     - cat ./bench.log
111     - $CC --version
112     - valgrind --version
This page took 0.0289160000000001 seconds and 4 git commands to generate.