Skip to content

Commit

Permalink
ci: Run tools/symbol-check.py
Browse files Browse the repository at this point in the history
  • Loading branch information
hebasto committed Jun 26, 2023
1 parent 909315a commit 230b635
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 1 deletion.
12 changes: 12 additions & 0 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ env:
BENCH: yes
SECP256K1_BENCH_ITERS: 2
CTIMETESTS: yes
SYMBOL_CHECK: yes
# Compile and run the tests
EXAMPLES: yes

Expand Down Expand Up @@ -131,6 +132,7 @@ task:
ASM: no
WITH_VALGRIND: no
CTIMETESTS: no
SYMBOL_CHECK: no
matrix:
- env:
CC: gcc
Expand All @@ -141,6 +143,9 @@ task:
<< : *MERGE_BASE
test_script:
- ./ci/cirrus.sh
symbol_check_script:
- python3 -m pip install lief
- python3 ./tools/symbol-check.py .libs/libsecp256k1.dylib
<< : *CAT_LOGS
<< : *CREDITS

Expand Down Expand Up @@ -254,6 +259,7 @@ task:
SCHNORRSIG: yes
ELLSWIFT: yes
CTIMETESTS: no
SYMBOL_CHECK: no
# Use a MinGW-w64 host to tell ./configure we're building for Windows.
# This will detect some MinGW-w64 tools but then make will need only
# the MSVC tools CC, AR and NM as specified below.
Expand Down Expand Up @@ -311,6 +317,7 @@ task:
ASAN_OPTIONS: "strict_string_checks=1:detect_stack_use_after_return=1:detect_leaks=1"
LSAN_OPTIONS: "use_unaligned=1"
SECP256K1_TEST_ITERS: 32
SYMBOL_CHECK: no
# Try to cover many configurations with just a tiny matrix.
matrix:
- env:
Expand Down Expand Up @@ -409,6 +416,11 @@ task:
build_script:
- '%x64_NATIVE_TOOLS%'
- cmake --build build --config RelWithDebInfo -- -property:UseMultiToolTask=true;CL_MPcount=5
symbol_check_script:
- choco install --yes --no-progress python3
- refreshenv
- python -m pip install lief
- python .\tools\symbol-check.py build\src\RelWithDebInfo\libsecp256k1-2.dll
check_script:
- '%x64_NATIVE_TOOLS%'
- ctest -C RelWithDebInfo --test-dir build -j 5
Expand Down
15 changes: 14 additions & 1 deletion ci/cirrus.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ print_environment() {
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\
SECP256K1_TEST_ITERS BENCH SECP256K1_BENCH_ITERS CTIMETESTS SYMBOL_CHECK \
EXAMPLES \
HOST WRAPPER_CMD \
CC CFLAGS CPPFLAGS AR NM
Expand Down Expand Up @@ -92,6 +92,19 @@ file *tests* || true
file bench* || true
file .libs/* || true

if [ "$SYMBOL_CHECK" = "yes" ]
then
case "$HOST" in
*mingw*)
ls -l .libs
python3 ./tools/symbol-check.py .libs/libsecp256k1-2.dll
;;
*)
python3 ./tools/symbol-check.py .libs/libsecp256k1.so
;;
esac
fi

# This tells `make check` to wrap test invocations.
export LOG_COMPILER="$WRAPPER_CMD"

Expand Down
6 changes: 6 additions & 0 deletions ci/linux-debian.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
gcc-powerpc64le-linux-gnu libc6-dev-ppc64el-cross libc6-dbg:ppc64el \
gcc-mingw-w64-x86-64-win32 wine64 wine \
gcc-mingw-w64-i686-win32 wine32 \
python3-full \
sagemath

WORKDIR /root
Expand All @@ -39,3 +40,8 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
# Wait until the wineserver process has exited before closing the session,
# to avoid corrupting the wine prefix.
while (ps -A | grep wineserver) > /dev/null; do sleep 1; done

ENV VIRTUAL_ENV=/root/venv
RUN python3 -m venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
RUN pip install lief

0 comments on commit 230b635

Please sign in to comment.