ci: Run tools/symbol-check.py
This commit is contained in:
@@ -29,6 +29,8 @@ env:
|
|||||||
BENCH: yes
|
BENCH: yes
|
||||||
SECP256K1_BENCH_ITERS: 2
|
SECP256K1_BENCH_ITERS: 2
|
||||||
CTIMETESTS: yes
|
CTIMETESTS: yes
|
||||||
|
SYMBOL_CHECK: yes
|
||||||
|
VIRTUAL_ENV: /root/venv
|
||||||
# Compile and run the tests
|
# Compile and run the tests
|
||||||
EXAMPLES: yes
|
EXAMPLES: yes
|
||||||
|
|
||||||
@@ -53,6 +55,7 @@ cat_logs_snippet: &CAT_LOGS
|
|||||||
|
|
||||||
linux_arm64_container_snippet: &LINUX_ARM64_CONTAINER
|
linux_arm64_container_snippet: &LINUX_ARM64_CONTAINER
|
||||||
env_script:
|
env_script:
|
||||||
|
- export PATH="$VIRTUAL_ENV/bin:$PATH"
|
||||||
- env | tee /tmp/env
|
- env | tee /tmp/env
|
||||||
build_script:
|
build_script:
|
||||||
- DOCKER_BUILDKIT=1 docker build --file "ci/linux-debian.Dockerfile" --tag="ci_secp256k1_arm"
|
- DOCKER_BUILDKIT=1 docker build --file "ci/linux-debian.Dockerfile" --tag="ci_secp256k1_arm"
|
||||||
|
|||||||
29
.github/workflows/ci.yml
vendored
29
.github/workflows/ci.yml
vendored
@@ -40,6 +40,7 @@ env:
|
|||||||
BENCH: 'yes'
|
BENCH: 'yes'
|
||||||
SECP256K1_BENCH_ITERS: 2
|
SECP256K1_BENCH_ITERS: 2
|
||||||
CTIMETESTS: 'yes'
|
CTIMETESTS: 'yes'
|
||||||
|
SYMBOL_CHECK: 'yes'
|
||||||
# Compile and run the examples.
|
# Compile and run the examples.
|
||||||
EXAMPLES: 'yes'
|
EXAMPLES: 'yes'
|
||||||
|
|
||||||
@@ -365,6 +366,7 @@ jobs:
|
|||||||
ASAN_OPTIONS: 'strict_string_checks=1:detect_stack_use_after_return=1:detect_leaks=1'
|
ASAN_OPTIONS: 'strict_string_checks=1:detect_stack_use_after_return=1:detect_leaks=1'
|
||||||
LSAN_OPTIONS: 'use_unaligned=1'
|
LSAN_OPTIONS: 'use_unaligned=1'
|
||||||
SECP256K1_TEST_ITERS: 32
|
SECP256K1_TEST_ITERS: 32
|
||||||
|
SYMBOL_CHECK: 'no'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@@ -415,6 +417,7 @@ jobs:
|
|||||||
SECP256K1_TEST_ITERS: 32
|
SECP256K1_TEST_ITERS: 32
|
||||||
ASM: 'no'
|
ASM: 'no'
|
||||||
WITH_VALGRIND: 'no'
|
WITH_VALGRIND: 'no'
|
||||||
|
SYMBOL_CHECK: 'no'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@@ -483,6 +486,7 @@ jobs:
|
|||||||
CC: 'clang'
|
CC: 'clang'
|
||||||
HOMEBREW_NO_AUTO_UPDATE: 1
|
HOMEBREW_NO_AUTO_UPDATE: 1
|
||||||
HOMEBREW_NO_INSTALL_CLEANUP: 1
|
HOMEBREW_NO_INSTALL_CLEANUP: 1
|
||||||
|
SYMBOL_CHECK: 'no'
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
@@ -515,6 +519,12 @@ jobs:
|
|||||||
env: ${{ matrix.env_vars }}
|
env: ${{ matrix.env_vars }}
|
||||||
run: ./ci/ci.sh
|
run: ./ci/ci.sh
|
||||||
|
|
||||||
|
- name: Symbol check
|
||||||
|
run: |
|
||||||
|
python3 --version
|
||||||
|
python3 -m pip install lief
|
||||||
|
python3 ./tools/symbol-check.py .libs/libsecp256k1.dylib
|
||||||
|
|
||||||
- name: Print logs
|
- name: Print logs
|
||||||
uses: ./.github/actions/print-logs
|
uses: ./.github/actions/print-logs
|
||||||
if: ${{ !cancelled() }}
|
if: ${{ !cancelled() }}
|
||||||
@@ -530,6 +540,7 @@ jobs:
|
|||||||
HOMEBREW_NO_INSTALL_CLEANUP: 1
|
HOMEBREW_NO_INSTALL_CLEANUP: 1
|
||||||
WITH_VALGRIND: 'no'
|
WITH_VALGRIND: 'no'
|
||||||
CTIMETESTS: 'no'
|
CTIMETESTS: 'no'
|
||||||
|
SYMBOL_CHECK: 'no'
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
@@ -557,6 +568,16 @@ jobs:
|
|||||||
env: ${{ matrix.env_vars }}
|
env: ${{ matrix.env_vars }}
|
||||||
run: ./ci/ci.sh
|
run: ./ci/ci.sh
|
||||||
|
|
||||||
|
- name: Symbol check
|
||||||
|
env:
|
||||||
|
VIRTUAL_ENV: '${{ github.workspace }}/venv'
|
||||||
|
run: |
|
||||||
|
python3 --version
|
||||||
|
python3 -m venv $VIRTUAL_ENV
|
||||||
|
export PATH="$VIRTUAL_ENV/bin:$PATH"
|
||||||
|
python3 -m pip install lief
|
||||||
|
python3 ./tools/symbol-check.py .libs/libsecp256k1.dylib
|
||||||
|
|
||||||
- name: Print logs
|
- name: Print logs
|
||||||
uses: ./.github/actions/print-logs
|
uses: ./.github/actions/print-logs
|
||||||
if: ${{ !cancelled() }}
|
if: ${{ !cancelled() }}
|
||||||
@@ -573,6 +594,7 @@ jobs:
|
|||||||
configuration:
|
configuration:
|
||||||
- job_name: 'x64 (MSVC): Windows (VS 2022, shared)'
|
- job_name: 'x64 (MSVC): Windows (VS 2022, shared)'
|
||||||
cmake_options: '-A x64 -DBUILD_SHARED_LIBS=ON'
|
cmake_options: '-A x64 -DBUILD_SHARED_LIBS=ON'
|
||||||
|
symbol_check: 'true'
|
||||||
- job_name: 'x64 (MSVC): Windows (VS 2022, static)'
|
- job_name: 'x64 (MSVC): Windows (VS 2022, static)'
|
||||||
cmake_options: '-A x64 -DBUILD_SHARED_LIBS=OFF'
|
cmake_options: '-A x64 -DBUILD_SHARED_LIBS=OFF'
|
||||||
- job_name: 'x64 (MSVC): Windows (VS 2022, int128_struct)'
|
- job_name: 'x64 (MSVC): Windows (VS 2022, int128_struct)'
|
||||||
@@ -601,6 +623,13 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
cd build/bin/RelWithDebInfo && file *tests.exe bench*.exe libsecp256k1-*.dll || true
|
cd build/bin/RelWithDebInfo && file *tests.exe bench*.exe libsecp256k1-*.dll || true
|
||||||
|
|
||||||
|
- name: Symbol check
|
||||||
|
if: ${{ matrix.configuration.symbol_check }}
|
||||||
|
run: |
|
||||||
|
py -3 --version
|
||||||
|
py -3 -m pip install lief
|
||||||
|
py -3 .\tools\symbol-check.py build\bin\RelWithDebInfo\libsecp256k1-5.dll
|
||||||
|
|
||||||
- name: Check
|
- name: Check
|
||||||
run: |
|
run: |
|
||||||
ctest -C RelWithDebInfo --test-dir build -j ([int]$env:NUMBER_OF_PROCESSORS + 1)
|
ctest -C RelWithDebInfo --test-dir build -j ([int]$env:NUMBER_OF_PROCESSORS + 1)
|
||||||
|
|||||||
16
ci/ci.sh
16
ci/ci.sh
@@ -14,7 +14,7 @@ print_environment() {
|
|||||||
for var in WERROR_CFLAGS MAKEFLAGS BUILD \
|
for var in WERROR_CFLAGS MAKEFLAGS BUILD \
|
||||||
ECMULTWINDOW ECMULTGENKB ASM WIDEMUL WITH_VALGRIND EXTRAFLAGS \
|
ECMULTWINDOW ECMULTGENKB ASM WIDEMUL WITH_VALGRIND EXTRAFLAGS \
|
||||||
EXPERIMENTAL ECDH RECOVERY EXTRAKEYS MUSIG SCHNORRSIG ELLSWIFT \
|
EXPERIMENTAL ECDH RECOVERY EXTRAKEYS MUSIG SCHNORRSIG ELLSWIFT \
|
||||||
SECP256K1_TEST_ITERS BENCH SECP256K1_BENCH_ITERS CTIMETESTS\
|
SECP256K1_TEST_ITERS BENCH SECP256K1_BENCH_ITERS CTIMETESTS SYMBOL_CHECK \
|
||||||
EXAMPLES \
|
EXAMPLES \
|
||||||
HOST WRAPPER_CMD \
|
HOST WRAPPER_CMD \
|
||||||
CC CFLAGS CPPFLAGS AR NM \
|
CC CFLAGS CPPFLAGS AR NM \
|
||||||
@@ -107,6 +107,20 @@ file *tests* || true
|
|||||||
file bench* || true
|
file bench* || true
|
||||||
file .libs/* || true
|
file .libs/* || true
|
||||||
|
|
||||||
|
if [ "$SYMBOL_CHECK" = "yes" ]
|
||||||
|
then
|
||||||
|
python3 --version
|
||||||
|
case "$HOST" in
|
||||||
|
*mingw*)
|
||||||
|
ls -l .libs
|
||||||
|
python3 ./tools/symbol-check.py .libs/libsecp256k1-5.dll
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
python3 ./tools/symbol-check.py .libs/libsecp256k1.so
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
# This tells `make check` to wrap test invocations.
|
# This tells `make check` to wrap test invocations.
|
||||||
export LOG_COMPILER="$WRAPPER_CMD"
|
export LOG_COMPILER="$WRAPPER_CMD"
|
||||||
|
|
||||||
|
|||||||
@@ -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-powerpc64le-linux-gnu libc6-dev-ppc64el-cross libc6-dbg:ppc64el \
|
||||||
gcc-mingw-w64-x86-64-win32 wine64 wine \
|
gcc-mingw-w64-x86-64-win32 wine64 wine \
|
||||||
gcc-mingw-w64-i686-win32 wine32 \
|
gcc-mingw-w64-i686-win32 wine32 \
|
||||||
python3 && \
|
python3-full && \
|
||||||
if ! ( dpkg --print-architecture | grep --quiet "arm64" ) ; then \
|
if ! ( dpkg --print-architecture | grep --quiet "arm64" ) ; then \
|
||||||
apt-get install --no-install-recommends -y \
|
apt-get install --no-install-recommends -y \
|
||||||
gcc-aarch64-linux-gnu libc6-dev-arm64-cross libc6-dbg:arm64 ;\
|
gcc-aarch64-linux-gnu libc6-dev-arm64-cross libc6-dbg:arm64 ;\
|
||||||
@@ -77,3 +77,7 @@ RUN \
|
|||||||
apt-get autoremove -y wget && \
|
apt-get autoremove -y wget && \
|
||||||
apt-get clean && rm -rf /var/lib/apt/lists/*
|
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
|
||||||
|
|||||||
Reference in New Issue
Block a user