]> Git Repo - secp256k1.git/blob - .travis.yml
Improve CC_FOR_BUILD detection
[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  STATICPRECOMPUTATION=yes  ECMULTGENPRECISION=auto  ASM=no  BUILD=check  WITH_VALGRIND=yes RUN_VALGRIND=no 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=int128
25     - WIDEMUL=int128  RECOVERY=yes EXPERIMENTAL=yes SCHNORRSIG=yes
26     - WIDEMUL=int128  ECDH=yes EXPERIMENTAL=yes SCHNORRSIG=yes
27     - WIDEMUL=int128                    ASM=x86_64
28     - BIGNUM=no
29     - BIGNUM=no       RECOVERY=yes EXPERIMENTAL=yes SCHNORRSIG=yes
30     - BIGNUM=no       STATICPRECOMPUTATION=no
31     - BUILD=distcheck WITH_VALGRIND=no CTIMETEST=no BENCH=no
32     - CPPFLAGS=-DDETERMINISTIC
33     - CFLAGS=-O0 CTIMETEST=no
34     - CFLAGS="-fsanitize=undefined -fno-omit-frame-pointer" LDFLAGS="-fsanitize=undefined -fno-omit-frame-pointer" UBSAN_OPTIONS="print_stacktrace=1:halt_on_error=1" BIGNUM=no ASM=x86_64 ECDH=yes RECOVERY=yes EXPERIMENTAL=yes SCHNORRSIG=yes CTIMETEST=no
35     - ECMULTGENPRECISION=2
36     - ECMULTGENPRECISION=8
37     - RUN_VALGRIND=yes BIGNUM=no ASM=x86_64 ECDH=yes  RECOVERY=yes EXPERIMENTAL=yes SCHNORRSIG=yes EXTRAFLAGS="--disable-openssl-tests" BUILD=
38 matrix:
39   fast_finish: true
40   include:
41     - compiler: clang
42       os: linux
43       env: HOST=i686-linux-gnu
44       addons:
45         apt:
46           packages:
47             - gcc-multilib
48             - libgmp-dev:i386
49             - valgrind
50             - libtool-bin
51             - libc6-dbg:i386
52     - compiler: clang
53       env: HOST=i686-linux-gnu
54       os: linux
55       addons:
56         apt:
57           packages:
58             - gcc-multilib
59             - valgrind
60             - libtool-bin
61             - libc6-dbg:i386
62     - compiler: gcc
63       env: HOST=i686-linux-gnu
64       os: linux
65       addons:
66         apt:
67           packages:
68             - gcc-multilib
69             - valgrind
70             - libtool-bin
71             - libc6-dbg:i386
72     - compiler: gcc
73       os: linux
74       env: HOST=i686-linux-gnu
75       addons:
76         apt:
77           packages:
78             - gcc-multilib
79             - libgmp-dev:i386
80             - valgrind
81             - libtool-bin
82             - libc6-dbg:i386
83     # S390x build (big endian system)
84     - compiler: gcc
85       env: HOST=s390x-unknown-linux-gnu ECDH=yes RECOVERY=yes EXPERIMENTAL=yes SCHNORRSIG=yes CTIMETEST=
86       arch: s390x
87
88 # We use this to install macOS dependencies instead of the built in `homebrew` plugin,
89 # because in xcode earlier than 11 they have a bug requiring updating the system which overall takes ~8 minutes.
90 # https://travis-ci.community/t/macos-build-fails-because-of-homebrew-bundle-unknown-command/7296
91 before_install:
92  - if [ "${TRAVIS_OS_NAME}" = "osx" ]; then HOMEBREW_NO_AUTO_UPDATE=1 brew install gmp valgrind gcc@9; fi
93
94 before_script: ./autogen.sh
95
96 # 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)
97 script:
98   - function keep_alive() { while true; do echo -en "\a"; sleep 60; done }
99   - keep_alive &
100   - ./contrib/travis.sh
101   - kill %keep_alive
102
103 after_script:
104     - cat ./tests.log
105     - cat ./exhaustive_tests.log
106     - cat ./valgrind_ctime_test.log
107     - cat ./bench.log
108     - $CC --version
109     - valgrind --version
This page took 0.028098 seconds and 4 git commands to generate.