Skip to content

Commit 326bb1d

Browse files
committed
Install from release gzip
1 parent 2143c2d commit 326bb1d

File tree

3 files changed

+44
-45
lines changed

3 files changed

+44
-45
lines changed

docker/debian/Dockerfile

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -174,19 +174,19 @@ EOF
174174
ARG CCACHE_VERSION
175175

176176
RUN <<EOF
177-
# Clone the repository and checkout the desired version.
178-
git clone https://github.com/ccache/ccache
179-
cd ccache
180-
git checkout v${CCACHE_VERSION}
177+
wget -O ccache.tar.gz https://github.com/ccache/ccache/releases/download/v${CCACHE_VERSION}/ccache-${CCACHE_VERSION}.tar.gz
178+
tar -xzf ccache.tar.gz
179+
rm ccache.tar.gz
180+
cd ccache-${CCACHE_VERSION}
181181

182182
# Build, install, and clean up.
183183
mkdir build
184184
cd build
185-
cmake -D CMAKE_BUILD_TYPE=Release -D ENABLE_TESTING=OFF ..
186-
make
185+
cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_TESTING=OFF ..
186+
make -j
187187
make install
188188
cd ../..
189-
rm -rf ccache
189+
rm -rf ccache-${CCACHE_VERSION}
190190

191191
# Verify the installation.
192192
ccache --version
@@ -289,19 +289,19 @@ EOF
289289
ARG CCACHE_VERSION
290290

291291
RUN <<EOF
292-
# Clone the repository and checkout the desired version.
293-
git clone https://github.com/ccache/ccache
294-
cd ccache
295-
git checkout v${CCACHE_VERSION}
292+
wget -O ccache.tar.gz https://github.com/ccache/ccache/releases/download/v${CCACHE_VERSION}/ccache-${CCACHE_VERSION}.tar.gz
293+
tar -xzf ccache.tar.gz
294+
rm ccache.tar.gz
295+
cd ccache-${CCACHE_VERSION}
296296

297297
# Build, install, and clean up.
298298
mkdir build
299299
cd build
300-
cmake -D CMAKE_BUILD_TYPE=Release -D ENABLE_TESTING=OFF ..
301-
make
300+
cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_TESTING=OFF ..
301+
make -j
302302
make install
303303
cd ../..
304-
rm -rf ccache
304+
rm -rf ccache-${CCACHE_VERSION}
305305

306306
# Verify the installation.
307307
ccache --version

docker/rhel/Dockerfile

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -186,23 +186,22 @@ EOF
186186
ARG CCACHE_VERSION
187187

188188
RUN <<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.
196195
mkdir build
197196
cd build
198197
if [[ "${RHEL_VERSION}" -eq "8" ]]; then
199198
LINKER_OPTION='-D USE_FASTER_LINKER=OFF'
200199
fi
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
203202
make install
204203
cd ../..
205-
rm -rf ccache
204+
rm -rf ccache-${CCACHE_VERSION}
206205

207206
# Verify the installation.
208207
ccache --version
@@ -288,22 +287,22 @@ EOF
288287
ARG CCACHE_VERSION
289288

290289
RUN <<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.
298296
mkdir build
299297
cd build
300298
if [[ "${RHEL_VERSION}" -eq "8" ]]; then
301299
LINKER_OPTION='-D USE_FASTER_LINKER=OFF'
302300
fi
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
304303
make install
305304
cd ../..
306-
rm -rf ccache
305+
rm -rf ccache-${CCACHE_VERSION}
307306

308307
# Verify the installation.
309308
ccache --version

docker/ubuntu/Dockerfile

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -147,19 +147,19 @@ EOF
147147
ARG CCACHE_VERSION
148148

149149
RUN <<EOF
150-
# Clone the repository and checkout the desired version.
151-
git clone https://github.com/ccache/ccache
152-
cd ccache
153-
git checkout v${CCACHE_VERSION}
150+
wget -O ccache.tar.gz https://github.com/ccache/ccache/releases/download/v${CCACHE_VERSION}/ccache-${CCACHE_VERSION}.tar.gz
151+
tar -xzf ccache.tar.gz
152+
rm ccache.tar.gz
153+
cd ccache-${CCACHE_VERSION}
154154

155155
# Build, install, and clean up.
156156
mkdir build
157157
cd build
158-
cmake -D CMAKE_BUILD_TYPE=Release -D ENABLE_TESTING=OFF ..
159-
make
158+
cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_TESTING=OFF ..
159+
make -j
160160
make install
161161
cd ../..
162-
rm -rf ccache
162+
rm -rf ccache-${CCACHE_VERSION}
163163

164164
# Verify the installation.
165165
ccache --version
@@ -257,19 +257,19 @@ EOF
257257
ARG CCACHE_VERSION
258258

259259
RUN <<EOF
260-
# Clone the repository and checkout the desired version.
261-
git clone https://github.com/ccache/ccache
262-
cd ccache
263-
git checkout v${CCACHE_VERSION}
260+
wget -O ccache.tar.gz https://github.com/ccache/ccache/releases/download/v${CCACHE_VERSION}/ccache-${CCACHE_VERSION}.tar.gz
261+
tar -xzf ccache.tar.gz
262+
rm ccache.tar.gz
263+
cd ccache-${CCACHE_VERSION}
264264

265265
# Build, install, and clean up.
266266
mkdir build
267267
cd build
268-
cmake -D CMAKE_BUILD_TYPE=Release -D ENABLE_TESTING=OFF ..
269-
make
268+
cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_TESTING=OFF ..
269+
make -j
270270
make install
271271
cd ../..
272-
rm -rf ccache
272+
rm -rf ccache-${CCACHE_VERSION}
273273

274274
# Verify the installation.
275275
ccache --version

0 commit comments

Comments
 (0)