]> Git Repo - secp256k1.git/blob - contrib/travis.sh
Modify .travis.yml to explictly pass no in env vars instead of setting to nothing
[secp256k1.git] / contrib / travis.sh
1 #!/bin/sh
2
3 set -e
4 set -x
5
6 if [ "$HOST" = "i686-linux-gnu" ]
7 then
8     export CC="$CC -m32"
9 fi
10 if [ "$TRAVIS_OS_NAME" = "osx" ] && [ "$TRAVIS_COMPILER" = "gcc" ]
11 then
12     export CC="gcc-9"
13 fi
14
15 ./configure \
16     --enable-experimental="$EXPERIMENTAL" --enable-endomorphism="$ENDOMORPHISM" \
17     --with-field="$FIELD" --with-bignum="$BIGNUM" --with-asm="$ASM" --with-scalar="$SCALAR" \
18     --enable-ecmult-static-precomputation="$STATICPRECOMPUTATION" --with-ecmult-gen-precision="$ECMULTGENPRECISION" \
19     --enable-module-ecdh="$ECDH" --enable-module-recovery="$RECOVERY" \
20     --host="$HOST" $EXTRAFLAGS
21
22 if [ -n "$BUILD" ]
23 then
24     make -j2 "$BUILD"
25 fi
26 if [ "$VALGRIND" = "yes" ]
27 then
28     make -j2
29     # 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)
30     valgrind --error-exitcode=42 ./tests 16
31     valgrind --error-exitcode=42 ./exhaustive_tests
32 fi
33 if [ "$BENCH" = "yes" ]
34 then
35     if [ "$VALGRIND" = "yes" ]
36     then
37         # Using the local `libtool` because on macOS the system's libtool has nothing to do with GNU libtool
38         EXEC='./libtool --mode=execute valgrind --error-exitcode=42'
39     else
40         EXEC=
41     fi
42     # This limits the iterations in the benchmarks below to ITER(set in .travis.yml) iterations.
43     export SECP256K1_BENCH_ITERS="$ITERS"
44     {
45         $EXEC ./bench_ecmult
46         $EXEC ./bench_internal
47         $EXEC ./bench_sign
48         $EXEC ./bench_verify
49     } >> bench.log 2>&1
50     if [ "$RECOVERY" = "yes" ]
51     then
52         $EXEC ./bench_recover >> bench.log 2>&1
53     fi
54     if [ "$ECDH" = "yes" ]
55     then
56         $EXEC ./bench_ecdh >> bench.log 2>&1
57     fi
58 fi
59 if [ "$CTIMETEST" = "yes" ]
60 then
61     ./libtool --mode=execute valgrind --error-exitcode=42 ./valgrind_ctime_test > valgrind_ctime_test.log 2>&1
62 fi
This page took 0.024927 seconds and 4 git commands to generate.