mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-21 12:22:50 -05:00

4258c54f4e Merge bitcoin-core/secp256k1#1276: autotools: Don't regenerate Wycheproof header automatically 06c67dea9f autotools: Don't regenerate Wycheproof header automatically 3bab71cf05 Merge bitcoin-core/secp256k1#1268: release cleanup: bump version after 0.3.1 656c6ea8d8 release cleanup: bump version after 0.3.1 346a053d4c Merge bitcoin-core/secp256k1#1269: changelog: Fix link 6a37b2a5ea changelog: Fix link ec98fcedd5 Merge bitcoin-core/secp256k1#1266: release: Prepare for 0.3.1 898e1c676e release: Prepare for 0.3.1 1d9a13fc26 changelog: Remove inconsistent newlines 0e091669a1 changelog: Catch up in preparation of 0.3.1 7b7503dac5 Merge bitcoin-core/secp256k1#1245: tests: Add Wycheproof ECDSA vectors 145078c418 Merge bitcoin-core/secp256k1#1118: Add x-only ecmult_const version with x specified as n/d e5de454609 tests: Add Wycheproof ECDSA vectors 0f8642079b Add exhaustive tests for ecmult_const_xonly 4485926ace Add x-only ecmult_const version for x=n/d a0f4644f7e Merge bitcoin-core/secp256k1#1252: Make position of * in pointer declarations in include/ consistent 4e682626a3 Merge bitcoin-core/secp256k1#1226: Add CMake instructions to release process 2d51a454fc Merge bitcoin-core/secp256k1#1257: ct: Use volatile "trick" in all fe/scalar cmov implementations 4a496a36fb ct: Use volatile "trick" in all fe/scalar cmov implementations 3d1f430f9f Make position of * in pointer declarations in include/ consistent 2bca0a5cbf Merge bitcoin-core/secp256k1#1241: build: Improve `SECP_TRY_APPEND_DEFAULT_CFLAGS` macro afd8b23b27 Merge bitcoin-core/secp256k1#1244: Suppress `-Wunused-parameter` when building for coverage analysis 1d8f367515 Merge bitcoin-core/secp256k1#1250: No need to subtract 1 before doing a right shift 3e43041be6 No need to subtract 1 before doing a right shift 3addb4c1e8 build: Improve `SECP_TRY_APPEND_DEFAULT_CFLAGS` macro 0c07c82834 Add CMake instructions to release process 464a9115b4 Merge bitcoin-core/secp256k1#1242: Set ARM ASM symbol visibility to `hidden` f16a709fd6 Merge bitcoin-core/secp256k1#1247: Apply Checks only in VERIFY mode. 70be3cade5 Merge bitcoin-core/secp256k1#1246: Typo 4ebd82852d Apply Checks only in VERIFY mode. d1e7ca192d Typo 5bb03c2911 Replace `SECP256K1_ECMULT_TABLE_VERIFY` macro by a function 9c8c4f443c Merge bitcoin-core/secp256k1#1238: build: bump CMake minimum requirement to 3.13 0cf2fb91ef Merge bitcoin-core/secp256k1#1243: build: Ensure no optimization when building for coverage analysis fd2a408647 Set ARM ASM symbol visibility to `hidden` 4429a8c218 Suppress `-Wunused-parameter` when building for coverage analysis 8e79c7ed11 build: Ensure no optimization when building for coverage analysis 96dd062511 build: bump CMake minimum requirement to 3.13 427bc3cdcf Merge bitcoin-core/secp256k1#1236: Update comment for secp256k1_modinv32_inv256 647f0a5cb1 Update comment for secp256k1_modinv32_inv256 5658209459 Merge bitcoin-core/secp256k1#1228: release cleanup: bump version after 0.3.0 28e63f7ea7 release cleanup: bump version after 0.3.0 git-subtree-dir: src/secp256k1 git-subtree-split: 4258c54f4ebfc09390168e8a43306c46b315134b
118 lines
3.2 KiB
Bash
Executable file
118 lines
3.2 KiB
Bash
Executable file
#!/bin/sh
|
|
|
|
set -eux
|
|
|
|
export LC_ALL=C
|
|
|
|
# Print relevant CI environment to allow reproducing the job outside of CI.
|
|
print_environment() {
|
|
# Turn off -x because it messes up the output
|
|
set +x
|
|
# There are many ways to print variable names and their content. This one
|
|
# does not rely on bash.
|
|
for var in WERROR_CFLAGS MAKEFLAGS BUILD \
|
|
ECMULTWINDOW ECMULTGENPRECISION ASM WIDEMUL WITH_VALGRIND EXTRAFLAGS \
|
|
EXPERIMENTAL ECDH RECOVERY SCHNORRSIG \
|
|
SECP256K1_TEST_ITERS BENCH SECP256K1_BENCH_ITERS CTIMETESTS\
|
|
EXAMPLES \
|
|
HOST WRAPPER_CMD \
|
|
CC CFLAGS CPPFLAGS AR NM
|
|
do
|
|
eval "isset=\${$var+x}"
|
|
if [ -n "$isset" ]; then
|
|
eval "val=\${$var}"
|
|
# shellcheck disable=SC2154
|
|
printf '%s="%s" ' "$var" "$val"
|
|
fi
|
|
done
|
|
echo "$0"
|
|
set -x
|
|
}
|
|
print_environment
|
|
|
|
# Start persistent wineserver if necessary.
|
|
# This speeds up jobs with many invocations of wine (e.g., ./configure with MSVC) tremendously.
|
|
case "$WRAPPER_CMD" in
|
|
*wine*)
|
|
# Make sure to shutdown wineserver whenever we exit.
|
|
trap "wineserver -k || true" EXIT INT HUP
|
|
# This is apparently only reliable when we run a dummy command such as "hh.exe" afterwards.
|
|
wineserver -p && wine hh.exe
|
|
;;
|
|
esac
|
|
|
|
env >> test_env.log
|
|
|
|
if [ -n "${CC+x}" ]; then
|
|
# The MSVC compiler "cl" doesn't understand "-v"
|
|
$CC -v || true
|
|
fi
|
|
if [ "$WITH_VALGRIND" = "yes" ]; then
|
|
valgrind --version
|
|
fi
|
|
if [ -n "$WRAPPER_CMD" ]; then
|
|
$WRAPPER_CMD --version
|
|
fi
|
|
|
|
./autogen.sh
|
|
|
|
./configure \
|
|
--enable-experimental="$EXPERIMENTAL" \
|
|
--with-test-override-wide-multiply="$WIDEMUL" --with-asm="$ASM" \
|
|
--with-ecmult-window="$ECMULTWINDOW" \
|
|
--with-ecmult-gen-precision="$ECMULTGENPRECISION" \
|
|
--enable-module-ecdh="$ECDH" --enable-module-recovery="$RECOVERY" \
|
|
--enable-module-schnorrsig="$SCHNORRSIG" \
|
|
--enable-examples="$EXAMPLES" \
|
|
--enable-ctime-tests="$CTIMETESTS" \
|
|
--with-valgrind="$WITH_VALGRIND" \
|
|
--host="$HOST" $EXTRAFLAGS
|
|
|
|
# We have set "-j<n>" in MAKEFLAGS.
|
|
make
|
|
|
|
# Print information about binaries so that we can see that the architecture is correct
|
|
file *tests* || true
|
|
file bench* || true
|
|
file .libs/* || true
|
|
|
|
# This tells `make check` to wrap test invocations.
|
|
export LOG_COMPILER="$WRAPPER_CMD"
|
|
|
|
make "$BUILD"
|
|
|
|
# Using the local `libtool` because on macOS the system's libtool has nothing to do with GNU libtool
|
|
EXEC='./libtool --mode=execute'
|
|
if [ -n "$WRAPPER_CMD" ]
|
|
then
|
|
EXEC="$EXEC $WRAPPER_CMD"
|
|
fi
|
|
|
|
if [ "$BENCH" = "yes" ]
|
|
then
|
|
{
|
|
$EXEC ./bench_ecmult
|
|
$EXEC ./bench_internal
|
|
$EXEC ./bench
|
|
} >> bench.log 2>&1
|
|
fi
|
|
|
|
if [ "$CTIMETESTS" = "yes" ]
|
|
then
|
|
if [ "$WITH_VALGRIND" = "yes" ]; then
|
|
./libtool --mode=execute valgrind --error-exitcode=42 ./ctime_tests > ctime_tests.log 2>&1
|
|
else
|
|
$EXEC ./ctime_tests > ctime_tests.log 2>&1
|
|
fi
|
|
fi
|
|
|
|
# Rebuild precomputed files (if not cross-compiling).
|
|
if [ -z "$HOST" ]
|
|
then
|
|
make clean-precomp clean-testvectors
|
|
make precomp testvectors
|
|
fi
|
|
|
|
# Check that no repo files have been modified by the build.
|
|
# (This fails for example if the precomp files need to be updated in the repo.)
|
|
git diff --exit-code
|