Skip to content

Commit 731608f

Browse files
committed
ci: Run tools/symbol-check.py
1 parent b719379 commit 731608f

File tree

4 files changed

+37
-2
lines changed

4 files changed

+37
-2
lines changed

.cirrus.yml

+1
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

.github/workflows/ci.yml

+17
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ env:
3838
BENCH: 'yes'
3939
SECP256K1_BENCH_ITERS: 2
4040
CTIMETESTS: 'yes'
41+
SYMBOL_CHECK: 'yes'
4142
# Compile and run the examples.
4243
EXAMPLES: 'yes'
4344

@@ -445,6 +446,7 @@ jobs:
445446
ASAN_OPTIONS: 'strict_string_checks=1:detect_stack_use_after_return=1:detect_leaks=1'
446447
LSAN_OPTIONS: 'use_unaligned=1'
447448
SECP256K1_TEST_ITERS: 32
449+
SYMBOL_CHECK: 'no'
448450

449451
steps:
450452
- name: Checkout
@@ -501,6 +503,7 @@ jobs:
501503
SECP256K1_TEST_ITERS: 32
502504
ASM: 'no'
503505
WITH_VALGRIND: 'no'
506+
SYMBOL_CHECK: 'no'
504507

505508
steps:
506509
- name: Checkout
@@ -594,6 +597,7 @@ jobs:
594597
CC: 'clang'
595598
HOMEBREW_NO_AUTO_UPDATE: 1
596599
HOMEBREW_NO_INSTALL_CLEANUP: 1
600+
SYMBOL_CHECK: 'no'
597601

598602
strategy:
599603
fail-fast: false
@@ -626,6 +630,11 @@ jobs:
626630
env: ${{ matrix.env_vars }}
627631
run: ./ci/ci.sh
628632

633+
- name: Symbol check
634+
run: |
635+
python3 -m pip install lief
636+
python3 ./tools/symbol-check.py .libs/libsecp256k1.dylib
637+
629638
- run: cat tests.log || true
630639
if: ${{ always() }}
631640
- run: cat noverify_tests.log || true
@@ -681,6 +690,14 @@ jobs:
681690
run: |
682691
cd build/src/RelWithDebInfo && file *tests.exe bench*.exe libsecp256k1-*.dll || true
683692
693+
- name: Symbol check
694+
if: ${{ matrix.configuration.cmake_options != '-A x64 -DBUILD_SHARED_LIBS=OFF' }}
695+
run: |
696+
choco install --yes --no-progress python3
697+
refreshenv
698+
python -m pip install lief
699+
python .\tools\symbol-check.py build\src\RelWithDebInfo\libsecp256k1-2.dll
700+
684701
- name: Check
685702
run: |
686703
ctest -C RelWithDebInfo --test-dir build -j ([int]$env:NUMBER_OF_PROCESSORS + 1)

ci/ci.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 ELLSWIFT \
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
@@ -104,6 +104,19 @@ file *tests* || true
104104
file bench* || true
105105
file .libs/* || true
106106

107+
if [ "$SYMBOL_CHECK" = "yes" ]
108+
then
109+
case "$HOST" in
110+
*mingw*)
111+
ls -l .libs
112+
python3 ./tools/symbol-check.py .libs/libsecp256k1-2.dll
113+
;;
114+
*)
115+
python3 ./tools/symbol-check.py .libs/libsecp256k1.so
116+
;;
117+
esac
118+
fi
119+
107120
# This tells `make check` to wrap test invocations.
108121
export LOG_COMPILER="$WRAPPER_CMD"
109122

ci/linux-debian.Dockerfile

+5-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
3232
gcc-powerpc64le-linux-gnu libc6-dev-ppc64el-cross libc6-dbg:ppc64el \
3333
gcc-mingw-w64-x86-64-win32 wine64 wine \
3434
gcc-mingw-w64-i686-win32 wine32 \
35-
python3 && \
35+
python3-full && \
3636
if ! ( dpkg --print-architecture | grep --quiet "arm64" ) ; then \
3737
apt-get install --no-install-recommends -y \
3838
gcc-aarch64-linux-gnu libc6-dev-arm64-cross libc6-dbg:arm64 ;\
@@ -77,3 +77,7 @@ RUN \
7777
apt-get autoremove -y wget && \
7878
apt-get clean && rm -rf /var/lib/apt/lists/*
7979

80+
ENV VIRTUAL_ENV=/root/venv
81+
RUN python3 -m venv $VIRTUAL_ENV
82+
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
83+
RUN pip install lief

0 commit comments

Comments
 (0)