Move travis script into a standalone sh file
This commit is contained in:
parent
f39f99be0e
commit
b6807d91d8
33
.travis.yml
33
.travis.yml
|
@ -26,8 +26,8 @@ env:
|
||||||
- BIGNUM=no ENDOMORPHISM=yes RECOVERY=yes EXPERIMENTAL=yes
|
- BIGNUM=no ENDOMORPHISM=yes RECOVERY=yes EXPERIMENTAL=yes
|
||||||
- BIGNUM=no STATICPRECOMPUTATION=no
|
- BIGNUM=no STATICPRECOMPUTATION=no
|
||||||
- BUILD=distcheck CTIMETEST= BENCH=
|
- BUILD=distcheck CTIMETEST= BENCH=
|
||||||
- EXTRAFLAGS=CPPFLAGS=-DDETERMINISTIC
|
- CPPFLAGS=-DDETERMINISTIC
|
||||||
- EXTRAFLAGS=CFLAGS=-O0
|
- CFLAGS=-O0 CTIMETEST=
|
||||||
- ECMULTGENPRECISION=2
|
- ECMULTGENPRECISION=2
|
||||||
- ECMULTGENPRECISION=8
|
- ECMULTGENPRECISION=8
|
||||||
matrix:
|
matrix:
|
||||||
|
@ -74,35 +74,16 @@ matrix:
|
||||||
- compiler: gcc
|
- compiler: gcc
|
||||||
env:
|
env:
|
||||||
- BIGNUM=no ENDOMORPHISM=yes ASM=x86_64 EXPERIMENTAL=yes ECDH=yes RECOVERY=yes
|
- BIGNUM=no ENDOMORPHISM=yes ASM=x86_64 EXPERIMENTAL=yes ECDH=yes RECOVERY=yes
|
||||||
- VALGRIND=yes EXTRAFLAGS="--disable-openssl-tests CPPFLAGS=-DVALGRIND" BUILD=
|
- VALGRIND=yes EXTRAFLAGS="--disable-openssl-tests" CPPFLAGS=-DVALGRIND BUILD=
|
||||||
- compiler: gcc
|
- compiler: gcc
|
||||||
env: # The same as above but without endomorphism.
|
env: # The same as above but without endomorphism.
|
||||||
- BIGNUM=no ENDOMORPHISM=no ASM=x86_64 EXPERIMENTAL=yes ECDH=yes RECOVERY=yes
|
- BIGNUM=no ASM=x86_64 EXPERIMENTAL=yes ECDH=yes RECOVERY=yes
|
||||||
- VALGRIND=yes EXTRAFLAGS="--disable-openssl-tests CPPFLAGS=-DVALGRIND" BUILD=
|
- VALGRIND=yes EXTRAFLAGS="--disable-openssl-tests" CPPFLAGS=-DVALGRIND BUILD=
|
||||||
|
|
||||||
before_script: ./autogen.sh
|
before_script: ./autogen.sh
|
||||||
|
|
||||||
script:
|
# travis_wait extends the 10 minutes without output allowed (https://docs.travis-ci.com/user/common-build-problems/#build-times-out-because-no-output-was-received)
|
||||||
- if [ -n "$HOST" ]; then export USE_HOST="--host=$HOST"; fi
|
script: travis_wait 30 ./contrib/travis.sh
|
||||||
- if [ "x$HOST" = "xi686-linux-gnu" ]; then export CC="$CC -m32"; 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
|
|
||||||
- # travis_wait extends the 10 minutes without output allowed (https://docs.travis-ci.com/user/common-build-problems/#build-times-out-because-no-output-was-received)
|
|
||||||
- # 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)
|
|
||||||
- if [ -n "$VALGRIND" ]; then
|
|
||||||
make -j2 &&
|
|
||||||
travis_wait 30 valgrind --error-exitcode=42 ./tests 16 &&
|
|
||||||
travis_wait 30 valgrind --error-exitcode=42 ./exhaustive_tests;
|
|
||||||
fi
|
|
||||||
- if [ -n "$BENCH" ]; then
|
|
||||||
if [ -n "$VALGRIND" ]; then EXEC='libtool --mode=execute valgrind --error-exitcode=42'; else EXEC= ; fi &&
|
|
||||||
$EXEC ./bench_ecmult &>> bench.log && $EXEC ./bench_internal &>> bench.log && $EXEC ./bench_sign &>> bench.log && $EXEC ./bench_verify &>> bench.log &&
|
|
||||||
if [ "$RECOVERY" == "yes" ]; then $EXEC ./bench_recover &>> bench.log; fi &&
|
|
||||||
if [ "$ECDH" == "yes" ]; then $EXEC ./bench_ecdh &>> bench.log; fi;
|
|
||||||
fi
|
|
||||||
- if [ -n "$CTIMETEST" ]; then
|
|
||||||
libtool --mode=execute valgrind ./valgrind_ctime_test &> valgrind_ctime_test.log;
|
|
||||||
fi
|
|
||||||
|
|
||||||
after_script:
|
after_script:
|
||||||
- cat ./tests.log
|
- cat ./tests.log
|
||||||
|
|
|
@ -0,0 +1,58 @@
|
||||||
|
#!/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
|
||||||
|
|
||||||
|
./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
|
||||||
|
EXEC='libtool --mode=execute valgrind --error-exitcode=42'
|
||||||
|
else
|
||||||
|
EXEC=
|
||||||
|
fi
|
||||||
|
{
|
||||||
|
$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
|
Loading…
Reference in New Issue