[gjs: 1/3] CI: Limit bandwidth usage for git clones during CI
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs: 1/3] CI: Limit bandwidth usage for git clones during CI
- Date: Mon, 30 Nov 2020 21:37:41 +0000 (UTC)
commit 9284e0e16eac1fb9ad3d63af798c1f1cb36ef170
Author: Philip Chimento <philip chimento gmail com>
Date: Tue Nov 24 21:21:39 2020 -0800
CI: Limit bandwidth usage for git clones during CI
Clone everything at depth 1, omitting tags, and fetching a specific branch
only.
Thanks to:
https://tecnocode.co.uk/2020/07/09/easily-speed-up-ci-by-reducing-download-size/
.gitlab-ci.yml | 2 +-
subprojects/glib.wrap | 1 +
subprojects/gobject-introspection.wrap | 1 +
subprojects/libffi.wrap | 1 +
subprojects/proxy-libintl.wrap | 1 +
subprojects/sysprof.wrap | 1 +
test/extra/Dockerfile | 2 +-
test/extra/Dockerfile.debug | 4 ++--
test/test-ci.sh | 2 +-
9 files changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 31efe53d..210561b8 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -223,7 +223,7 @@ iwyu:
image: registry.gitlab.gnome.org/gnome/gjs:fedora.mozjs78-debug
script:
- git remote add upstream https://gitlab.gnome.org/GNOME/gjs || git remote set-url upstream
https://gitlab.gnome.org/GNOME/gjs
- - git fetch upstream
+ - git fetch --depth=1 --no-tags upstream master
- ./tools/run_iwyu.sh upstream/master
only:
- branches
diff --git a/subprojects/glib.wrap b/subprojects/glib.wrap
index c5146f5e..960c9683 100644
--- a/subprojects/glib.wrap
+++ b/subprojects/glib.wrap
@@ -5,3 +5,4 @@
directory=glib
url=https://gitlab.gnome.org/GNOME/glib.git
revision=origin/master
+depth=1
diff --git a/subprojects/gobject-introspection.wrap b/subprojects/gobject-introspection.wrap
index 75bddbc6..a6c1a2c0 100644
--- a/subprojects/gobject-introspection.wrap
+++ b/subprojects/gobject-introspection.wrap
@@ -5,3 +5,4 @@
directory=gobject-introspection
url=https://gitlab.gnome.org/GNOME/gobject-introspection.git
revision=origin/master
+depth=1
diff --git a/subprojects/libffi.wrap b/subprojects/libffi.wrap
index a7f0d818..cb553cb3 100644
--- a/subprojects/libffi.wrap
+++ b/subprojects/libffi.wrap
@@ -5,3 +5,4 @@
directory=libffi
url=https://gitlab.freedesktop.org/gstreamer/meson-ports/libffi.git
revision=meson
+depth=1
diff --git a/subprojects/proxy-libintl.wrap b/subprojects/proxy-libintl.wrap
index 3b32f634..9ec2fe8e 100644
--- a/subprojects/proxy-libintl.wrap
+++ b/subprojects/proxy-libintl.wrap
@@ -5,3 +5,4 @@
directory=proxy-libintl
url=https://github.com/frida/proxy-libintl.git
revision=0.1
+depth=1
diff --git a/subprojects/sysprof.wrap b/subprojects/sysprof.wrap
index 6018fa10..8d38cf3e 100644
--- a/subprojects/sysprof.wrap
+++ b/subprojects/sysprof.wrap
@@ -6,3 +6,4 @@
directory=sysprof
url=https://gitlab.gnome.org/GNOME/sysprof.git
revision=master
+depth=1
diff --git a/test/extra/Dockerfile b/test/extra/Dockerfile
index 91fdda2b..09994c36 100644
--- a/test/extra/Dockerfile
+++ b/test/extra/Dockerfile
@@ -15,7 +15,7 @@ RUN dnf -y builddep ${MOZJS_BUILDDEPS}
WORKDIR /root
-RUN git clone --depth 1 https://github.com/ptomato/mozjs.git -b ${MOZJS_BRANCH}
+RUN git clone --no-tags --depth 1 https://github.com/ptomato/mozjs.git -b ${MOZJS_BRANCH}
RUN mkdir -p mozjs/_build
WORKDIR /root/mozjs/_build
diff --git a/test/extra/Dockerfile.debug b/test/extra/Dockerfile.debug
index 13d90eb2..0ace1e10 100644
--- a/test/extra/Dockerfile.debug
+++ b/test/extra/Dockerfile.debug
@@ -29,7 +29,7 @@ RUN DESTDIR=/root/iwyu-install ninja install
WORKDIR /root
-RUN git clone --depth 1 https://gitlab.gnome.org/GNOME/sysprof.git
+RUN git clone --branch master --no-tags --depth 1 https://gitlab.gnome.org/GNOME/sysprof.git
WORKDIR /root/sysprof
@@ -41,7 +41,7 @@ RUN DESTDIR=/root/sysprof-install ninja -C _build install
WORKDIR /root
-RUN git clone --depth 1 https://github.com/ptomato/mozjs.git -b ${MOZJS_BRANCH}
+RUN git clone --no-tags --depth 1 https://github.com/ptomato/mozjs.git -b ${MOZJS_BRANCH}
RUN mkdir -p mozjs/_build
WORKDIR /root/mozjs/_build
diff --git a/test/test-ci.sh b/test/test-ci.sh
index bb687a28..67195288 100755
--- a/test/test-ci.sh
+++ b/test/test-ci.sh
@@ -40,7 +40,7 @@ do_Get_Upstream_Master () {
echo 'Cloning upstream master'
mkdir -p ~/tmp-upstream; cd ~/tmp-upstream || exit 1
- git clone --depth 1 https://gitlab.gnome.org/GNOME/gjs.git; cd gjs || exit 1
+ git clone --branch master --no-tags --depth 1 https://gitlab.gnome.org/GNOME/gjs.git; cd gjs || exit 1
echo '-----------------------------------------'
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]