From 2d9b89c70a40f35efc9a02bba7ca1feef9f62958 Mon Sep 17 00:00:00 2001 From: Dogan Ulus Date: Sun, 22 Dec 2024 14:44:57 +0300 Subject: [PATCH] Disable ccache_hashdir --- containers/autoware-devel/Dockerfile | 19 ++++++++++++++----- containers/autoware-devel/build-autoware.sh | 12 ++++-------- containers/autoware-devel/entrypoint.devel.sh | 7 ------- 3 files changed, 18 insertions(+), 20 deletions(-) diff --git a/containers/autoware-devel/Dockerfile b/containers/autoware-devel/Dockerfile index 484303f..900949e 100644 --- a/containers/autoware-devel/Dockerfile +++ b/containers/autoware-devel/Dockerfile @@ -93,8 +93,6 @@ RUN git clone ${AUTOWARE_SOURCE_REPO} --depth=1 ${AUTOWARE_DEVEL_ROOT} && \ rm -rf ${AUTOWARE_DEVEL_SOURCE_DIR}/vehicle && \ du --human-readable --max-depth 2 ${AUTOWARE_DEVEL_SOURCE_DIR} -WORKDIR ${HOME} - FROM ${IMAGE_NAME}:${AUTOWARE_VERSION}-base AS autoware-builder ARG TARGETARCH TARGETOS TARGETPLATFORM TARGETVARIANT @@ -149,6 +147,8 @@ RUN --mount=type=bind,from=autoware-source,source=${AUTOWARE_DEVEL_SOURCE_DIR},t COPY autoware-devel/build-autoware.sh /opt/autoware/bin/build-autoware.sh +RUN git config --global advice.detachedHead false + # Build environment management ENV CMAKE_BUILD_TYPE=Release ENV CMAKE_C_COMPILER_LAUNCHER=ccache @@ -160,6 +160,8 @@ ENV CMAKE_GENERATOR=Ninja # Ccache configuration ENV CCACHE_DIR=/var/cache/ccache ENV CCACHE_BASEDIR=${AUTOWARE_DEVEL_ROOT} +ENV CCACHE_TEMPDIR=/tmp/ccache/ +ENV CCACHE_HASHDIR=false ENV CCACHE_UMASK=002 FROM ${IMAGE_NAME}:${AUTOWARE_VERSION}-builder AS autoware-builder-with-cache @@ -211,13 +213,20 @@ COPY autoware-devel/entrypoint.devel.sh /etc/autoware/entrypoint.sh RUN chmod +x /etc/autoware/entrypoint.sh USER bounverif -WORKDIR ${HOME} +WORKDIR /home/bounverif -ENV AUTOWARE_DEVEL_ROOT=${HOME}/autoware +ENV AUTOWARE_DEVEL_ROOT=/home/bounverif/autoware ENV AUTOWARE_DEVEL_SOURCE_DIR=${AUTOWARE_DEVEL_ROOT}/src ENV AUTOWARE_DEVEL_BUILD_DIR=${AUTOWARE_DEVEL_ROOT}/build ENV AUTOWARE_DEVEL_INSTALL_DIR=${AUTOWARE_DEVEL_ROOT}/install -ENV CCACHE_READONLY=true +# ENV CCACHE_BASEDIR=${AUTOWARE_DEVEL_ROOT} +# ENV CCACHE_READONLY=true +# ENV CCACHE_TEMPDIR=/home/bounverif/.ccache/tmp + +ENV CCACHE_BASEDIR=${AUTOWARE_DEVEL_ROOT} +ENV CCACHE_DIR=/home/bounverif/.ccache +ENV CCACHE_SECONDARY_STORAGE=file:///var/cache/ccache ENTRYPOINT ["/etc/autoware/entrypoint.sh"] +CMD [ "/bin/bash" ] diff --git a/containers/autoware-devel/build-autoware.sh b/containers/autoware-devel/build-autoware.sh index 79d1b2e..99aa16b 100644 --- a/containers/autoware-devel/build-autoware.sh +++ b/containers/autoware-devel/build-autoware.sh @@ -14,12 +14,8 @@ colcon --log-base /dev/null build \ --parallel-workers "${AUTOWARE_BUILD_PARALLEL_WORKERS:-4}" \ --merge-install \ --event-handlers \ - console_direct- \ - console_stderr+ \ - console_cohesion- \ - console_start_end- \ - console_package_list+ \ - status- \ - summary+ \ - desktop_notification- + console_cohesion+ \ + --cmake-args \ + " -Wno-dev" \ + " --no-warn-unused-cli" \ ccache -v --show-stats \ No newline at end of file diff --git a/containers/autoware-devel/entrypoint.devel.sh b/containers/autoware-devel/entrypoint.devel.sh index 487e6cd..621fb0c 100644 --- a/containers/autoware-devel/entrypoint.devel.sh +++ b/containers/autoware-devel/entrypoint.devel.sh @@ -1,10 +1,3 @@ #!/bin/bash set -e - -export AUTOWARE_ROOT="${HOME}/autoware" -export AUTOWARE_SOURCE_DIR="${AUTOWARE_ROOT}/src" -export AUTOWARE_BUILD_DIR="${AUTOWARE_ROOT}/build" -export AUTOWARE_INSTALL_DIR="${AUTOWARE_ROOT}/install" -export AUTOWARE_DATA_DIR="${AUTOWARE_ROOT}/data" - exec "$@" \ No newline at end of file