Skip to content

[CI] Remove ccache from Linux CI Container #149197

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
12 changes: 4 additions & 8 deletions .ci/monolithic-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,7 @@ BUILD_DIR="${BUILD_DIR:=${MONOREPO_ROOT}/build}"
INSTALL_DIR="${BUILD_DIR}/install"
rm -rf "${BUILD_DIR}"

ccache --zero-stats

if [[ -n "${CLEAR_CACHE:-}" ]]; then
echo "clearing cache"
ccache --clear
fi
sccache --zero-stats

mkdir -p artifacts/reproducers

Expand All @@ -36,7 +31,7 @@ export CLANG_CRASH_DIAGNOSTICS_DIR=`realpath artifacts/reproducers`
function at-exit {
retcode=$?

ccache --print-stats > artifacts/ccache_stats.txt
sccache --show-stats > artifacts/sccache_stats.txt
cp "${BUILD_DIR}"/.ninja_log artifacts/.ninja_log
cp "${BUILD_DIR}"/test-results.*.xml artifacts/ || :

Expand Down Expand Up @@ -78,7 +73,8 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
-D LLVM_LIT_ARGS="${lit_args}" \
-D LLVM_ENABLE_LLD=ON \
-D CMAKE_CXX_FLAGS=-gmlt \
-D LLVM_CCACHE_BUILD=ON \
-D CMAKE_C_COMPILER_LAUNCHER=sccache \
-D CMAKE_CXX_COMPILER_LAUNCHER=sccache \
-D LIBCXX_CXX_ABI=libcxxabi \
-D MLIR_ENABLE_BINDINGS_PYTHON=ON \
-D LLDB_ENABLE_PYTHON=ON \
Expand Down
5 changes: 0 additions & 5 deletions .ci/monolithic-windows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@ BUILD_DIR="${BUILD_DIR:=${MONOREPO_ROOT}/build}"

rm -rf "${BUILD_DIR}"

if [[ -n "${CLEAR_CACHE:-}" ]]; then
echo "clearing sccache"
rm -rf "$SCCACHE_DIR"
fi

sccache --zero-stats
function at-exit {
retcode=$?
Expand Down
15 changes: 11 additions & 4 deletions .github/workflows/containers/github-action-ci/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,23 @@ RUN apt-get update && \
python3-psutil \
sudo \
# These are needed by the premerge pipeline. Pip is used to install
# dependent python packages and ccache is used for build caching. File and
# dependent python packages and sccache is used for build caching. File and
# tzdata are used for tests.
python3-pip \
ccache \
file \
tzdata \
sccache && \
tzdata && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

# We need sccache for caching. We cannot use the apt repository version because
# it is too old and has bugs related to features we require (particularly GCS
# caching), so we manually install it here.
RUN curl -L 'https://github.com/mozilla/sccache/releases/download/v0.10.0/sccache-v0.10.0-x86_64-unknown-linux-musl.tar.gz' > /tmp/sccache.tar.gz && \
echo "1fbb35e135660d04a2d5e42b59c7874d39b3deb17de56330b25b713ec59f849b /tmp/sccache.tar.gz" | sha256sum -c && \
tar xzf /tmp/sccache.tar.gz -O --wildcards '*/sccache' > '/usr/local/bin/sccache' && \
rm /tmp/sccache.tar.gz && \
chmod +x /usr/local/bin/sccache

ENV LLVM_SYSROOT=$LLVM_SYSROOT
ENV PATH=${LLVM_SYSROOT}/bin:${PATH}

Expand Down
Loading