Merge bitcoin-core/secp256k1#1689: ci: Convert arm64 Cirrus tasks to GHA jobs
004f57fcd8ci: Move Valgrind build for `arm64` from Cirrus to GHA (Hennadii Stepanov)5fafdfc30fci: Move `gcc-snapshot` build for `arm64` from Cirrus to GHA (Hennadii Stepanov)e814b79a8bci: Switch `arm64_debian` from QEMU to native `arm64` Docker image (Hennadii Stepanov)bcf77346b9ci: Add `arm64` architecture to `docker_cache` job (Hennadii Stepanov)b77aae9226ci: Rename Docker image tag to reflect architecture (Hennadii Stepanov) Pull request description: ACKs for top commit: real-or-random: ACK004f57fcd8jonasnick: ACK004f57fcd8Tree-SHA512: 5c502ac4ef0f8ca3a02354a07f53dd7818edab233fc55c1a579c48fd03bf879cca725027f435af4fbd92dd732cd2bdbf2935c77e2995eccb34cb54e1d64be61b
This commit is contained in:
104
.cirrus.yml
104
.cirrus.yml
@@ -1,104 +0,0 @@
|
|||||||
env:
|
|
||||||
### cirrus config
|
|
||||||
CIRRUS_CLONE_DEPTH: 1
|
|
||||||
### compiler options
|
|
||||||
HOST:
|
|
||||||
WRAPPER_CMD:
|
|
||||||
# Specific warnings can be disabled with -Wno-error=foo.
|
|
||||||
# -pedantic-errors is not equivalent to -Werror=pedantic and thus not implied by -Werror according to the GCC manual.
|
|
||||||
WERROR_CFLAGS: -Werror -pedantic-errors
|
|
||||||
MAKEFLAGS: -j4
|
|
||||||
BUILD: check
|
|
||||||
### secp256k1 config
|
|
||||||
ECMULTWINDOW: 15
|
|
||||||
ECMULTGENKB: 22
|
|
||||||
ASM: no
|
|
||||||
WIDEMUL: auto
|
|
||||||
WITH_VALGRIND: yes
|
|
||||||
EXTRAFLAGS:
|
|
||||||
### secp256k1 modules
|
|
||||||
EXPERIMENTAL: no
|
|
||||||
ECDH: no
|
|
||||||
RECOVERY: no
|
|
||||||
EXTRAKEYS: no
|
|
||||||
SCHNORRSIG: no
|
|
||||||
MUSIG: no
|
|
||||||
ELLSWIFT: no
|
|
||||||
### test options
|
|
||||||
SECP256K1_TEST_ITERS: 64
|
|
||||||
BENCH: yes
|
|
||||||
SECP256K1_BENCH_ITERS: 2
|
|
||||||
CTIMETESTS: yes
|
|
||||||
SYMBOL_CHECK: yes
|
|
||||||
VIRTUAL_ENV: /root/venv
|
|
||||||
# Compile and run the tests
|
|
||||||
EXAMPLES: yes
|
|
||||||
|
|
||||||
cat_logs_snippet: &CAT_LOGS
|
|
||||||
always:
|
|
||||||
cat_tests_log_script:
|
|
||||||
- cat tests.log || true
|
|
||||||
cat_noverify_tests_log_script:
|
|
||||||
- cat noverify_tests.log || true
|
|
||||||
cat_exhaustive_tests_log_script:
|
|
||||||
- cat exhaustive_tests.log || true
|
|
||||||
cat_ctime_tests_log_script:
|
|
||||||
- cat ctime_tests.log || true
|
|
||||||
cat_bench_log_script:
|
|
||||||
- cat bench.log || true
|
|
||||||
cat_config_log_script:
|
|
||||||
- cat config.log || true
|
|
||||||
cat_test_env_script:
|
|
||||||
- cat test_env.log || true
|
|
||||||
cat_ci_env_script:
|
|
||||||
- env
|
|
||||||
|
|
||||||
linux_arm64_container_snippet: &LINUX_ARM64_CONTAINER
|
|
||||||
env_script:
|
|
||||||
- export PATH="$VIRTUAL_ENV/bin:$PATH"
|
|
||||||
- env | tee /tmp/env
|
|
||||||
build_script:
|
|
||||||
- DOCKER_BUILDKIT=1 docker build --file "ci/linux-debian.Dockerfile" --tag="ci_secp256k1_arm"
|
|
||||||
- docker image prune --force # Cleanup stale layers
|
|
||||||
test_script:
|
|
||||||
- docker run --rm --mount "type=bind,src=./,dst=/ci_secp256k1" --env-file /tmp/env --replace --name "ci_secp256k1_arm" "ci_secp256k1_arm" bash -c "cd /ci_secp256k1/ && ./ci/ci.sh"
|
|
||||||
|
|
||||||
task:
|
|
||||||
name: "ARM64: Linux (Debian stable)"
|
|
||||||
persistent_worker:
|
|
||||||
labels:
|
|
||||||
type: arm64
|
|
||||||
env:
|
|
||||||
ECDH: yes
|
|
||||||
RECOVERY: yes
|
|
||||||
EXTRAKEYS: yes
|
|
||||||
SCHNORRSIG: yes
|
|
||||||
MUSIG: yes
|
|
||||||
ELLSWIFT: yes
|
|
||||||
matrix:
|
|
||||||
# Currently only gcc-snapshot, the other compilers are tested on GHA with QEMU
|
|
||||||
- env: { CC: 'gcc-snapshot' }
|
|
||||||
<< : *LINUX_ARM64_CONTAINER
|
|
||||||
<< : *CAT_LOGS
|
|
||||||
|
|
||||||
task:
|
|
||||||
name: "ARM64: Linux (Debian stable), Valgrind"
|
|
||||||
persistent_worker:
|
|
||||||
labels:
|
|
||||||
type: arm64
|
|
||||||
env:
|
|
||||||
ECDH: yes
|
|
||||||
RECOVERY: yes
|
|
||||||
EXTRAKEYS: yes
|
|
||||||
SCHNORRSIG: yes
|
|
||||||
MUSIG: yes
|
|
||||||
ELLSWIFT: yes
|
|
||||||
WRAPPER_CMD: 'valgrind --error-exitcode=42'
|
|
||||||
SECP256K1_TEST_ITERS: 2
|
|
||||||
matrix:
|
|
||||||
- env: { CC: 'gcc' }
|
|
||||||
- env: { CC: 'clang' }
|
|
||||||
- env: { CC: 'gcc-snapshot' }
|
|
||||||
- env: { CC: 'clang-snapshot' }
|
|
||||||
<< : *LINUX_ARM64_CONTAINER
|
|
||||||
<< : *CAT_LOGS
|
|
||||||
99
.github/workflows/ci.yml
vendored
99
.github/workflows/ci.yml
vendored
@@ -46,8 +46,18 @@ env:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
docker_cache:
|
docker_cache:
|
||||||
name: "Build Docker image"
|
name: "Build ${{ matrix.arch }} Docker image"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ${{ matrix.runner }}
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- arch: x64
|
||||||
|
runner: ubuntu-latest
|
||||||
|
- arch: arm64
|
||||||
|
runner: ubuntu-24.04-arm
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
@@ -60,11 +70,11 @@ jobs:
|
|||||||
uses: docker/build-push-action@v5
|
uses: docker/build-push-action@v5
|
||||||
with:
|
with:
|
||||||
file: ./ci/linux-debian.Dockerfile
|
file: ./ci/linux-debian.Dockerfile
|
||||||
tags: linux-debian-image
|
tags: ${{ matrix.arch }}-debian-image
|
||||||
cache-from: type=gha
|
cache-from: type=gha
|
||||||
cache-to: type=gha,mode=min
|
cache-to: type=gha,mode=min
|
||||||
|
|
||||||
linux_debian:
|
x86_64-debian:
|
||||||
name: "x86_64: Linux (Debian stable)"
|
name: "x86_64: Linux (Debian stable)"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: docker_cache
|
needs: docker_cache
|
||||||
@@ -106,7 +116,7 @@ jobs:
|
|||||||
uses: ./.github/actions/run-in-docker-action
|
uses: ./.github/actions/run-in-docker-action
|
||||||
with:
|
with:
|
||||||
dockerfile: ./ci/linux-debian.Dockerfile
|
dockerfile: ./ci/linux-debian.Dockerfile
|
||||||
tag: linux-debian-image
|
tag: x64-debian-image
|
||||||
|
|
||||||
- name: Print logs
|
- name: Print logs
|
||||||
uses: ./.github/actions/print-logs
|
uses: ./.github/actions/print-logs
|
||||||
@@ -142,7 +152,7 @@ jobs:
|
|||||||
uses: ./.github/actions/run-in-docker-action
|
uses: ./.github/actions/run-in-docker-action
|
||||||
with:
|
with:
|
||||||
dockerfile: ./ci/linux-debian.Dockerfile
|
dockerfile: ./ci/linux-debian.Dockerfile
|
||||||
tag: linux-debian-image
|
tag: x64-debian-image
|
||||||
|
|
||||||
- name: Print logs
|
- name: Print logs
|
||||||
uses: ./.github/actions/print-logs
|
uses: ./.github/actions/print-logs
|
||||||
@@ -174,7 +184,7 @@ jobs:
|
|||||||
uses: ./.github/actions/run-in-docker-action
|
uses: ./.github/actions/run-in-docker-action
|
||||||
with:
|
with:
|
||||||
dockerfile: ./ci/linux-debian.Dockerfile
|
dockerfile: ./ci/linux-debian.Dockerfile
|
||||||
tag: linux-debian-image
|
tag: x64-debian-image
|
||||||
|
|
||||||
- name: Print logs
|
- name: Print logs
|
||||||
uses: ./.github/actions/print-logs
|
uses: ./.github/actions/print-logs
|
||||||
@@ -215,21 +225,19 @@ jobs:
|
|||||||
uses: ./.github/actions/run-in-docker-action
|
uses: ./.github/actions/run-in-docker-action
|
||||||
with:
|
with:
|
||||||
dockerfile: ./ci/linux-debian.Dockerfile
|
dockerfile: ./ci/linux-debian.Dockerfile
|
||||||
tag: linux-debian-image
|
tag: x64-debian-image
|
||||||
|
|
||||||
- name: Print logs
|
- name: Print logs
|
||||||
uses: ./.github/actions/print-logs
|
uses: ./.github/actions/print-logs
|
||||||
if: ${{ !cancelled() }}
|
if: ${{ !cancelled() }}
|
||||||
|
|
||||||
arm64_debian:
|
arm64-debian:
|
||||||
name: "ARM64: Linux (Debian stable, QEMU)"
|
name: "arm64: Linux (Debian stable)"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-24.04-arm
|
||||||
needs: docker_cache
|
needs: docker_cache
|
||||||
|
|
||||||
env:
|
env:
|
||||||
WRAPPER_CMD: 'qemu-aarch64'
|
|
||||||
SECP256K1_TEST_ITERS: 16
|
SECP256K1_TEST_ITERS: 16
|
||||||
HOST: 'aarch64-linux-gnu'
|
|
||||||
WITH_VALGRIND: 'no'
|
WITH_VALGRIND: 'no'
|
||||||
ECDH: 'yes'
|
ECDH: 'yes'
|
||||||
RECOVERY: 'yes'
|
RECOVERY: 'yes'
|
||||||
@@ -238,27 +246,26 @@ jobs:
|
|||||||
MUSIG: 'yes'
|
MUSIG: 'yes'
|
||||||
ELLSWIFT: 'yes'
|
ELLSWIFT: 'yes'
|
||||||
CTIMETESTS: 'no'
|
CTIMETESTS: 'no'
|
||||||
|
CC: ${{ matrix.cc }}
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
configuration:
|
cc:
|
||||||
- env_vars: { } # gcc
|
- 'gcc'
|
||||||
- env_vars: # clang
|
- 'clang'
|
||||||
CC: 'clang --target=aarch64-linux-gnu'
|
- 'gcc-snapshot'
|
||||||
- env_vars: # clang-snapshot
|
- 'clang-snapshot'
|
||||||
CC: 'clang-snapshot --target=aarch64-linux-gnu'
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: CI script
|
- name: CI script
|
||||||
env: ${{ matrix.configuration.env_vars }}
|
|
||||||
uses: ./.github/actions/run-in-docker-action
|
uses: ./.github/actions/run-in-docker-action
|
||||||
with:
|
with:
|
||||||
dockerfile: ./ci/linux-debian.Dockerfile
|
dockerfile: ./ci/linux-debian.Dockerfile
|
||||||
tag: linux-debian-image
|
tag: arm64-debian-image
|
||||||
|
|
||||||
- name: Print logs
|
- name: Print logs
|
||||||
uses: ./.github/actions/print-logs
|
uses: ./.github/actions/print-logs
|
||||||
@@ -290,7 +297,7 @@ jobs:
|
|||||||
uses: ./.github/actions/run-in-docker-action
|
uses: ./.github/actions/run-in-docker-action
|
||||||
with:
|
with:
|
||||||
dockerfile: ./ci/linux-debian.Dockerfile
|
dockerfile: ./ci/linux-debian.Dockerfile
|
||||||
tag: linux-debian-image
|
tag: x64-debian-image
|
||||||
|
|
||||||
- name: Print logs
|
- name: Print logs
|
||||||
uses: ./.github/actions/print-logs
|
uses: ./.github/actions/print-logs
|
||||||
@@ -298,18 +305,38 @@ jobs:
|
|||||||
|
|
||||||
|
|
||||||
valgrind_debian:
|
valgrind_debian:
|
||||||
name: "Valgrind (memcheck)"
|
name: "Valgrind ${{ matrix.binary_arch }} (memcheck)"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ${{ matrix.runner }}
|
||||||
needs: docker_cache
|
needs: docker_cache
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
configuration:
|
include:
|
||||||
- env_vars: { CC: 'clang', ASM: 'auto' }
|
- docker_arch: x64
|
||||||
- env_vars: { CC: 'i686-linux-gnu-gcc', HOST: 'i686-linux-gnu', ASM: 'auto' }
|
runner: ubuntu-latest
|
||||||
- env_vars: { CC: 'clang', ASM: 'no', ECMULTGENKB: 2, ECMULTWINDOW: 2 }
|
binary_arch: x64
|
||||||
- env_vars: { CC: 'i686-linux-gnu-gcc', HOST: 'i686-linux-gnu', ASM: 'no', ECMULTGENKB: 2, ECMULTWINDOW: 2 }
|
env_vars: { CC: 'clang', ASM: 'auto' }
|
||||||
|
- docker_arch: x64
|
||||||
|
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
|
||||||
|
binary_arch: arm64
|
||||||
|
env_vars: { CC: 'clang', ASM: 'auto' }
|
||||||
|
- docker_arch: x64
|
||||||
|
runner: ubuntu-latest
|
||||||
|
binary_arch: x64
|
||||||
|
env_vars: { CC: 'clang', ASM: 'no', ECMULTGENKB: 2, ECMULTWINDOW: 2 }
|
||||||
|
- docker_arch: x64
|
||||||
|
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
|
||||||
|
binary_arch: arm64
|
||||||
|
env_vars: { CC: 'clang', ASM: 'no', ECMULTGENKB: 2, ECMULTWINDOW: 2 }
|
||||||
|
|
||||||
env:
|
env:
|
||||||
# The `--error-exitcode` is required to make the test fail if valgrind found errors,
|
# The `--error-exitcode` is required to make the test fail if valgrind found errors,
|
||||||
@@ -329,11 +356,11 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: CI script
|
- name: CI script
|
||||||
env: ${{ matrix.configuration.env_vars }}
|
env: ${{ matrix.env_vars }}
|
||||||
uses: ./.github/actions/run-in-docker-action
|
uses: ./.github/actions/run-in-docker-action
|
||||||
with:
|
with:
|
||||||
dockerfile: ./ci/linux-debian.Dockerfile
|
dockerfile: ./ci/linux-debian.Dockerfile
|
||||||
tag: linux-debian-image
|
tag: ${{ matrix.docker_arch }}-debian-image
|
||||||
|
|
||||||
- name: Print logs
|
- name: Print logs
|
||||||
uses: ./.github/actions/print-logs
|
uses: ./.github/actions/print-logs
|
||||||
@@ -377,7 +404,7 @@ jobs:
|
|||||||
uses: ./.github/actions/run-in-docker-action
|
uses: ./.github/actions/run-in-docker-action
|
||||||
with:
|
with:
|
||||||
dockerfile: ./ci/linux-debian.Dockerfile
|
dockerfile: ./ci/linux-debian.Dockerfile
|
||||||
tag: linux-debian-image
|
tag: x64-debian-image
|
||||||
|
|
||||||
- name: Print logs
|
- name: Print logs
|
||||||
uses: ./.github/actions/print-logs
|
uses: ./.github/actions/print-logs
|
||||||
@@ -428,7 +455,7 @@ jobs:
|
|||||||
uses: ./.github/actions/run-in-docker-action
|
uses: ./.github/actions/run-in-docker-action
|
||||||
with:
|
with:
|
||||||
dockerfile: ./ci/linux-debian.Dockerfile
|
dockerfile: ./ci/linux-debian.Dockerfile
|
||||||
tag: linux-debian-image
|
tag: x64-debian-image
|
||||||
|
|
||||||
- name: Print logs
|
- name: Print logs
|
||||||
uses: ./.github/actions/print-logs
|
uses: ./.github/actions/print-logs
|
||||||
@@ -471,7 +498,7 @@ jobs:
|
|||||||
uses: ./.github/actions/run-in-docker-action
|
uses: ./.github/actions/run-in-docker-action
|
||||||
with:
|
with:
|
||||||
dockerfile: ./ci/linux-debian.Dockerfile
|
dockerfile: ./ci/linux-debian.Dockerfile
|
||||||
tag: linux-debian-image
|
tag: x64-debian-image
|
||||||
|
|
||||||
- name: Print logs
|
- name: Print logs
|
||||||
uses: ./.github/actions/print-logs
|
uses: ./.github/actions/print-logs
|
||||||
@@ -678,7 +705,7 @@ jobs:
|
|||||||
uses: ./.github/actions/run-in-docker-action
|
uses: ./.github/actions/run-in-docker-action
|
||||||
with:
|
with:
|
||||||
dockerfile: ./ci/linux-debian.Dockerfile
|
dockerfile: ./ci/linux-debian.Dockerfile
|
||||||
tag: linux-debian-image
|
tag: x64-debian-image
|
||||||
|
|
||||||
- name: Print logs
|
- name: Print logs
|
||||||
uses: ./.github/actions/print-logs
|
uses: ./.github/actions/print-logs
|
||||||
@@ -697,7 +724,7 @@ jobs:
|
|||||||
uses: ./.github/actions/run-in-docker-action
|
uses: ./.github/actions/run-in-docker-action
|
||||||
with:
|
with:
|
||||||
dockerfile: ./ci/linux-debian.Dockerfile
|
dockerfile: ./ci/linux-debian.Dockerfile
|
||||||
tag: linux-debian-image
|
tag: x64-debian-image
|
||||||
command: |
|
command: |
|
||||||
g++ -Werror include/*.h
|
g++ -Werror include/*.h
|
||||||
clang -Werror -x c++-header include/*.h
|
clang -Werror -x c++-header include/*.h
|
||||||
|
|||||||
Reference in New Issue
Block a user