Skip to content

Commit 1434f7d

Browse files
committed
ci: Run tools/symbol-check.py
1 parent 78921b1 commit 1434f7d

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

@@ -127,6 +128,7 @@ task:
127128
WITH_VALGRIND: no
128129
CTIMETESTS: no
129130
CC: clang
131+
SYMBOL_CHECK: no
130132
matrix:
131133
- env: {WIDEMUL: int64, RECOVERY: yes, ECDH: yes, SCHNORRSIG: yes, ELLSWIFT: yes}
132134
- env: {WIDEMUL: int64, RECOVERY: yes, ECDH: yes, SCHNORRSIG: yes, ELLSWIFT: yes, CC: gcc}
@@ -140,6 +142,9 @@ task:
140142
- brew install automake libtool gcc
141143
test_script:
142144
- ./ci/cirrus.sh
145+
symbol_check_script:
146+
- python3 -m pip install lief
147+
- python3 ./tools/symbol-check.py .libs/libsecp256k1.dylib
143148
<< : *CAT_LOGS
144149
<< : *CREDITS
145150

@@ -248,6 +253,7 @@ task:
248253
SCHNORRSIG: yes
249254
ELLSWIFT: yes
250255
CTIMETESTS: no
256+
SYMBOL_CHECK: no
251257
# Use a MinGW-w64 host to tell ./configure we're building for Windows.
252258
# This will detect some MinGW-w64 tools but then make will need only
253259
# the MSVC tools CC, AR and NM as specified below.
@@ -304,6 +310,7 @@ task:
304310
ASAN_OPTIONS: "strict_string_checks=1:detect_stack_use_after_return=1:detect_leaks=1"
305311
LSAN_OPTIONS: "use_unaligned=1"
306312
SECP256K1_TEST_ITERS: 32
313+
SYMBOL_CHECK: no
307314
# Try to cover many configurations with just a tiny matrix.
308315
matrix:
309316
- env:
@@ -405,6 +412,11 @@ task:
405412
build_script:
406413
- '%x64_NATIVE_TOOLS%'
407414
- cmake --build build --config RelWithDebInfo -- -property:UseMultiToolTask=true;CL_MPcount=5
415+
symbol_check_script:
416+
- choco install --yes --no-progress python3
417+
- refreshenv
418+
- python -m pip install lief
419+
- python .\tools\symbol-check.py build\src\RelWithDebInfo\libsecp256k1-2.dll
408420
check_script:
409421
- '%x64_NATIVE_TOOLS%'
410422
- ctest -C RelWithDebInfo --test-dir build -j 5

ci/cirrus.sh

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

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

ci/linux-debian.Dockerfile

+6
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
2222
gcc-powerpc64le-linux-gnu libc6-dev-ppc64el-cross libc6-dbg:ppc64el \
2323
gcc-mingw-w64-x86-64-win32 wine64 wine \
2424
gcc-mingw-w64-i686-win32 wine32 \
25+
python3-full \
2526
sagemath
2627

2728
WORKDIR /root
@@ -73,3 +74,8 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
7374
# Wait until the wineserver process has exited before closing the session,
7475
# to avoid corrupting the wine prefix.
7576
while (ps -A | grep wineserver) > /dev/null; do sleep 1; done
77+
78+
ENV VIRTUAL_ENV=/root/venv
79+
RUN python3 -m venv $VIRTUAL_ENV
80+
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
81+
RUN pip install lief

0 commit comments

Comments
 (0)