Skip to content

Commit e795caa

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

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.travis.yml

Lines changed: 8 additions & 1 deletion
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
@@ -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)