Skip to content

Commit 85b35af

Browse files
committed
Add running benchmarks regularly and under valgrind in travis
1 parent ca4906b commit 85b35af

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

.travis.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ compiler:
1111
- gcc
1212
env:
1313
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
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
1515
matrix:
1616
- SCALAR=32bit RECOVERY=yes
1717
- SCALAR=32bit FIELD=32bit ECDH=yes EXPERIMENTAL=yes
@@ -25,7 +25,7 @@ env:
2525
- BIGNUM=no
2626
- BIGNUM=no ENDOMORPHISM=yes RECOVERY=yes EXPERIMENTAL=yes
2727
- BIGNUM=no STATICPRECOMPUTATION=no
28-
- BUILD=distcheck CTIMETEST=
28+
- BUILD=distcheck CTIMETEST= BENCH=
2929
- EXTRAFLAGS=CPPFLAGS=-DDETERMINISTIC
3030
- EXTRAFLAGS=CFLAGS=-O0
3131
- ECMULTGENPRECISION=2
@@ -94,6 +94,12 @@ script:
9494
travis_wait 30 valgrind --error-exitcode=42 ./tests 16 &&
9595
travis_wait 30 valgrind --error-exitcode=42 ./exhaustive_tests;
9696
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
97103
- if [ -n "$CTIMETEST" ]; then
98104
libtool --mode=execute valgrind ./valgrind_ctime_test &> valgrind_ctime_test.log;
99105
fi
@@ -102,3 +108,4 @@ after_script:
102108
- cat ./tests.log
103109
- cat ./exhaustive_tests.log
104110
- cat ./valgrind_ctime_test.log
111+
- cat ./bench.log

0 commit comments

Comments
 (0)