Merge commits '88be4e8d b4756543 10dab907 58178851 de6af6ae baa26542 2b7337f6 a44a3393 f44c1ebd d543c0d9 43e7b115 7a2fff85 ' into temp-merge-1758
This commit is contained in:
23
.github/actions/run-in-docker-action/action.yml
vendored
23
.github/actions/run-in-docker-action/action.yml
vendored
@@ -4,37 +4,35 @@ inputs:
|
||||
dockerfile:
|
||||
description: 'A Dockerfile that defines an image'
|
||||
required: true
|
||||
tag:
|
||||
description: 'A tag of an image'
|
||||
required: true
|
||||
scope:
|
||||
description: 'A cached image scope'
|
||||
required: false
|
||||
default: ${{ runner.arch }}
|
||||
command:
|
||||
description: 'A command to run in a container'
|
||||
required: false
|
||||
default: ./ci/ci.sh
|
||||
required: true
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- uses: docker/setup-buildx-action@v3
|
||||
|
||||
- uses: docker/build-push-action@v5
|
||||
- uses: docker/build-push-action@v6
|
||||
id: main_builder
|
||||
continue-on-error: true
|
||||
with:
|
||||
context: .
|
||||
file: ${{ inputs.dockerfile }}
|
||||
tags: ${{ inputs.tag }}
|
||||
load: true
|
||||
cache-from: type=gha
|
||||
cache-from: type=gha,scope=${{ inputs.scope }}
|
||||
|
||||
- uses: docker/build-push-action@v5
|
||||
- uses: docker/build-push-action@v6
|
||||
id: retry_builder
|
||||
if: steps.main_builder.outcome == 'failure'
|
||||
with:
|
||||
context: .
|
||||
file: ${{ inputs.dockerfile }}
|
||||
tags: ${{ inputs.tag }}
|
||||
load: true
|
||||
cache-from: type=gha
|
||||
cache-from: type=gha,scope=${{ inputs.scope }}
|
||||
|
||||
- # Workaround for https://github.com/google/sanitizers/issues/1614 .
|
||||
# The underlying issue has been fixed in clang 18.1.3.
|
||||
@@ -47,7 +45,8 @@ runs:
|
||||
$(echo '${{ toJSON(env) }}' | jq -r 'keys[] | "--env \(.) "') \
|
||||
--volume ${{ github.workspace }}:${{ github.workspace }} \
|
||||
--workdir ${{ github.workspace }} \
|
||||
${{ inputs.tag }} bash -c "
|
||||
$(docker images -q | head -n1) \
|
||||
bash -c "
|
||||
git config --global --add safe.directory ${{ github.workspace }}
|
||||
${{ inputs.command }}
|
||||
"
|
||||
|
||||
264
.github/workflows/ci.yml
vendored
264
.github/workflows/ci.yml
vendored
@@ -74,12 +74,11 @@ jobs:
|
||||
network=host
|
||||
|
||||
- name: Build container
|
||||
uses: docker/build-push-action@v5
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
file: ./ci/linux-debian.Dockerfile
|
||||
tags: ${{ matrix.arch }}-debian-image
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=min
|
||||
cache-from: type=gha,scope=${{ runner.arch }}
|
||||
cache-to: type=gha,scope=${{ runner.arch }},mode=min
|
||||
|
||||
x86_64-debian:
|
||||
name: "x86_64: Linux (Debian stable)"
|
||||
@@ -115,17 +114,20 @@ jobs:
|
||||
CC: ${{ matrix.cc }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- &CHECKOUT
|
||||
name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: CI script
|
||||
- &CI_SCRIPT_IN_DOCKER
|
||||
name: CI script
|
||||
env: ${{ matrix.configuration.env_vars }}
|
||||
uses: ./.github/actions/run-in-docker-action
|
||||
with:
|
||||
dockerfile: ./ci/linux-debian.Dockerfile
|
||||
tag: x64-debian-image
|
||||
command: ./ci/ci.sh
|
||||
|
||||
- name: Print logs
|
||||
- &PRINT_LOGS
|
||||
name: Print logs
|
||||
uses: ./.github/actions/print-logs
|
||||
if: ${{ !cancelled() }}
|
||||
|
||||
@@ -137,6 +139,8 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
configuration:
|
||||
- env_vars: {}
|
||||
cc:
|
||||
- 'i686-linux-gnu-gcc'
|
||||
- 'clang --target=i686-pc-linux-gnu -isystem /usr/i686-linux-gnu/include'
|
||||
@@ -160,24 +164,20 @@ jobs:
|
||||
CC: ${{ matrix.cc }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: CI script
|
||||
uses: ./.github/actions/run-in-docker-action
|
||||
with:
|
||||
dockerfile: ./ci/linux-debian.Dockerfile
|
||||
tag: x64-debian-image
|
||||
|
||||
- name: Print logs
|
||||
uses: ./.github/actions/print-logs
|
||||
if: ${{ !cancelled() }}
|
||||
- *CHECKOUT
|
||||
- *CI_SCRIPT_IN_DOCKER
|
||||
- *PRINT_LOGS
|
||||
|
||||
s390x_debian:
|
||||
name: "s390x (big-endian): Linux (Debian stable, QEMU)"
|
||||
runs-on: ubuntu-latest
|
||||
needs: docker_cache
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
configuration:
|
||||
- env_vars: {}
|
||||
|
||||
env:
|
||||
WRAPPER_CMD: 'qemu-s390x'
|
||||
SECP256K1_TEST_ITERS: 16
|
||||
@@ -200,19 +200,9 @@ jobs:
|
||||
CTIMETESTS: 'no'
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: CI script
|
||||
uses: ./.github/actions/run-in-docker-action
|
||||
with:
|
||||
dockerfile: ./ci/linux-debian.Dockerfile
|
||||
tag: x64-debian-image
|
||||
|
||||
- name: Print logs
|
||||
uses: ./.github/actions/print-logs
|
||||
if: ${{ !cancelled() }}
|
||||
|
||||
- *CHECKOUT
|
||||
- *CI_SCRIPT_IN_DOCKER
|
||||
- *PRINT_LOGS
|
||||
|
||||
arm32_debian:
|
||||
name: "ARM32: Linux (Debian stable, QEMU)"
|
||||
@@ -248,19 +238,9 @@ jobs:
|
||||
CTIMETESTS: 'no'
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: CI script
|
||||
env: ${{ matrix.configuration.env_vars }}
|
||||
uses: ./.github/actions/run-in-docker-action
|
||||
with:
|
||||
dockerfile: ./ci/linux-debian.Dockerfile
|
||||
tag: x64-debian-image
|
||||
|
||||
- name: Print logs
|
||||
uses: ./.github/actions/print-logs
|
||||
if: ${{ !cancelled() }}
|
||||
- *CHECKOUT
|
||||
- *CI_SCRIPT_IN_DOCKER
|
||||
- *PRINT_LOGS
|
||||
|
||||
arm64-debian:
|
||||
name: "arm64: Linux (Debian stable)"
|
||||
@@ -290,6 +270,8 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
configuration:
|
||||
- env_vars: {}
|
||||
cc:
|
||||
- 'gcc'
|
||||
- 'clang'
|
||||
@@ -297,24 +279,20 @@ jobs:
|
||||
- 'clang-snapshot'
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: CI script
|
||||
uses: ./.github/actions/run-in-docker-action
|
||||
with:
|
||||
dockerfile: ./ci/linux-debian.Dockerfile
|
||||
tag: arm64-debian-image
|
||||
|
||||
- name: Print logs
|
||||
uses: ./.github/actions/print-logs
|
||||
if: ${{ !cancelled() }}
|
||||
- *CHECKOUT
|
||||
- *CI_SCRIPT_IN_DOCKER
|
||||
- *PRINT_LOGS
|
||||
|
||||
ppc64le_debian:
|
||||
name: "ppc64le: Linux (Debian stable, QEMU)"
|
||||
runs-on: ubuntu-latest
|
||||
needs: docker_cache
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
configuration:
|
||||
- env_vars: {}
|
||||
|
||||
env:
|
||||
WRAPPER_CMD: 'qemu-ppc64le'
|
||||
SECP256K1_TEST_ITERS: 16
|
||||
@@ -337,51 +315,35 @@ jobs:
|
||||
CTIMETESTS: 'no'
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: CI script
|
||||
uses: ./.github/actions/run-in-docker-action
|
||||
with:
|
||||
dockerfile: ./ci/linux-debian.Dockerfile
|
||||
tag: x64-debian-image
|
||||
|
||||
- name: Print logs
|
||||
uses: ./.github/actions/print-logs
|
||||
if: ${{ !cancelled() }}
|
||||
|
||||
- *CHECKOUT
|
||||
- *CI_SCRIPT_IN_DOCKER
|
||||
- *PRINT_LOGS
|
||||
|
||||
valgrind_debian:
|
||||
name: "Valgrind ${{ matrix.binary_arch }} (memcheck)"
|
||||
runs-on: ${{ matrix.runner }}
|
||||
name: "Valgrind ${{ matrix.configuration.binary_arch }} (memcheck)"
|
||||
runs-on: ${{ matrix.configuration.runner }}
|
||||
needs: docker_cache
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- docker_arch: x64
|
||||
runner: ubuntu-latest
|
||||
configuration:
|
||||
- runner: ubuntu-latest
|
||||
binary_arch: x64
|
||||
env_vars: { CC: 'clang', ASM: 'auto' }
|
||||
- docker_arch: x64
|
||||
runner: ubuntu-latest
|
||||
- runner: ubuntu-latest
|
||||
binary_arch: i686
|
||||
env_vars: { CC: 'i686-linux-gnu-gcc', HOST: 'i686-linux-gnu', ASM: 'auto' }
|
||||
- docker_arch: arm64
|
||||
runner: ubuntu-24.04-arm
|
||||
- runner: ubuntu-24.04-arm
|
||||
binary_arch: arm64
|
||||
env_vars: { CC: 'clang', ASM: 'auto' }
|
||||
- docker_arch: x64
|
||||
runner: ubuntu-latest
|
||||
- runner: ubuntu-latest
|
||||
binary_arch: x64
|
||||
env_vars: { CC: 'clang', ASM: 'no', ECMULTGENKB: 2, ECMULTWINDOW: 2 }
|
||||
- docker_arch: x64
|
||||
runner: ubuntu-latest
|
||||
- runner: ubuntu-latest
|
||||
binary_arch: i686
|
||||
env_vars: { CC: 'i686-linux-gnu-gcc', HOST: 'i686-linux-gnu', ASM: 'no', ECMULTGENKB: 2, ECMULTWINDOW: 2 }
|
||||
- docker_arch: arm64
|
||||
runner: ubuntu-24.04-arm
|
||||
- runner: ubuntu-24.04-arm
|
||||
binary_arch: arm64
|
||||
env_vars: { CC: 'clang', ASM: 'no', ECMULTGENKB: 2, ECMULTWINDOW: 2 }
|
||||
|
||||
@@ -407,19 +369,9 @@ jobs:
|
||||
SECP256K1_TEST_ITERS: 2
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: CI script
|
||||
env: ${{ matrix.env_vars }}
|
||||
uses: ./.github/actions/run-in-docker-action
|
||||
with:
|
||||
dockerfile: ./ci/linux-debian.Dockerfile
|
||||
tag: ${{ matrix.docker_arch }}-debian-image
|
||||
|
||||
- name: Print logs
|
||||
uses: ./.github/actions/print-logs
|
||||
if: ${{ !cancelled() }}
|
||||
- *CHECKOUT
|
||||
- *CI_SCRIPT_IN_DOCKER
|
||||
- *PRINT_LOGS
|
||||
|
||||
sanitizers_debian:
|
||||
name: "UBSan, ASan, LSan"
|
||||
@@ -459,19 +411,9 @@ jobs:
|
||||
SYMBOL_CHECK: 'no'
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: CI script
|
||||
env: ${{ matrix.configuration.env_vars }}
|
||||
uses: ./.github/actions/run-in-docker-action
|
||||
with:
|
||||
dockerfile: ./ci/linux-debian.Dockerfile
|
||||
tag: x64-debian-image
|
||||
|
||||
- name: Print logs
|
||||
uses: ./.github/actions/print-logs
|
||||
if: ${{ !cancelled() }}
|
||||
- *CHECKOUT
|
||||
- *CI_SCRIPT_IN_DOCKER
|
||||
- *PRINT_LOGS
|
||||
|
||||
msan_debian:
|
||||
name: "MSan"
|
||||
@@ -495,6 +437,9 @@ jobs:
|
||||
# when ctime_tests when enabled.
|
||||
CFLAGS: '-fsanitize=memory -fsanitize-recover=memory -fsanitize-memory-param-retval -g'
|
||||
CTIMETESTS: 'no'
|
||||
cc:
|
||||
- 'clang'
|
||||
- 'clang-snapshot'
|
||||
|
||||
env:
|
||||
ECDH: 'yes'
|
||||
@@ -511,27 +456,16 @@ jobs:
|
||||
ECDSAADAPTOR: 'yes'
|
||||
BPPP: 'yes'
|
||||
SCHNORRSIG_HALFAGG: 'yes'
|
||||
CC: 'clang'
|
||||
CC: ${{ matrix.cc }}
|
||||
SECP256K1_TEST_ITERS: 32
|
||||
ASM: 'no'
|
||||
WITH_VALGRIND: 'no'
|
||||
SYMBOL_CHECK: 'no'
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: CI script
|
||||
env: ${{ matrix.configuration.env_vars }}
|
||||
uses: ./.github/actions/run-in-docker-action
|
||||
with:
|
||||
dockerfile: ./ci/linux-debian.Dockerfile
|
||||
tag: x64-debian-image
|
||||
|
||||
- name: Print logs
|
||||
uses: ./.github/actions/print-logs
|
||||
if: ${{ !cancelled() }}
|
||||
|
||||
- *CHECKOUT
|
||||
- *CI_SCRIPT_IN_DOCKER
|
||||
- *PRINT_LOGS
|
||||
|
||||
mingw_debian:
|
||||
name: ${{ matrix.configuration.job_name }}
|
||||
@@ -569,19 +503,9 @@ jobs:
|
||||
HOST: 'i686-w64-mingw32'
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: CI script
|
||||
env: ${{ matrix.configuration.env_vars }}
|
||||
uses: ./.github/actions/run-in-docker-action
|
||||
with:
|
||||
dockerfile: ./ci/linux-debian.Dockerfile
|
||||
tag: x64-debian-image
|
||||
|
||||
- name: Print logs
|
||||
uses: ./.github/actions/print-logs
|
||||
if: ${{ !cancelled() }}
|
||||
- *CHECKOUT
|
||||
- *CI_SCRIPT_IN_DOCKER
|
||||
- *PRINT_LOGS
|
||||
|
||||
x86_64-macos-native:
|
||||
name: "x86_64: macOS Sequoia, Valgrind"
|
||||
@@ -609,8 +533,7 @@ jobs:
|
||||
- BUILD: 'distcheck'
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- *CHECKOUT
|
||||
|
||||
- name: Install Homebrew packages
|
||||
run: |
|
||||
@@ -620,7 +543,8 @@ jobs:
|
||||
- name: Install and cache Valgrind
|
||||
uses: ./.github/actions/install-homebrew-valgrind
|
||||
|
||||
- name: CI script
|
||||
- &CI_SCRIPT_ON_HOST
|
||||
name: CI script
|
||||
env: ${{ matrix.env_vars }}
|
||||
run: ./ci/ci.sh
|
||||
|
||||
@@ -634,9 +558,7 @@ jobs:
|
||||
python3 -m pip install lief
|
||||
python3 ./tools/symbol-check.py .libs/libsecp256k1.dylib
|
||||
|
||||
- name: Print logs
|
||||
uses: ./.github/actions/print-logs
|
||||
if: ${{ !cancelled() }}
|
||||
- *PRINT_LOGS
|
||||
|
||||
arm64-macos-native:
|
||||
name: "ARM64: macOS Sonoma"
|
||||
@@ -665,17 +587,14 @@ jobs:
|
||||
- BUILD: 'distcheck'
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- *CHECKOUT
|
||||
|
||||
- name: Install Homebrew packages
|
||||
run: |
|
||||
brew install --quiet automake libtool gcc
|
||||
ln -s $(brew --prefix gcc)/bin/gcc-?? /usr/local/bin/gcc
|
||||
|
||||
- name: CI script
|
||||
env: ${{ matrix.env_vars }}
|
||||
run: ./ci/ci.sh
|
||||
- *CI_SCRIPT_ON_HOST
|
||||
|
||||
- name: Symbol check
|
||||
env:
|
||||
@@ -687,10 +606,7 @@ jobs:
|
||||
python3 -m pip install lief
|
||||
python3 ./tools/symbol-check.py .libs/libsecp256k1.dylib
|
||||
|
||||
- name: Print logs
|
||||
uses: ./.github/actions/print-logs
|
||||
if: ${{ !cancelled() }}
|
||||
|
||||
- *PRINT_LOGS
|
||||
|
||||
win64-native:
|
||||
name: ${{ matrix.configuration.job_name }}
|
||||
@@ -725,8 +641,7 @@ jobs:
|
||||
cpp_flags: '/DSECP256K1_MSVC_MULH_TEST_OVERRIDE'
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- *CHECKOUT
|
||||
|
||||
- name: Generate buildsystem
|
||||
run: cmake -E env CFLAGS="/WX ${{ matrix.configuration.cpp_flags }}" cmake -B build -DSECP256K1_ENABLE_MODULE_RECOVERY=ON -DSECP256K1_BUILD_EXAMPLES=ON ${{ matrix.configuration.cmake_options }}
|
||||
@@ -761,8 +676,7 @@ jobs:
|
||||
runs-on: windows-2022
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- *CHECKOUT
|
||||
|
||||
- name: Add cl.exe to PATH
|
||||
uses: ilammy/msvc-dev-cmd@v1
|
||||
@@ -776,6 +690,11 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
needs: docker_cache
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
configuration:
|
||||
- env_vars: {}
|
||||
|
||||
env:
|
||||
CC: 'g++'
|
||||
CFLAGS: '-fpermissive -g'
|
||||
@@ -797,18 +716,9 @@ jobs:
|
||||
SCHNORRSIG_HALFAGG: 'yes'
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: CI script
|
||||
uses: ./.github/actions/run-in-docker-action
|
||||
with:
|
||||
dockerfile: ./ci/linux-debian.Dockerfile
|
||||
tag: x64-debian-image
|
||||
|
||||
- name: Print logs
|
||||
uses: ./.github/actions/print-logs
|
||||
if: ${{ !cancelled() }}
|
||||
- *CHECKOUT
|
||||
- *CI_SCRIPT_IN_DOCKER
|
||||
- *PRINT_LOGS
|
||||
|
||||
cxx_headers_debian:
|
||||
name: "C++ (public headers)"
|
||||
@@ -816,14 +726,12 @@ jobs:
|
||||
needs: docker_cache
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- *CHECKOUT
|
||||
|
||||
- name: CI script
|
||||
uses: ./.github/actions/run-in-docker-action
|
||||
with:
|
||||
dockerfile: ./ci/linux-debian.Dockerfile
|
||||
tag: x64-debian-image
|
||||
command: |
|
||||
g++ -Werror include/*.h
|
||||
clang -Werror -x c++-header include/*.h
|
||||
@@ -836,8 +744,7 @@ jobs:
|
||||
options: --user root
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- *CHECKOUT
|
||||
|
||||
- name: CI script
|
||||
run: |
|
||||
@@ -848,8 +755,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- *CHECKOUT
|
||||
|
||||
- run: ./autogen.sh && ./configure --enable-dev-mode && make distcheck
|
||||
|
||||
|
||||
Reference in New Issue
Block a user