diff options
| author | SulfurNitride <SulfurNitride@users.noreply.github.com> | 2026-02-25 15:50:45 -0600 |
|---|---|---|
| committer | SulfurNitride <SulfurNitride@users.noreply.github.com> | 2026-02-25 15:50:45 -0600 |
| commit | 11404dc2bbfb9033344ff360e72b66372edd0d9b (patch) | |
| tree | 88b8d2185e15d46e0eaeefcae87bb0d414de96ef /build.sh | |
| parent | 0e48de1021562679680aaf46a871776a38fca7dd (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 'build.sh')
| -rwxr-xr-x | build.sh | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -29,10 +29,16 @@ cd "${SCRIPT_DIR}" echo "=== Ensuring build image is up to date ===" ${DOCKER} build -t "${IMAGE_NAME}" docker/ +# Persistent ccache directory for faster rebuilds. +CCACHE_DIR="${HOME}/.cache/fluorine-ccache" +mkdir -p "${CCACHE_DIR}" + if [ "${1:-}" = "shell" ]; then echo "=== Dropping into build container shell ===" exec ${DOCKER} run --rm -it \ -v "${SCRIPT_DIR}:/src:rw" \ + -v "${CCACHE_DIR}:/ccache:rw" \ + -e CCACHE_DIR=/ccache \ -w /src \ --device /dev/fuse \ --cap-add SYS_ADMIN \ @@ -43,6 +49,8 @@ fi echo "=== Starting build ===" ${DOCKER} run --rm \ -v "${SCRIPT_DIR}:/src:rw" \ + -v "${CCACHE_DIR}:/ccache:rw" \ + -e CCACHE_DIR=/ccache \ -w /src \ --device /dev/fuse \ --cap-add SYS_ADMIN \ |
