@@ -186,23 +186,22 @@ EOF
186186ARG CCACHE_VERSION
187187
188188RUN <<EOF
189- # Clone the repository and checkout the desired version.
190- git clone https://github.com/ ccache/ccache
191- cd ccache
192- git checkout v ${CCACHE_VERSION}
189+ wget -O ccache.tar.gz https://github.com/ccache/ccache/releases/download/v${CCACHE_VERSION}/ccache-${CCACHE_VERSION}.tar.gz
190+ tar -xzf ccache.tar.gz
191+ rm ccache.tar.gz
192+ cd ccache- ${CCACHE_VERSION}
193193
194- # Build, install, and clean up. Note that the gold linker on RHEL 8 does not
195- # support the --dependency-file flag, so we use the regular linker instead.
194+ # Build, install, and clean up.
196195mkdir build
197196cd build
198197if [[ "${RHEL_VERSION}" -eq "8" ]]; then
199198 LINKER_OPTION='-D USE_FASTER_LINKER=OFF'
200199fi
201- cmake -D CMAKE_BUILD_TYPE =Release -D ENABLE_TESTING =OFF ${LINKER_OPTION} ..
202- make
200+ cmake -DCMAKE_BUILD_TYPE =Release -DENABLE_TESTING =OFF ${LINKER_OPTION} ..
201+ make -j
203202make install
204203cd ../..
205- rm -rf ccache
204+ rm -rf ccache-${CCACHE_VERSION}
206205
207206# Verify the installation.
208207ccache --version
@@ -288,22 +287,22 @@ EOF
288287ARG CCACHE_VERSION
289288
290289RUN <<EOF
291- # Clone the repository and checkout the desired version.
292- git clone https://github.com/ ccache/ccache
293- cd ccache
294- git checkout v ${CCACHE_VERSION}
290+ wget -O ccache.tar.gz https://github.com/ccache/ccache/releases/download/v${CCACHE_VERSION}/ccache-${CCACHE_VERSION}.tar.gz
291+ tar -xzf ccache.tar.gz
292+ rm ccache.tar.gz
293+ cd ccache- ${CCACHE_VERSION}
295294
296- # Build, install, and clean up. Note that the gold linker on RHEL 8 does not
297- # support the --dependency-file flag, so we use the regular linker instead.
295+ # Build, install, and clean up.
298296mkdir build
299297cd build
300298if [[ "${RHEL_VERSION}" -eq "8" ]]; then
301299 LINKER_OPTION='-D USE_FASTER_LINKER=OFF'
302300fi
303- cmake -D CMAKE_BUILD_TYPE=Release -D ENABLE_TESTING=OFF ${LINKER_OPTION} ..
301+ cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_TESTING=OFF ${LINKER_OPTION} ..
302+ make -j
304303make install
305304cd ../..
306- rm -rf ccache
305+ rm -rf ccache-${CCACHE_VERSION}
307306
308307# Verify the installation.
309308ccache --version
0 commit comments