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 Feb 12, 2024
1 parent 7c46279 commit 7427b2f
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 2 deletions.
1 change: 1 addition & 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
7 changes: 7 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ env:
BENCH: 'yes'
SECP256K1_BENCH_ITERS: 2
CTIMETESTS: 'yes'
SYMBOL_CHECK: 'yes'
# Compile and run the examples.
EXAMPLES: 'yes'

Expand Down Expand Up @@ -594,6 +595,7 @@ jobs:
CC: 'clang'
HOMEBREW_NO_AUTO_UPDATE: 1
HOMEBREW_NO_INSTALL_CLEANUP: 1
SYMBOL_CHECK: 'no'

strategy:
fail-fast: false
Expand Down Expand Up @@ -626,6 +628,11 @@ jobs:
env: ${{ matrix.env_vars }}
run: ./ci/ci.sh

- name: Symbol check
run: |
python3 -m pip install lief
python3 ./tools/symbol-check.py .libs/libsecp256k1.dylib
- run: cat tests.log || true
if: ${{ always() }}
- run: cat noverify_tests.log || true
Expand Down
15 changes: 14 additions & 1 deletion ci/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ print_environment() {
for var in WERROR_CFLAGS MAKEFLAGS BUILD \
ECMULTWINDOW ECMULTGENPRECISION ASM WIDEMUL WITH_VALGRIND EXTRAFLAGS \
EXPERIMENTAL ECDH RECOVERY SCHNORRSIG ELLSWIFT \
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 @@ -104,6 +104,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: 5 additions & 1 deletion ci/linux-debian.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,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 && \
python3-full && \
if ! ( dpkg --print-architecture | grep --quiet "arm64" ) ; then \
apt-get install --no-install-recommends -y \
gcc-aarch64-linux-gnu libc6-dev-arm64-cross libc6-dbg:arm64 ;\
Expand Down Expand Up @@ -77,3 +77,7 @@ RUN \
apt-get autoremove -y wget && \
apt-get clean && rm -rf /var/lib/apt/lists/*

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 7427b2f

Please sign in to comment.