Skip to content

Commit 2e6cf9b

Browse files
Merge bitcoin-core/secp256k1#1396: ci, gha: Add "x86_64: Linux (Debian stable)" GitHub Actions job
e10878f ci, gha: Drop `driver-opts.network` input for `setup-buildx-action` (Hennadii Stepanov) 4ad4914 ci, gha: Add `retry_builder` Docker image builder (Hennadii Stepanov) 6617a62 ci: Remove "x86_64: Linux (Debian stable)" task from Cirrus CI (Hennadii Stepanov) 03c9e65 ci, gha: Add "x86_64: Linux (Debian stable)" GitHub Actions job (Hennadii Stepanov) ad3e65d ci: Remove GCC build files and sage to reduce size of Docker image (Tim Ruffing) Pull request description: Solves one item in bitcoin-core/secp256k1#1392 partially. ACKs for top commit: real-or-random: ACK e10878f Tree-SHA512: 1e685b1a6a41b4be97b9b5bb0fe546c3f1f7daac9374146ca05ab29803d5945a038294ce3ab77489bd971ffce9789ece722e0e0f268b6a7e6483a3aa782d532d
2 parents 5373693 + e10878f commit 2e6cf9b

File tree

4 files changed

+82
-37
lines changed

4 files changed

+82
-37
lines changed

.cirrus.yml

-32
Original file line numberDiff line numberDiff line change
@@ -64,38 +64,6 @@ linux_container_snippet: &LINUX_CONTAINER
6464
# More than enough for our scripts.
6565
memory: 2G
6666

67-
task:
68-
name: "x86_64: Linux (Debian stable)"
69-
<< : *LINUX_CONTAINER
70-
matrix:
71-
- env: {WIDEMUL: int64, RECOVERY: yes}
72-
- env: {WIDEMUL: int64, ECDH: yes, SCHNORRSIG: yes, ELLSWIFT: yes}
73-
- env: {WIDEMUL: int128}
74-
- env: {WIDEMUL: int128_struct, ELLSWIFT: yes}
75-
- env: {WIDEMUL: int128, RECOVERY: yes, SCHNORRSIG: yes, ELLSWIFT: yes}
76-
- env: {WIDEMUL: int128, ECDH: yes, SCHNORRSIG: yes}
77-
- env: {WIDEMUL: int128, ASM: x86_64 , ELLSWIFT: yes}
78-
- env: { RECOVERY: yes, SCHNORRSIG: yes}
79-
- env: {CTIMETESTS: no, RECOVERY: yes, ECDH: yes, SCHNORRSIG: yes, CPPFLAGS: -DVERIFY}
80-
- env: {BUILD: distcheck, WITH_VALGRIND: no, CTIMETESTS: no, BENCH: no}
81-
- env: {CPPFLAGS: -DDETERMINISTIC}
82-
- env: {CFLAGS: -O0, CTIMETESTS: no}
83-
- env: {CFLAGS: -O1, RECOVERY: yes, ECDH: yes, SCHNORRSIG: yes, ELLSWIFT: yes}
84-
- env: { ECMULTGENPRECISION: 2, ECMULTWINDOW: 2 }
85-
- env: { ECMULTGENPRECISION: 8, ECMULTWINDOW: 4 }
86-
matrix:
87-
- env:
88-
CC: gcc
89-
- env:
90-
CC: clang
91-
- env:
92-
CC: gcc-snapshot
93-
- env:
94-
CC: clang-snapshot
95-
test_script:
96-
- ./ci/ci.sh
97-
<< : *CAT_LOGS
98-
9967
task:
10068
name: "i686: Linux (Debian stable)"
10169
<< : *LINUX_CONTAINER

.github/actions/run-in-docker-action/action.yml

+11-3
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,20 @@ runs:
1414
using: "composite"
1515
steps:
1616
- uses: docker/setup-buildx-action@v2
17+
18+
- uses: docker/build-push-action@v4
19+
id: main_builder
20+
continue-on-error: true
1721
with:
18-
# See: https://github.com/moby/buildkit/issues/3969.
19-
driver-opts: |
20-
network=host
22+
context: .
23+
file: ${{ inputs.dockerfile }}
24+
tags: ${{ inputs.tag }}
25+
load: true
26+
cache-from: type=gha
2127

2228
- uses: docker/build-push-action@v4
29+
id: retry_builder
30+
if: steps.main_builder.outcome == 'failure'
2331
with:
2432
context: .
2533
file: ${{ inputs.dockerfile }}

.github/workflows/ci.yml

+65
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,71 @@ jobs:
6161
cache-from: type=gha
6262
cache-to: type=gha,mode=min
6363

64+
linux_debian:
65+
name: "x86_64: Linux (Debian stable)"
66+
runs-on: ubuntu-latest
67+
needs: docker_cache
68+
69+
strategy:
70+
fail-fast: false
71+
matrix:
72+
configuration:
73+
- env_vars: { WIDEMUL: 'int64', RECOVERY: 'yes' }
74+
- env_vars: { WIDEMUL: 'int64', ECDH: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes' }
75+
- env_vars: { WIDEMUL: 'int128' }
76+
- env_vars: { WIDEMUL: 'int128_struct', ELLSWIFT: 'yes' }
77+
- env_vars: { WIDEMUL: 'int128', RECOVERY: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes' }
78+
- env_vars: { WIDEMUL: 'int128', ECDH: 'yes', SCHNORRSIG: 'yes' }
79+
- env_vars: { WIDEMUL: 'int128', ASM: 'x86_64', ELLSWIFT: 'yes' }
80+
- env_vars: { RECOVERY: 'yes', SCHNORRSIG: 'yes' }
81+
- env_vars: { CTIMETESTS: 'no', RECOVERY: 'yes', ECDH: 'yes', SCHNORRSIG: 'yes', CPPFLAGS: '-DVERIFY' }
82+
- env_vars: { BUILD: 'distcheck', WITH_VALGRIND: 'no', CTIMETESTS: 'no', BENCH: 'no' }
83+
- env_vars: { CPPFLAGS: '-DDETERMINISTIC' }
84+
- env_vars: { CFLAGS: '-O0', CTIMETESTS: 'no' }
85+
- env_vars: { CFLAGS: '-O1', RECOVERY: 'yes', ECDH: 'yes', SCHNORRSIG: 'yes', ELLSWIFT: 'yes' }
86+
- env_vars: { ECMULTGENPRECISION: 2, ECMULTWINDOW: 2 }
87+
- env_vars: { ECMULTGENPRECISION: 8, ECMULTWINDOW: 4 }
88+
cc:
89+
- 'gcc'
90+
- 'clang'
91+
- 'gcc-snapshot'
92+
- 'clang-snapshot'
93+
94+
env:
95+
CC: ${{ matrix.cc }}
96+
97+
steps:
98+
- name: Checkout
99+
uses: actions/checkout@v3
100+
101+
- name: CI script
102+
env: ${{ matrix.configuration.env_vars }}
103+
uses: ./.github/actions/run-in-docker-action
104+
with:
105+
dockerfile: ./ci/linux-debian.Dockerfile
106+
tag: linux-debian-image
107+
command: >
108+
git config --global --add safe.directory ${{ github.workspace }} &&
109+
./ci/ci.sh
110+
111+
- run: cat tests.log || true
112+
if: ${{ always() }}
113+
- run: cat noverify_tests.log || true
114+
if: ${{ always() }}
115+
- run: cat exhaustive_tests.log || true
116+
if: ${{ always() }}
117+
- run: cat ctime_tests.log || true
118+
if: ${{ always() }}
119+
- run: cat bench.log || true
120+
if: ${{ always() }}
121+
- run: cat config.log || true
122+
if: ${{ always() }}
123+
- run: cat test_env.log || true
124+
if: ${{ always() }}
125+
- name: CI env
126+
run: env
127+
if: ${{ always() }}
128+
64129
mingw_debian:
65130
name: ${{ matrix.configuration.job_name }}
66131
runs-on: ubuntu-latest

ci/linux-debian.Dockerfile

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM debian:stable
1+
FROM debian:stable-slim
22

33
SHELL ["/bin/bash", "-c"]
44

@@ -28,7 +28,8 @@ WORKDIR /root
2828

2929
# Build and install gcc snapshot
3030
ARG GCC_SNAPSHOT_MAJOR=14
31-
RUN wget --progress=dot:giga --https-only --recursive --accept '*.tar.xz' --level 1 --no-directories "https://gcc.gnu.org/pub/gcc/snapshots/LATEST-${GCC_SNAPSHOT_MAJOR}" && \
31+
RUN mkdir gcc && cd gcc && \
32+
wget --progress=dot:giga --https-only --recursive --accept '*.tar.xz' --level 1 --no-directories "https://gcc.gnu.org/pub/gcc/snapshots/LATEST-${GCC_SNAPSHOT_MAJOR}" && \
3233
wget "https://gcc.gnu.org/pub/gcc/snapshots/LATEST-${GCC_SNAPSHOT_MAJOR}/sha512.sum" && \
3334
sha512sum --check --ignore-missing sha512.sum && \
3435
# We should have downloaded exactly one tar.xz file
@@ -40,6 +41,9 @@ RUN wget --progress=dot:giga --https-only --recursive --accept '*.tar.xz' --leve
4041
../*/configure --prefix=/opt/gcc-snapshot --enable-languages=c --disable-bootstrap --disable-multilib --without-isl && \
4142
make -j $(nproc) && \
4243
make install && \
44+
apt-get autoremove -y libgmp-dev libmpfr-dev libmpc-dev flex && \
45+
apt-get clean && \
46+
cd ../.. && rm -rf gcc && \
4347
ln -s /opt/gcc-snapshot/bin/gcc /usr/bin/gcc-snapshot
4448

4549
# Install clang snapshot

0 commit comments

Comments
 (0)