ci: add native aarch64-gnu docker builder

This commit is contained in:
Pietro Albini 2020-06-23 12:33:22 +02:00
parent e1ea006701
commit 65f2dce042
No known key found for this signature in database
GPG key ID: 3E06ABE80BAAF19C
2 changed files with 38 additions and 2 deletions

View file

@ -0,0 +1,26 @@
FROM ubuntu:20.04
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
g++ \
make \
file \
curl \
ca-certificates \
python3 \
git \
cmake \
sudo \
gdb \
libssl-dev \
pkg-config \
xz-utils
COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh
ENV RUST_CONFIGURE_ARGS \
--build=aarch64-unknown-linux-gnu \
--enable-sanitizers \
--enable-profiler \
--enable-compiler-docs
ENV SCRIPT python3 ../x.py test

View file

@ -1,6 +1,16 @@
set -ex
curl -fo /usr/local/bin/sccache \
https://ci-mirrors.rust-lang.org/rustc/2018-04-02-sccache-x86_64-unknown-linux-musl
case "$(uname -m)" in
x86_64)
url="https://ci-mirrors.rust-lang.org/rustc/2018-04-02-sccache-x86_64-unknown-linux-musl"
;;
aarch64)
url="https://ci-mirrors.rust-lang.org/rustc/2019-12-17-sccache-aarch64-unknown-linux-gnu"
;;
*)
echo "unsupported architecture: $(uname -m)"
exit 1
esac
curl -fo /usr/local/bin/sccache "${url}"
chmod +x /usr/local/bin/sccache