Skip to content

Commit 65f2dce

Browse files
committed
ci: add native aarch64-gnu docker builder
1 parent e1ea006 commit 65f2dce

File tree

2 files changed

+38
-2
lines changed

2 files changed

+38
-2
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
FROM ubuntu:20.04
2+
3+
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
4+
g++ \
5+
make \
6+
file \
7+
curl \
8+
ca-certificates \
9+
python3 \
10+
git \
11+
cmake \
12+
sudo \
13+
gdb \
14+
libssl-dev \
15+
pkg-config \
16+
xz-utils
17+
18+
COPY scripts/sccache.sh /scripts/
19+
RUN sh /scripts/sccache.sh
20+
21+
ENV RUST_CONFIGURE_ARGS \
22+
--build=aarch64-unknown-linux-gnu \
23+
--enable-sanitizers \
24+
--enable-profiler \
25+
--enable-compiler-docs
26+
ENV SCRIPT python3 ../x.py test

src/ci/docker/scripts/sccache.sh

+12-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
set -ex
22

3-
curl -fo /usr/local/bin/sccache \
4-
https://ci-mirrors.rust-lang.org/rustc/2018-04-02-sccache-x86_64-unknown-linux-musl
3+
case "$(uname -m)" in
4+
x86_64)
5+
url="https://ci-mirrors.rust-lang.org/rustc/2018-04-02-sccache-x86_64-unknown-linux-musl"
6+
;;
7+
aarch64)
8+
url="https://ci-mirrors.rust-lang.org/rustc/2019-12-17-sccache-aarch64-unknown-linux-gnu"
9+
;;
10+
*)
11+
echo "unsupported architecture: $(uname -m)"
12+
exit 1
13+
esac
514

15+
curl -fo /usr/local/bin/sccache "${url}"
616
chmod +x /usr/local/bin/sccache

0 commit comments

Comments
 (0)