Skip to content

Commit 1e8f21e

Browse files
authored
GitLab CI: only download CMake if not present already
1 parent 270d508 commit 1e8f21e

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

.gitlab/build-deps.sh

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,15 @@ export CC=$DEPS_INSTALL_BUILD_DIR/gcc-install/bin/gcc
3535
# CMake #
3636
#########
3737

38-
cd $PACKAGES_DIR
39-
wget --no-verbose --no-clobber https://github.com/Kitware/CMake/releases/download/v3.19.0/cmake-3.19.0-Linux-x86_64.tar.gz
40-
tar -xf cmake-3.19.0-Linux-x86_64.tar.gz -C $DEPS_INSTALL_BUILD_DIR
41-
rm -rf cmake-3.19.0-Linux-x86_64.tar.gz
42-
43-
cd $DEPS_INSTALL_BUILD_DIR
44-
mv cmake-3.19.0-Linux-x86_64 cmake-install
38+
if [ ! -f $DEPS_INSTALL_BUILD_DIR/cmake-install/bin/cmake ]; then
39+
cd $PACKAGES_DIR
40+
wget --no-verbose --no-clobber https://github.com/Kitware/CMake/releases/download/v3.19.0/cmake-3.19.0-Linux-x86_64.tar.gz
41+
tar -xf cmake-3.19.0-Linux-x86_64.tar.gz -C $DEPS_INSTALL_BUILD_DIR
42+
rm -rf cmake-3.19.0-Linux-x86_64.tar.gz
4543

44+
cd $DEPS_INSTALL_BUILD_DIR
45+
mv cmake-3.19.0-Linux-x86_64 cmake-install
46+
fi
4647
export PATH=$DEPS_INSTALL_BUILD_DIR/cmake-install/bin:$PATH
4748

4849
######
@@ -161,6 +162,7 @@ if [ ! -f $DEPS_INSTALL_RUNTIME_DIR/odb-install/bin/odb ]; then
161162
bpkg install --all --recursive --quiet --jobs $(nproc)
162163

163164
rm -f $PACKAGES_DIR/build2-toolchain-0.15.0.tar.xz
165+
rm -f $PACKAGES_DIR/build2-install-0.15.0.sh
164166
elif [[ $ODB_VERSION == "2.4.0" ]]; then
165167
# odb
166168
cd $PACKAGES_DIR

0 commit comments

Comments
 (0)