From 2f31c66cfb1faf34397ddb3850adbfdb6836586c Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Wed, 20 Sep 2023 12:21:32 +0000 Subject: [PATCH] ci: Make arm64 persistent workers work --- .cirrus.yml | 28 +++++++++++----------------- ci/linux-debian.Dockerfile | 9 ++++++--- 2 files changed, 17 insertions(+), 20 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 043040bacc..04aa8f2409 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -50,21 +50,19 @@ cat_logs_snippet: &CAT_LOGS - env linux_arm64_container_snippet: &LINUX_ARM64_CONTAINER - dockerfile: ci/linux-debian.Dockerfile - # Reduce number of CPUs to be able to do more builds in parallel. - cpu: 1 - # Gives us more CPUs for free if they're available. - greedy: true - # More than enough for our scripts. - memory: 2G + env_script: + - 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)" - arm_container: - << : *LINUX_ARM64_CONTAINER persistent_worker: labels: - type: arm64 + type: arm64 env: ECDH: yes RECOVERY: yes @@ -73,17 +71,14 @@ task: matrix: # Currently only gcc-snapshot, the other compilers are tested on GHA with QEMU - env: { CC: 'gcc-snapshot' } - test_script: - - ./ci/ci.sh + << : *LINUX_ARM64_CONTAINER << : *CAT_LOGS task: name: "ARM64: Linux (Debian stable), Valgrind" - arm_container: - << : *LINUX_ARM64_CONTAINER persistent_worker: labels: - type: arm64 + type: arm64 env: ECDH: yes RECOVERY: yes @@ -96,6 +91,5 @@ task: - env: { CC: 'clang' } - env: { CC: 'gcc-snapshot' } - env: { CC: 'clang-snapshot' } - test_script: - - ./ci/ci.sh + << : *LINUX_ARM64_CONTAINER << : *CAT_LOGS diff --git a/ci/linux-debian.Dockerfile b/ci/linux-debian.Dockerfile index e719907e89..472bd0f44d 100644 --- a/ci/linux-debian.Dockerfile +++ b/ci/linux-debian.Dockerfile @@ -29,11 +29,14 @@ RUN apt-get update && apt-get install --no-install-recommends -y \ gcc-i686-linux-gnu libc6-dev-i386-cross libc6-dbg:i386 libubsan1:i386 libasan8:i386 \ gcc-s390x-linux-gnu libc6-dev-s390x-cross libc6-dbg:s390x \ gcc-arm-linux-gnueabihf libc6-dev-armhf-cross libc6-dbg:armhf \ - gcc-aarch64-linux-gnu libc6-dev-arm64-cross libc6-dbg:arm64 \ gcc-powerpc64le-linux-gnu libc6-dev-ppc64el-cross libc6-dbg:ppc64el \ gcc-mingw-w64-x86-64-win32 wine64 wine \ gcc-mingw-w64-i686-win32 wine32 \ - python3 + python3 && \ + if ! ( dpkg --print-architecture | grep --quiet "arm64" ) ; then \ + apt-get install --no-install-recommends -y \ + gcc-aarch64-linux-gnu libc6-dev-arm64-cross libc6-dbg:arm64 ;\ + fi # Build and install gcc snapshot ARG GCC_SNAPSHOT_MAJOR=14 @@ -44,7 +47,7 @@ RUN apt-get update && apt-get install --no-install-recommends -y wget libgmp-dev sha512sum --check --ignore-missing sha512.sum && \ # We should have downloaded exactly one tar.xz file ls && \ - [[ $(ls *.tar.xz | wc -l) -eq "1" ]] && \ + [ $(ls *.tar.xz | wc -l) -eq "1" ] && \ tar xf *.tar.xz && \ mkdir gcc-build && cd gcc-build && \ ../*/configure --prefix=/opt/gcc-snapshot --enable-languages=c --disable-bootstrap --disable-multilib --without-isl && \