aboutsummaryrefslogtreecommitdiff
path: root/ci
diff options
context:
space:
mode:
authorMarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>2024-09-11 15:31:23 +0200
committerMarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>2024-09-16 17:19:57 +0200
commitfa99e4521b6fc0e7f6636d40bc0d6a7325227374 (patch)
treeb922d3ded1ed7e90e975dd2f65bf2f6ffc675407 /ci
parentfa252da0b9cc6c7e795366ce4a1ddc4c198dff15 (diff)
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
Diffstat (limited to 'ci')
-rwxr-xr-xci/test/02_run_container.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/ci/test/02_run_container.sh b/ci/test/02_run_container.sh
index afd447c347..1727f9296b 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