[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
CI: avoid useless git costs
From: |
Akim Demaille |
Subject: |
CI: avoid useless git costs |
Date: |
Sun, 19 May 2019 17:54:14 +0200 |
commit 1e49f5e1e64b41c98bd2da7a60863a9777a52ad7
Author: Akim Demaille <address@hidden>
Date: Sun May 19 14:05:01 2019 +0200
CI: avoid useless git costs
The final gain is small: 2h2min instead 2h9min. But that is still an
improvement.
* .travis.yml (git.depth): Make the clone very shallow.
(git.submodules): Don't clone gnulib in test jobs.
(jobs.include.compile.script): Do it here.
diff --git a/.travis.yml b/.travis.yml
index 098b898a..2a594db0 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,8 +1,7 @@
# Travis defines and exports CC and CXX *after* we have defined our
-# environment variables via 'env'. So, do not use 'env' to define
-# them. Instead, put their definitions in MATRIX_EVAL, which we eval
-# after the definitions from Travis.
-
+# environment variables via 'env'. So, do not use 'env' to define them.
+# Instead, put their definitions in MATRIX_EVAL, which we eval after the
+# definitions from Travis.
language: cpp
env:
@@ -21,7 +20,17 @@ stages:
- compile
- test
-# matrix.include and jobs.include are aliases
(https://docs.travis-ci.com/user/conditional-builds-stages-jobs/).
+git:
+ # Manually handle submodules so that we don't have to uselessly waste 150s
+ # to download gnulib in the 'test' jobs.
+ submodules: false
+
+ # For the same reasons, we would like to not clone the repo either, but it
+ # does not seem to be possible.
+ depth: 1
+
+# matrix.include and jobs.include are aliases
+# (https://docs.travis-ci.com/user/conditional-builds-stages-jobs/).
jobs:
include:
- stage: "compile"
@@ -37,19 +46,12 @@ jobs:
- help2man --version
- makeinfo --version
- m4 --version
- - git tag -l
- # For some reasons, sometimes the checkout does not have any tags,
- # so `git describe` fails, so bootstrap fails.
- - git describe || git tag v3.0 -m "Fake version 3.0."
- - git describe
-
- # Appears to be needed for the following command
(https://github.com/AppImage/AppImageKit/issues/511).
- - git submodule sync
+
# Travis makes a shallow clone, but we need it in full to build the
ChangeLog and apply the fixes in git-log-fix.
- git fetch --unshallow || true
+ - git submodule update --init --recursive
- ./bootstrap
- - if [[ -f ~/.bashrc ]]; then source ~/.bashrc; fi
- ./configure --enable-gcc-warnings CC="$CC" CXX="$CXX"
$CONFIGUREFLAGS || { cat config.log && false; }
- make -j2
- make -j2 dist
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- CI: avoid useless git costs,
Akim Demaille <=