Skip to content

Commit fa99e45

Browse files
author
MarcoFalke
committed
ci: Allow CCACHE_DIR bind mount
This may be useful. For example, to store the directory in a specific place, instead of having to use a volume. Possibly, but not limited to sharing a cache: https://ccache.dev/manual/4.10.1.html#_sharing_a_local_cache
1 parent fa252da commit fa99e45

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

ci/test/02_run_container.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,14 @@ if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then
4848
CI_PREVIOUS_RELEASES_MOUNT="type=bind,src=${PREVIOUS_RELEASES_DIR},dst=$PREVIOUS_RELEASES_DIR"
4949
fi
5050

51+
if [ "$DANGER_CI_ON_HOST_CCACHE_FOLDER" ]; then
52+
if [ ! -d "${CCACHE_DIR}" ]; then
53+
echo "Error: Directory '${CCACHE_DIR}' must be created in advance."
54+
exit 1
55+
fi
56+
CI_CCACHE_MOUNT="type=bind,src=${CCACHE_DIR},dst=${CCACHE_DIR}"
57+
fi
58+
5159
docker network create --ipv6 --subnet 1111:1111::/112 ci-ip6net || true
5260

5361
if [ -n "${RESTART_CI_DOCKER_BEFORE_RUN}" ] ; then

0 commit comments

Comments
 (0)