Skip to content

Commit 259f7a3

Browse files
ci: Install development snapshots of gcc and clang
TODO: Make sure the Docker image is actually rebuild
1 parent 54d34b6 commit 259f7a3

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

ci/linux-debian.Dockerfile

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
FROM debian:stable
22

3+
SHELL ["/bin/bash", "-c"]
4+
35
RUN dpkg --add-architecture i386 && \
46
dpkg --add-architecture s390x && \
57
dpkg --add-architecture armhf && \
@@ -9,7 +11,7 @@ RUN dpkg --add-architecture i386 && \
911
# dkpg-dev: to make pkg-config work in cross-builds
1012
# llvm: for llvm-symbolizer, which is used by clang's UBSan for symbolized stack traces
1113
RUN apt-get update && apt-get install --no-install-recommends -y \
12-
git ca-certificates \
14+
git ca-certificates wget \
1315
make automake libtool pkg-config dpkg-dev valgrind qemu-user \
1416
gcc clang llvm libc6-dbg \
1517
g++ \
@@ -23,6 +25,26 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
2325
sagemath
2426

2527
WORKDIR /root
28+
29+
# Install gcc snapshot
30+
RUN wget --progress=dot:giga --content-disposition https://kayari.org/gcc-latest/gcc-latest.deb && \
31+
dpkg -i gcc-latest_*.deb && \
32+
ln -s /opt/gcc-latest/bin/gcc /usr/bin/gcc-snapshot
33+
34+
# Install clang snapshot
35+
RUN wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc && \
36+
# Install add-apt-repository and lsb_release
37+
apt-get update && apt-get install --no-install-recommends -y software-properties-common && \
38+
add-apt-repository "deb http://apt.llvm.org/$(lsb_release --codename --short)/ llvm-toolchain-$(lsb_release --codename --short) main" && \
39+
apt-get update && apt-get install --no-install-recommends -y clang && \
40+
# Remove just the "clang" symlink again
41+
apt-get remove -y clang && \
42+
# We should have exactly two clang versions now
43+
[[ $(ls /usr/bin/clang-?? | sort | wc -l) -eq "2" ]] || exit 1 && \
44+
# Create symlinks for them
45+
ln -s $(ls /usr/bin/clang-?? | sort | tail -1) /usr/bin/clang-snapshot && \
46+
ln -s $(ls /usr/bin/clang-?? | sort | head -1) /usr/bin/clang
47+
2648
# The "wine" package provides a convience wrapper that we need
2749
RUN apt-get update && apt-get install --no-install-recommends -y \
2850
git ca-certificates wine64 wine python3-simplejson python3-six msitools winbind procps && \

0 commit comments

Comments
 (0)