Skip to content

Commit ff56bbc

Browse files
authored
feat: install ccache-4.8.2 from source (#110)
* feat: install ccache-4.8.2 from source * Build ccache after the tools are configured * Fix cmake build command
1 parent d074f3b commit ff56bbc

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

.devcontainer/Dockerfile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
FROM ubuntu@sha256:0bced47fffa3361afa981854fcabcd4577cd43cebbb808cea2b1f33a3dd7f508
22

33
ARG BATS_VERSION=1.9.0
4+
ARG CCACHE_VERSION=4.8.2
45
ARG CLANG_VERSION=15
56
ARG DOCKER_VERSION=24.0.0
67
ARG GCC_VERSION=10
@@ -83,11 +84,17 @@ RUN batstmp="$(mktemp -d /tmp/bats-core-${BATS_VERSION}.XXXX)" \
8384
# Install xwin
8485
RUN wget -qO - "https://github.com/Jake-Shadle/xwin/releases/download/${XWIN_VERSION}/xwin-${XWIN_VERSION}-$(uname -m)-unknown-linux-musl.tar.gz" | tar -xzv -C /usr/local/bin --strip-components=1 "xwin-${XWIN_VERSION}-$(uname -m)-unknown-linux-musl/xwin"
8586

86-
# Update all tools alternatives to the correct version
87+
# Update all tool alternatives to the correct version
8788
RUN update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++-${GCC_VERSION} 20 \
8889
&& update-alternatives --install /usr/bin/cc cc /usr/bin/gcc-${GCC_VERSION} 20 \
8990
&& update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-${GCC_VERSION} 10 \
9091
&& update-alternatives --install /usr/bin/iwyu iwyu /usr/local/bin/include-what-you-use 10 \
9192
&& update-alternatives --install /usr/bin/mull-runner mull-runner /usr/local/bin/mull-runner-${CLANG_VERSION} 10 \
9293
&& update-alternatives --install /usr/lib/mull-ir-frontend mull-ir-frontend /usr/local/lib/mull-ir-frontend-${CLANG_VERSION} 10 \
9394
&& update-alternatives --install /usr/bin/python python /usr/bin/python3 10
95+
96+
# Install ccache from source for a recent version
97+
RUN wget -qO - https://github.com/ccache/ccache/archive/refs/tags/v${CCACHE_VERSION}.tar.gz | tar xz -C /tmp \
98+
&& cmake -DCMAKE_BUILD_TYPE=Release -S /tmp/ccache-${CCACHE_VERSION} -B /tmp/ccache-${CCACHE_VERSION}/build \
99+
&& cmake --build /tmp/ccache-${CCACHE_VERSION}/build --target install \
100+
&& rm -rf /tmp/ccache-${CCACHE_VERSION}

.devcontainer/base/apt-requirements.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"bzip2": "1.0.8-5build1",
33
"ca-certificates": "20230311ubuntu0.22.04.1",
4-
"ccache": "4.5.1-1",
54
"gdb": "12.1-0ubuntu1~22.04",
65
"git": "1:2.34.1-1ubuntu1.9",
76
"gnupg2": "2.2.27-3ubuntu2.1",

0 commit comments

Comments
 (0)