aboutsummaryrefslogtreecommitdiff
path: root/docker
diff options
context:
space:
mode:
authorSulfurNitride <SulfurNitride@users.noreply.github.com>2026-02-25 15:50:45 -0600
committerSulfurNitride <SulfurNitride@users.noreply.github.com>2026-02-25 15:50:45 -0600
commit11404dc2bbfb9033344ff360e72b66372edd0d9b (patch)
tree88b8d2185e15d46e0eaeefcae87bb0d414de96ef /docker
parent0e48de1021562679680aaf46a871776a38fca7dd (diff)
Fix log copy truncation, enable ccache for build cache
Fix "Copy all" log truncation: the code unconditionally stripped 2 chars (\r\n) from formatted log messages, but on Linux spdlog only appends \n. Every log message lost its last real character. Now strips trailing \r and \n dynamically. Enable ccache: it was installed in the Docker image but never activated. build-inner.sh now auto-detects ccache and sets CMAKE_*_COMPILER_LAUNCHER. build.sh mounts a persistent ccache volume (~/.cache/fluorine-ccache) into the container. CI workflow uses actions/cache to persist ccache across runs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'docker')
-rwxr-xr-xdocker/build-inner.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/docker/build-inner.sh b/docker/build-inner.sh
index 8b7ac93..01a644d 100755
--- a/docker/build-inner.sh
+++ b/docker/build-inner.sh
@@ -7,6 +7,12 @@ BUILD_PY="${BUILD_PYTHON:-$(command -v python3)}"
PYBIND11_DIR="$("${BUILD_PY}" -c 'import pybind11; print(pybind11.get_cmake_dir())' 2>/dev/null || true)"
CMAKE_EXTRA_ARGS=()
+
+# Enable ccache if available and not explicitly overridden.
+if [ -z "${CMAKE_C_COMPILER_LAUNCHER:-}" ] && command -v ccache >/dev/null 2>&1; then
+ CMAKE_C_COMPILER_LAUNCHER=ccache
+ CMAKE_CXX_COMPILER_LAUNCHER=ccache
+fi
if [ -n "${CMAKE_C_COMPILER_LAUNCHER:-}" ]; then
CMAKE_EXTRA_ARGS+=("-DCMAKE_C_COMPILER_LAUNCHER=${CMAKE_C_COMPILER_LAUNCHER}")
fi