From fa99e4521b6fc0e7f6636d40bc0d6a7325227374 Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Wed, 11 Sep 2024 15:31:23 +0200 Subject: [PATCH] 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 --- ci/test/02_run_container.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ci/test/02_run_container.sh b/ci/test/02_run_container.sh index afd447c347f..1727f9296b1 100755 --- a/ci/test/02_run_container.sh +++ b/ci/test/02_run_container.sh @@ -48,6 +48,14 @@ if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then CI_PREVIOUS_RELEASES_MOUNT="type=bind,src=${PREVIOUS_RELEASES_DIR},dst=$PREVIOUS_RELEASES_DIR" fi + if [ "$DANGER_CI_ON_HOST_CCACHE_FOLDER" ]; then + if [ ! -d "${CCACHE_DIR}" ]; then + echo "Error: Directory '${CCACHE_DIR}' must be created in advance." + exit 1 + fi + CI_CCACHE_MOUNT="type=bind,src=${CCACHE_DIR},dst=${CCACHE_DIR}" + fi + docker network create --ipv6 --subnet 1111:1111::/112 ci-ip6net || true if [ -n "${RESTART_CI_DOCKER_BEFORE_RUN}" ] ; then