summaryrefslogtreecommitdiff
path: root/.travis.yml
diff options
context:
space:
mode:
authorAkim Demaille <akim.demaille@gmail.com>2019-05-19 14:05:01 +0200
committerAkim Demaille <akim.demaille@gmail.com>2019-05-19 17:52:28 +0200
commit1e49f5e1e64b41c98bd2da7a60863a9777a52ad7 (patch)
tree2bb1b811611948e15eb417a171d61d4e69f922d2 /.travis.yml
parent49aae94bedbc2ffad90a3a9a3d9433a98e82f84b (diff)
downloadbison-1e49f5e1e64b41c98bd2da7a60863a9777a52ad7.tar.gz
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.
Diffstat (limited to '.travis.yml')
-rw-r--r--.travis.yml30
1 files changed, 16 insertions, 14 deletions
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