Skip to content

Commit 025ff3f

Browse files
author
Marcus Müller
committed
4.0 CI: add sccache
Ubuntu 26.04 has an sccache that comes with S3 support, rest needs to build it. Signed-off-by: Marcus Müller <mueller@baseband.digital>
1 parent 01b713c commit 025ff3f

4 files changed

Lines changed: 77 additions & 2 deletions

File tree

ci/ci-fedora-44-4.0/Dockerfile

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,28 @@
11
ARG FEDORA_VERSION=44
22
ARG DNF_COMMAND="dnf --setopt=install_weak_deps=False -q"
33

4+
# Fedora >=43 has sccache, but none with S3 storage support
5+
ARG SCCACHE_VERSION=0.10.0
6+
ARG LIBAD9361_TAG=v0.3
7+
# ---- sccache takes a while to build (it's rust…) and
8+
# quite a bit of space (it's cargo), so:
9+
# avoid rebuilding if version hasn't changed
10+
FROM fedora:${FEDORA_VERSION} AS sccache-builder
11+
ARG SCCACHE_VERSION
12+
ARG DNF_COMMAND
13+
LABEL maintainer="mmueller@gnuradio.org"
14+
RUN ${DNF_COMMAND} install --refresh -y \
15+
cargo \
16+
openssl-devel \
17+
&& ${DNF_COMMAND} clean all
18+
19+
RUN cargo install \
20+
--locked \
21+
--quiet \
22+
--target-dir /build \
23+
--root /target \
24+
sccache@${SCCACHE_VERSION} \
25+
&& rm -rf /build
426

527
FROM fedora:${FEDORA_VERSION}
628
ARG DNF_COMMAND
@@ -59,4 +81,6 @@ RUN ${DNF_COMMAND} update -y \
5981
RUN git clone --branch v0.4.4 --depth 1 https://github.com/mattkretz/vir-simd.git /opt/vir-simd \
6082
&& cmake -E copy_directory /opt/vir-simd/vir /usr/local/include/vir \
6183
&& rm -rf /opt/vir-simd
62-
84+
85+
# Copy over sccache
86+
COPY --from=sccache-builder /target/bin/sccache /usr/bin/sccache

ci/ci-ubuntu-24.04-4.0-emscripten/Dockerfile

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,31 @@
11
ARG UBUNTU_VERSION=24.04
2+
ARG SCCACHE_VERSION=0.10.0
23
ARG APT_INSTALL_COMMAND="apt-get install -qy --no-install-recommends"
34
ARG EMSDK_VERSION=5.0.2
45

56

7+
FROM ubuntu:${UBUNTU_VERSION} AS sccache-builder
8+
ARG SCCACHE_VERSION
9+
ARG APT_INSTALL_COMMAND
10+
LABEL maintainer="mmueller@gnuradio.org"
11+
12+
ENV DEBIAN_FRONTEND=noninteractive
13+
RUN apt-get update -q ;\
14+
${APT_INSTALL_COMMAND} \
15+
cargo \
16+
ca-certificates \
17+
pkg-config \
18+
libssl-dev \
19+
&& apt-get clean
20+
RUN cargo install \
21+
--locked \
22+
--quiet \
23+
--target-dir /build \
24+
--root /target \
25+
sccache@${SCCACHE_VERSION} \
26+
&& rm -rf /build
27+
28+
629
FROM ubuntu:${UBUNTU_VERSION}
730
ARG APT_INSTALL_COMMAND
831
ARG EMSDK_VERSION
@@ -54,3 +77,6 @@ RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 140 \
5477
--slave /usr/bin/g++ g++ /usr/bin/g++-14 \
5578
--slave /usr/bin/gcov gcov /usr/bin/gcov-14 \
5679
&& update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++-14 140
80+
81+
# Copy over sccache
82+
COPY --from=sccache-builder /target/bin/sccache /usr/bin/sccache

ci/ci-ubuntu-24.04-4.0/Dockerfile

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,27 @@
11
ARG UBUNTU_VERSION=24.04
22
ARG APT_INSTALL_COMMAND="apt-get install -qy --no-install-recommends"
3+
ARG SCCACHE_VERSION=0.10.0
4+
5+
FROM ubuntu:${UBUNTU_VERSION} AS sccache-builder
6+
ARG SCCACHE_VERSION
7+
ARG APT_INSTALL_COMMAND
8+
LABEL maintainer="mmueller@gnuradio.org"
9+
10+
ENV DEBIAN_FRONTEND=noninteractive
11+
RUN apt-get update -q ;\
12+
${APT_INSTALL_COMMAND} \
13+
cargo \
14+
ca-certificates \
15+
pkg-config \
16+
libssl-dev \
17+
&& apt-get clean
18+
RUN cargo install \
19+
--locked \
20+
--quiet \
21+
--target-dir /build \
22+
--root /target \
23+
sccache@${SCCACHE_VERSION} \
24+
&& rm -rf /build
325

426

527
FROM ubuntu:${UBUNTU_VERSION}
@@ -106,3 +128,6 @@ RUN git clone https://github.com/boost-ext/ut.git /tmp/ut \
106128
RUN git clone --branch v0.4.4 --depth 1 https://github.com/mattkretz/vir-simd.git /opt/vir-simd \
107129
&& cmake -E copy_directory /opt/vir-simd/vir /usr/local/include/vir \
108130
&& rm -rf /opt/vir-simd
131+
132+
# Copy over sccache
133+
COPY --from=sccache-builder /target/bin/sccache /usr/bin/sccache

ci/ci-ubuntu-26.04-4.0/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
ARG UBUNTU_VERSION=26.04
22
ARG APT_INSTALL_COMMAND="apt-get install -qy --no-install-recommends"
33

4-
54
FROM ubuntu:${UBUNTU_VERSION}
65
ARG APT_INSTALL_COMMAND
76

@@ -19,6 +18,7 @@ RUN apt-get update -q \
1918
build-essential \
2019
ca-certificates \
2120
ccache \
21+
sccache \
2222
cmake \
2323
file \
2424
git \

0 commit comments

Comments
 (0)