Changeset View
Changeset View
Standalone View
Standalone View
src/secp256k1/ci/build_autotools.sh
Show All 25 Lines | |||||
$CC --version | $CC --version | ||||
./autogen.sh | ./autogen.sh | ||||
mkdir buildautotools | mkdir buildautotools | ||||
pushd buildautotools | pushd buildautotools | ||||
# Nix doesn't store GNU file in /usr/bin, see https://lists.gnu.org/archive/html/bug-libtool/2015-09/msg00000.html . | |||||
# The -i'' is necessary for macOS portability, see https://stackoverflow.com/a/4247319 . | |||||
if [ "${CIRRUS_CI}" = "true" ]; then | |||||
sed -i'' -e 's@/usr/bin/file@$(which file)@g' ../configure | |||||
fi | |||||
../configure \ | ../configure \ | ||||
--enable-experimental=$EXPERIMENTAL \ | --enable-experimental=$EXPERIMENTAL \ | ||||
--with-test-override-wide-multiply=$WIDEMUL \ | --with-test-override-wide-multiply=$WIDEMUL \ | ||||
--with-bignum=$BIGNUM \ | --with-bignum=$BIGNUM \ | ||||
--with-asm=$ASM \ | --with-asm=$ASM \ | ||||
--enable-ecmult-static-precomputation=$STATICPRECOMPUTATION \ | --enable-ecmult-static-precomputation=$STATICPRECOMPUTATION \ | ||||
--with-ecmult-gen-precision=$ECMULTGENPRECISION \ | --with-ecmult-gen-precision=$ECMULTGENPRECISION \ | ||||
--enable-module-ecdh=$ECDH \ | --enable-module-ecdh=$ECDH \ | ||||
Show All 10 Lines | |||||
print_logs() { | print_logs() { | ||||
cat tests.log || : | cat tests.log || : | ||||
cat exhaustive_tests.log || : | cat exhaustive_tests.log || : | ||||
cat valgrind_ctime_test.log || : | cat valgrind_ctime_test.log || : | ||||
cat bench.log || : | cat bench.log || : | ||||
} | } | ||||
trap 'print_logs' ERR | trap 'print_logs' ERR | ||||
make -j2 $AUTOTOOLS_TARGET | # We have set "-j<n>" in MAKEFLAGS. | ||||
make $AUTOTOOLS_TARGET | |||||
# Print information about binaries so that we can see that the architecture is correct | |||||
file *tests || true | |||||
file bench_* || true | |||||
file .libs/* || true | |||||
if [ "$RUN_VALGRIND" = "yes" ]; then | if [ "$RUN_VALGRIND" = "yes" ]; then | ||||
# the `--error-exitcode` is required to make the test fail if valgrind found | # the `--error-exitcode` is required to make the test fail if valgrind found | ||||
# errors, otherwise it'll return 0 | # errors, otherwise it'll return 0 | ||||
# (https://www.valgrind.org/docs/manual/manual-core.html) | # (https://www.valgrind.org/docs/manual/manual-core.html) | ||||
valgrind --error-exitcode=42 ./tests 16 | valgrind --error-exitcode=42 ./tests 16 | ||||
valgrind --error-exitcode=42 ./exhaustive_tests | valgrind --error-exitcode=42 ./exhaustive_tests | ||||
fi | fi | ||||
▲ Show 20 Lines • Show All 43 Lines • Show Last 20 Lines |