mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-30 18:35:54 +02:00
14e56970cb Merge bitcoin-core/secp256k1#1794: ecmult: Use size_t for array indices c7a52400d6 Merge bitcoin-core/secp256k1#1809: release cleanup: bump version after 0.7.1 ae7eb729c0 release cleanup: bump version after 0.7.1 1a53f4961f Merge bitcoin-core/secp256k1#1808: Prepare for 0.7.1 20a209f11c release: prepare for 0.7.1 c4b6a81a60 changelog: update in preparation for the v0.7.1 release ebb35882da Merge bitcoin-core/secp256k1#1796: bench: fail early if user inputs invalid value for SECP256K1_BENCH_ITERS c09215f7af bench: fail early if user inputs invalid value for SECP256K1_BENCH_ITERS 471e3a130d Merge bitcoin-core/secp256k1#1800: sage: verify Eisenstein integer connection for GLV constants 29ac4d8491 sage: verify Eisenstein integer connection for GLV constants 4721e077b4 Merge bitcoin-core/secp256k1#1793: doc/bench: added help text for SECP256K1_BENCH_ITERS env var for bench_ecmult bd5ced1fe1 doc/bench: added help text for SECP256K1_BENCH_ITERS env var for bench_ecmult 47eb70959a ecmult: Use size_t for array indices in _odd_multiplies_table bb1d199de5 ecmult: Use size_t for array indices into tables 2d9137ce9d Merge bitcoin-core/secp256k1#1764: group: Avoid using infinity field directly in other modules f9a944ff2d Merge bitcoin-core/secp256k1#1790: doc: include arg -DSECP256K1_USE_EXTERNAL_DEFAULT_CALLBACKS=ON for cmake 0406cfc4d1 doc: include arg -DUSE_EXTERNAL_DEFAULT_CALLBACKS=1 for cmake 8d445730ec Merge bitcoin-core/secp256k1#1783: Add VERIFY_CHECKs and documentation that flags must be 0 or 1 aa2a39c1a7 Merge bitcoin-core/secp256k1#1778: doc/bench: Added cmake build options to bench error messages 540fec8ae9 Merge bitcoin-core/secp256k1#1788: test: split monolithic ellswift test into independent cases d822b29021 test: split monolithic ellswift test into independent cases ae00c552df Add VERIFY_CHECKs that flags are 0 or 1 5c75183344 Merge bitcoin-core/secp256k1#1784: refactor: remove ret from secp256k1_ec_pubkey_serialize be5e4f02fd Merge bitcoin-core/secp256k1#1779: Add ARG_CHECKs to ensure "array of pointers" elements are non-NULL 3daab83a60 refactor: remove ret from secp256k1_ec_pubkey_serialize 8bcda186d2 test: Add non-NULL checks for "pointer of array" API functions 5a08c1bcdc Add ARG_CHECKs to ensure "array of pointers" elements are non-NULL 3b5b03f301 doc/bench: Added cmake build options to bench error messages e7f7083b53 Merge bitcoin-core/secp256k1#1774: refactor: split up internal pubkey serialization function into compressed/uncompressed variants b6c2a3cd77 Merge bitcoin-core/secp256k1#1761: ecmult_multi: reduce strauss memory usage by 30% f5e815f430 remove secp256k1_eckey_pubkey_serialize function 0d3659c547 use new `_eckey_pubkey_serialize{33,65}` functions in modules (ellswift,musig) adb76f82ea use new `_eckey_pubkey_serialize{33,65}` functions in public API fc7458ca3e introduce `secp256k1_eckey_pubkey_serialize{33,65}` functions c8206b1ce6 Merge bitcoin-core/secp256k1#1771: ci: Use Python virtual environment in "x86_64-macos-native" job f252da7e6e ci: Use Python virtual environment in "x86_64-macos-native" job 115b135fe8 Merge bitcoin-core/secp256k1#1763: bench: Use `ALIGNMENT` macro instead of hardcoded value 2f73e5281d group: Avoid using infinity field directly in other modules 153eea20c2 bench: Use `ALIGNMENT` macro instead of hardcoded value 26166c4f5f ecmult_multi: reduce strauss memory usage by 30% 7a2fff85e8 Merge bitcoin-core/secp256k1#1758: ci: Drop workaround for Valgrind older than 3.20.0 43e7b115f7 Merge bitcoin-core/secp256k1#1759: ci: Switch to macOS 15 Sequoia Intel-based image 8bc50b72ff ci: Switch to macOS 15 Sequoia Intel-based image c09519f0e3 ci: Drop workaround for Valgrind older than 3.20.0 git-subtree-dir: src/secp256k1 git-subtree-split: 14e56970cba37ffe4ee992c1e08707a16e22e345
148 lines
3.9 KiB
Bash
Executable File
148 lines
3.9 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
set -eux
|
|
|
|
export LC_ALL=C
|
|
|
|
# Print commit and relevant CI environment to allow reproducing the job outside of CI.
|
|
git show --no-patch
|
|
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 ECMULTGENKB ASM WIDEMUL WITH_VALGRIND EXTRAFLAGS \
|
|
EXPERIMENTAL ECDH RECOVERY EXTRAKEYS MUSIG SCHNORRSIG ELLSWIFT \
|
|
SECP256K1_TEST_ITERS BENCH SECP256K1_BENCH_ITERS CTIMETESTS SYMBOL_CHECK \
|
|
EXAMPLES \
|
|
HOST WRAPPER_CMD \
|
|
CC CFLAGS CPPFLAGS AR NM \
|
|
UBSAN_OPTIONS ASAN_OPTIONS LSAN_OPTIONS
|
|
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
|
|
|
|
env >> test_env.log
|
|
|
|
# If gcc is requested, assert that it's in fact gcc (and not some symlinked Apple clang).
|
|
case "${CC:-undefined}" in
|
|
*gcc*)
|
|
$CC -v 2>&1 | grep -q "gcc version" || exit 1;
|
|
;;
|
|
esac
|
|
|
|
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-kb="$ECMULTGENKB" \
|
|
--enable-module-ecdh="$ECDH" --enable-module-recovery="$RECOVERY" \
|
|
--enable-module-ellswift="$ELLSWIFT" \
|
|
--enable-module-extrakeys="$EXTRAKEYS" \
|
|
--enable-module-schnorrsig="$SCHNORRSIG" \
|
|
--enable-module-musig="$MUSIG" \
|
|
--enable-examples="$EXAMPLES" \
|
|
--enable-ctime-tests="$CTIMETESTS" \
|
|
--with-valgrind="$WITH_VALGRIND" \
|
|
--host="$HOST" $EXTRAFLAGS
|
|
|
|
# We have set "-j<n>" in MAKEFLAGS.
|
|
build_exit_code=0
|
|
make > make.log 2>&1 || build_exit_code=$?
|
|
cat make.log
|
|
if [ $build_exit_code -ne 0 ]; then
|
|
case "${CC:-undefined}" in
|
|
*snapshot*)
|
|
# Ignore internal compiler errors in gcc-snapshot and clang-snapshot
|
|
grep -e "internal compiler error:" -e "PLEASE submit a bug report" make.log
|
|
exit $?
|
|
;;
|
|
*)
|
|
exit 1
|
|
;;
|
|
esac
|
|
fi
|
|
|
|
# Print information about binaries so that we can see that the architecture is correct
|
|
file *tests* || true
|
|
file bench* || true
|
|
file .libs/* || true
|
|
|
|
if [ "$SYMBOL_CHECK" = "yes" ]
|
|
then
|
|
python3 --version
|
|
case "$HOST" in
|
|
*mingw*)
|
|
ls -l .libs
|
|
python3 ./tools/symbol-check.py .libs/libsecp256k1-*.dll
|
|
;;
|
|
*)
|
|
python3 ./tools/symbol-check.py .libs/libsecp256k1.so
|
|
;;
|
|
esac
|
|
fi
|
|
|
|
# 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
|