Skip to content

Commit

Permalink
Disable ccache_hashdir
Browse files Browse the repository at this point in the history
  • Loading branch information
doganulus committed Dec 22, 2024
1 parent 6d4c520 commit 2d9b89c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 20 deletions.
19 changes: 14 additions & 5 deletions containers/autoware-devel/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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" ]
12 changes: 4 additions & 8 deletions containers/autoware-devel/build-autoware.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
7 changes: 0 additions & 7 deletions containers/autoware-devel/entrypoint.devel.sh
Original file line number Diff line number Diff line change
@@ -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 "$@"

0 comments on commit 2d9b89c

Please sign in to comment.