Skip to content

Commit

Permalink
ci: add native aarch64-gnu docker builder
Browse files Browse the repository at this point in the history
  • Loading branch information
pietroalbini committed Jul 3, 2020
1 parent e1ea006 commit 65f2dce
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 2 deletions.
26 changes: 26 additions & 0 deletions src/ci/docker/host-aarch64/aarch64-gnu/Dockerfile
@@ -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
14 changes: 12 additions & 2 deletions src/ci/docker/scripts/sccache.sh
@@ -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

0 comments on commit 65f2dce

Please sign in to comment.