Skip to content

Commit 1b38f8a

Browse files
committed
ci: reduce cross-rs docker layers
1 parent 9449adf commit 1b38f8a

1 file changed

Lines changed: 13 additions & 10 deletions

File tree

.cross/Dockerfile

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
11
ARG CROSS_BASE_IMAGE=scratch
22
ARG DEBIAN_FRONTEND=noninteractive
3-
FROM $CROSS_BASE_IMAGE
43

5-
RUN apt-get update && \
6-
apt-get install -y --no-install-recommends clang llvm && \
7-
rm -rf /var/lib/apt/lists/*
4+
FROM $CROSS_BASE_IMAGE
85

9-
ENV CC=clang
10-
ENV CXX=clang++
11-
ENV AR=llvm-ar
6+
ARG CROSS_BASE_IMAGE
127

138
COPY .github/sccache.sh /
14-
ARG CROSS_BASE_IMAGE
15-
RUN target="${CROSS_BASE_IMAGE##*/}" && /sccache.sh "${target%%:*}"
169

17-
ENV RUSTC_WRAPPER="/usr/bin/sccache"
10+
RUN apt-get update && \
11+
apt-get install -y --no-install-recommends clang llvm && \
12+
rm -rf /var/lib/apt/lists/* && \
13+
target="${CROSS_BASE_IMAGE##*/}" && \
14+
chmod +x /sccache.sh && \
15+
/sccache.sh "${target%%:*}"
16+
17+
ENV CC=clang \
18+
CXX=clang++ \
19+
AR=llvm-ar \
20+
RUSTC_WRAPPER="/usr/bin/sccache"

0 commit comments

Comments
 (0)