Skip to content

Commit c26aa61

Browse files
bors[bot]kaspar030
andauthored
Merge #216
216: murdock_worker: add newer ccache (4.7.4) r=kaspar030 a=kaspar030 ccache version 4.7 adds the option to have a remote-only cache on secondary storage (e.g., **redis**). I have a [branch](RIOT-OS/murdock-worker#5) modifying the murdock worker docker-compose to add a redis instance for caching. The ccache binary is the official binary release from https://ccache.dev/download.html. (debians bookworm has a .dpkg, but that's not compatible to our Ubuntu's older libraries). My hope is that a local redis scales better with larger caches, which have shown to stall builds when the cache is full and needs to be cleaned (`@cgundogan` remember the sawtoothing?). redis LRU is cheap. Also, redis handles persistence (compared to tmpfs), which would **make reboots/restarts not loose all of ccache**. Potentially, redis can be distributed, so e.g., the mobis could have a larger cache shared between them. (I've piggibacked a commit creating `/cache` with rwx:all permissions, that's necessary to mount volumes so they're accessible by a non-root in-docker uid. otherwise, mounts default to root-only permissions.) Co-authored-by: Kaspar Schleiser <[email protected]>
2 parents fe50bda + 59170f7 commit c26aa61

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

murdock-worker/.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.tar.xz filter=lfs diff=lfs merge=lfs -text

murdock-worker/Dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,17 @@ RUN wget https://raw.githubusercontent.com/kaspar030/git-cache/f76c3a5f0e15f08c2
3434
-O /usr/bin/git-cache \
3535
&& chmod a+x /usr/bin/git-cache
3636

37+
# install newer ccache package
38+
ARG CCACHE_TGZ=ccache-4.7.4-linux-x86_64.tar.xz
39+
COPY files/${CCACHE_TGZ} /
40+
RUN tar -xvf /${CCACHE_TGZ} --strip-components=1 -C/usr/local/bin && rm /${CCACHE_TGZ}
41+
3742
# install murdock slave startup script
3843
COPY murdock_slave.sh /usr/bin/murdock_slave
3944

45+
# create cache folder
46+
RUN mkdir -m777 /cache
47+
4048
ENTRYPOINT ["/bin/bash", "/run.sh"]
4149

4250
# By default, run a shell when no command is specified on the docker command line
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:0b700cc10884f7faf615203241d34eba7ebe0723f38f6aeb77569a556ff37313
3+
size 978436

0 commit comments

Comments
 (0)