forked from dashpay/dash
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge dashpay#750: Add macOS to the CI
71757da Explictly pass SECP256K1_BENCH_ITERS to the benchmarks in travis.sh (Elichai Turkel) 99bd661 Replace travis_wait with a loop printing "\a" to stdout every minute (Elichai Turkel) bc818b1 Bump travis Ubuntu from xenial(16.04) to bionic(18.04) (Elichai Turkel) 0c5ff90 Add macOS support to travis (Elichai Turkel) b6807d9 Move travis script into a standalone sh file (Elichai Turkel) Pull request description: ACKs for top commit: real-or-random: ACK 71757da I inspected the diff jonasnick: ACK 71757da Tree-SHA512: e8fab725ef5ed98c795f39d7f26b5d967a6bd730d40eb7d9793986858bf34770b0350c1b7b1d14ae608dfff9375a0750ec67c8e6d0d4b562ab917f5e645aa67b
- Loading branch information
Showing
2 changed files
with
94 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
set -x | ||
|
||
if [ -n "$HOST" ] | ||
then | ||
export USE_HOST="--host=$HOST" | ||
fi | ||
if [ "$HOST" = "i686-linux-gnu" ] | ||
then | ||
export CC="$CC -m32" | ||
fi | ||
if [ "$TRAVIS_OS_NAME" = "osx" ] && [ "$TRAVIS_COMPILER" = "gcc" ] | ||
then | ||
export CC="gcc-9" | ||
fi | ||
|
||
./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" | ||
|
||
if [ -n "$BUILD" ] | ||
then | ||
make -j2 "$BUILD" | ||
fi | ||
if [ -n "$VALGRIND" ] | ||
then | ||
make -j2 | ||
# 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) | ||
valgrind --error-exitcode=42 ./tests 16 | ||
valgrind --error-exitcode=42 ./exhaustive_tests | ||
fi | ||
if [ -n "$BENCH" ] | ||
then | ||
if [ -n "$VALGRIND" ] | ||
then | ||
# Using the local `libtool` because on macOS the system's libtool has nothing to do with GNU libtool | ||
EXEC='./libtool --mode=execute valgrind --error-exitcode=42' | ||
else | ||
EXEC= | ||
fi | ||
# This limits the iterations in the benchmarks below to ITER(set in .travis.yml) iterations. | ||
export SECP256K1_BENCH_ITERS="$ITERS" | ||
{ | ||
$EXEC ./bench_ecmult | ||
$EXEC ./bench_internal | ||
$EXEC ./bench_sign | ||
$EXEC ./bench_verify | ||
} >> bench.log 2>&1 | ||
if [ "$RECOVERY" = "yes" ] | ||
then | ||
$EXEC ./bench_recover >> bench.log 2>&1 | ||
fi | ||
if [ "$ECDH" = "yes" ] | ||
then | ||
$EXEC ./bench_ecdh >> bench.log 2>&1 | ||
fi | ||
fi | ||
if [ -n "$CTIMETEST" ] | ||
then | ||
./libtool --mode=execute valgrind --error-exitcode=42 ./valgrind_ctime_test > valgrind_ctime_test.log 2>&1 | ||
fi |