Skip to content

Commit fa4d6c7

Browse files
MarcoFalkereal-or-random
MarcoFalke
andcommitted
ci/cirrus: Add native ARM64 persistent workers
Co-authored-by: Tim Ruffing <[email protected]>
1 parent 2262d0e commit fa4d6c7

File tree

2 files changed

+52
-3
lines changed

2 files changed

+52
-3
lines changed

.cirrus.yml

+45
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,48 @@ cat_logs_snippet: &CAT_LOGS
4848
- cat test_env.log || true
4949
cat_ci_env_script:
5050
- env
51+
52+
linux_arm64_container_snippet: &LINUX_ARM64_CONTAINER
53+
env_script:
54+
- env | tee /tmp/env
55+
build_script:
56+
- DOCKER_BUILDKIT=1 docker build --file "ci/linux-debian.Dockerfile" --tag="ci_secp256k1_arm"
57+
- docker image prune --force # Cleanup stale layers
58+
test_script:
59+
- 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"
60+
61+
task:
62+
name: "ARM64: Linux (Debian stable)"
63+
persistent_worker:
64+
labels:
65+
type: arm64
66+
env:
67+
ECDH: yes
68+
RECOVERY: yes
69+
SCHNORRSIG: yes
70+
ELLSWIFT: yes
71+
matrix:
72+
# Currently only gcc-snapshot, the other compilers are tested on GHA with QEMU
73+
- env: { CC: 'gcc-snapshot' }
74+
<< : *LINUX_ARM64_CONTAINER
75+
<< : *CAT_LOGS
76+
77+
task:
78+
name: "ARM64: Linux (Debian stable), Valgrind"
79+
persistent_worker:
80+
labels:
81+
type: arm64
82+
env:
83+
ECDH: yes
84+
RECOVERY: yes
85+
SCHNORRSIG: yes
86+
ELLSWIFT: yes
87+
WRAPPER_CMD: 'valgrind --error-exitcode=42'
88+
SECP256K1_TEST_ITERS: 2
89+
matrix:
90+
- env: { CC: 'gcc' }
91+
- env: { CC: 'clang' }
92+
- env: { CC: 'gcc-snapshot' }
93+
- env: { CC: 'clang-snapshot' }
94+
<< : *LINUX_ARM64_CONTAINER
95+
<< : *CAT_LOGS

ci/linux-debian.Dockerfile

+7-3
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,15 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
2929
gcc-i686-linux-gnu libc6-dev-i386-cross libc6-dbg:i386 libubsan1:i386 libasan8:i386 \
3030
gcc-s390x-linux-gnu libc6-dev-s390x-cross libc6-dbg:s390x \
3131
gcc-arm-linux-gnueabihf libc6-dev-armhf-cross libc6-dbg:armhf \
32-
gcc-aarch64-linux-gnu libc6-dev-arm64-cross libc6-dbg:arm64 \
3332
gcc-powerpc64le-linux-gnu libc6-dev-ppc64el-cross libc6-dbg:ppc64el \
3433
gcc-mingw-w64-x86-64-win32 wine64 wine \
3534
gcc-mingw-w64-i686-win32 wine32 \
36-
python3
35+
python3 && \
36+
if ! ( dpkg --print-architecture | grep --quiet "arm64" ) ; then \
37+
apt-get install --no-install-recommends -y \
38+
gcc-aarch64-linux-gnu libc6-dev-arm64-cross libc6-dbg:arm64 ;\
39+
fi && \
40+
apt-get clean && rm -rf /var/lib/apt/lists/*
3741

3842
# Build and install gcc snapshot
3943
ARG GCC_SNAPSHOT_MAJOR=14
@@ -44,7 +48,7 @@ RUN apt-get update && apt-get install --no-install-recommends -y wget libgmp-dev
4448
sha512sum --check --ignore-missing sha512.sum && \
4549
# We should have downloaded exactly one tar.xz file
4650
ls && \
47-
[[ $(ls *.tar.xz | wc -l) -eq "1" ]] && \
51+
[ $(ls *.tar.xz | wc -l) -eq "1" ] && \
4852
tar xf *.tar.xz && \
4953
mkdir gcc-build && cd gcc-build && \
5054
../*/configure --prefix=/opt/gcc-snapshot --enable-languages=c --disable-bootstrap --disable-multilib --without-isl && \

0 commit comments

Comments
 (0)