Skip to content

Commit

Permalink
Merge #216
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
bors[bot] and kaspar030 authored Jan 21, 2023
2 parents fe50bda + 59170f7 commit c26aa61
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions murdock-worker/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.tar.xz filter=lfs diff=lfs merge=lfs -text
8 changes: 8 additions & 0 deletions murdock-worker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,17 @@ RUN wget https://raw.githubusercontent.com/kaspar030/git-cache/f76c3a5f0e15f08c2
-O /usr/bin/git-cache \
&& chmod a+x /usr/bin/git-cache

# install newer ccache package
ARG CCACHE_TGZ=ccache-4.7.4-linux-x86_64.tar.xz
COPY files/${CCACHE_TGZ} /
RUN tar -xvf /${CCACHE_TGZ} --strip-components=1 -C/usr/local/bin && rm /${CCACHE_TGZ}

# install murdock slave startup script
COPY murdock_slave.sh /usr/bin/murdock_slave

# create cache folder
RUN mkdir -m777 /cache

ENTRYPOINT ["/bin/bash", "/run.sh"]

# By default, run a shell when no command is specified on the docker command line
Expand Down
3 changes: 3 additions & 0 deletions murdock-worker/files/ccache-4.7.4-linux-x86_64.tar.xz
Git LFS file not shown

0 comments on commit c26aa61

Please sign in to comment.