diff --git a/.cirrus.yml b/.cirrus.yml index 1e71fc267c..04aa8f2409 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -50,11 +50,13 @@ cat_logs_snippet: &CAT_LOGS - env linux_arm64_container_snippet: &LINUX_ARM64_CONTAINER - test_script: + 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 - - docker run --rm --interactive --tty --mount "type=bind,src=./,dst=/ci_secp256k1" --env-file /tmp/env --name "ci_secp256k1_arm" "ci_secp256k1_arm" "/ci_secp256k1/ci/ci.sh" + 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)" diff --git a/ci/linux-debian.Dockerfile b/ci/linux-debian.Dockerfile index e719907e89..06d0cfbec0 100644 --- a/ci/linux-debian.Dockerfile +++ b/ci/linux-debian.Dockerfile @@ -13,11 +13,14 @@ WORKDIR /root # (Note that .bashrc is only executed in interactive bash shells.) RUN echo 'if [[ $(ulimit -n) -gt 200000 ]]; then echo "WARNING: Very high value reported by \"ulimit -n\". Consider passing \"--ulimit nofile=32768\" to \"docker run\"."; fi' >> /root/.bashrc -RUN dpkg --add-architecture i386 && \ +RUN if dpkg --print-architecture | grep --quiet "arm64"; then \ + else \ + dpkg --add-architecture i386 && \ + dpkg --add-architecture ppc64el && \ + fi \ dpkg --add-architecture s390x && \ dpkg --add-architecture armhf && \ - dpkg --add-architecture arm64 && \ - dpkg --add-architecture ppc64el + dpkg --add-architecture arm64 # dkpg-dev: to make pkg-config work in cross-builds # llvm: for llvm-symbolizer, which is used by clang's UBSan for symbolized stack traces @@ -26,13 +29,8 @@ RUN apt-get update && apt-get install --no-install-recommends -y \ make automake libtool pkg-config dpkg-dev valgrind qemu-user \ gcc clang llvm libclang-rt-dev libc6-dbg \ g++ \ - 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 # Build and install gcc snapshot @@ -44,7 +42,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 && \