Skip to content

Commit 79631ab

Browse files
committed
ci: Run tools/symbol-check.py
1 parent 7a8f115 commit 79631ab

File tree

3 files changed

+32
-1
lines changed

3 files changed

+32
-1
lines changed

.cirrus.yml

+12
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ env:
2727
BENCH: yes
2828
SECP256K1_BENCH_ITERS: 2
2929
CTIMETESTS: yes
30+
SYMBOL_CHECK: yes
3031
# Compile and run the tests
3132
EXAMPLES: yes
3233

@@ -131,6 +132,7 @@ task:
131132
ASM: no
132133
WITH_VALGRIND: no
133134
CTIMETESTS: no
135+
SYMBOL_CHECK: no
134136
matrix:
135137
- env:
136138
CC: gcc
@@ -141,6 +143,9 @@ task:
141143
<< : *MERGE_BASE
142144
test_script:
143145
- ./ci/cirrus.sh
146+
symbol_check_script:
147+
- python3 -m pip install lief
148+
- python3 ./tools/symbol-check.py .libs/libsecp256k1.dylib
144149
<< : *CAT_LOGS
145150
<< : *CREDITS
146151

@@ -254,6 +259,7 @@ task:
254259
SCHNORRSIG: yes
255260
ELLSWIFT: yes
256261
CTIMETESTS: no
262+
SYMBOL_CHECK: no
257263
# Use a MinGW-w64 host to tell ./configure we're building for Windows.
258264
# This will detect some MinGW-w64 tools but then make will need only
259265
# the MSVC tools CC, AR and NM as specified below.
@@ -311,6 +317,7 @@ task:
311317
ASAN_OPTIONS: "strict_string_checks=1:detect_stack_use_after_return=1:detect_leaks=1"
312318
LSAN_OPTIONS: "use_unaligned=1"
313319
SECP256K1_TEST_ITERS: 32
320+
SYMBOL_CHECK: no
314321
# Try to cover many configurations with just a tiny matrix.
315322
matrix:
316323
- env:
@@ -409,6 +416,11 @@ task:
409416
build_script:
410417
- '%x64_NATIVE_TOOLS%'
411418
- cmake --build build --config RelWithDebInfo -- -property:UseMultiToolTask=true;CL_MPcount=5
419+
symbol_check_script:
420+
- choco install --yes --no-progress python3
421+
- refreshenv
422+
- python -m pip install lief
423+
- python .\tools\symbol-check.py build\src\RelWithDebInfo\libsecp256k1-2.dll
412424
check_script:
413425
- '%x64_NATIVE_TOOLS%'
414426
- ctest -C RelWithDebInfo --test-dir build -j 5

ci/cirrus.sh

+14-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ print_environment() {
1313
for var in WERROR_CFLAGS MAKEFLAGS BUILD \
1414
ECMULTWINDOW ECMULTGENPRECISION ASM WIDEMUL WITH_VALGRIND EXTRAFLAGS \
1515
EXPERIMENTAL ECDH RECOVERY SCHNORRSIG \
16-
SECP256K1_TEST_ITERS BENCH SECP256K1_BENCH_ITERS CTIMETESTS\
16+
SECP256K1_TEST_ITERS BENCH SECP256K1_BENCH_ITERS CTIMETESTS SYMBOL_CHECK \
1717
EXAMPLES \
1818
HOST WRAPPER_CMD \
1919
CC CFLAGS CPPFLAGS AR NM
@@ -92,6 +92,19 @@ file *tests* || true
9292
file bench* || true
9393
file .libs/* || true
9494

95+
if [ "$SYMBOL_CHECK" = "yes" ]
96+
then
97+
case "$HOST" in
98+
*mingw*)
99+
ls -l .libs
100+
python3 ./tools/symbol-check.py .libs/libsecp256k1-2.dll
101+
;;
102+
*)
103+
python3 ./tools/symbol-check.py .libs/libsecp256k1.so
104+
;;
105+
esac
106+
fi
107+
95108
# This tells `make check` to wrap test invocations.
96109
export LOG_COMPILER="$WRAPPER_CMD"
97110

ci/linux-debian.Dockerfile

+6
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
2020
gcc-powerpc64le-linux-gnu libc6-dev-ppc64el-cross libc6-dbg:ppc64el \
2121
gcc-mingw-w64-x86-64-win32 wine64 wine \
2222
gcc-mingw-w64-i686-win32 wine32 \
23+
python3-full \
2324
sagemath
2425

2526
WORKDIR /root
@@ -39,3 +40,8 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
3940
# Wait until the wineserver process has exited before closing the session,
4041
# to avoid corrupting the wine prefix.
4142
while (ps -A | grep wineserver) > /dev/null; do sleep 1; done
43+
44+
ENV VIRTUAL_ENV=/root/venv
45+
RUN python3 -m venv $VIRTUAL_ENV
46+
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
47+
RUN pip install lief

0 commit comments

Comments
 (0)