mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-20 17:53:02 +00:00
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.
This commit is contained in:
28
.travis.yml
28
.travis.yml
@@ -1,8 +1,7 @@
|
|||||||
# Travis defines and exports CC and CXX *after* we have defined our
|
# Travis defines and exports CC and CXX *after* we have defined our
|
||||||
# environment variables via 'env'. So, do not use 'env' to define
|
# environment variables via 'env'. So, do not use 'env' to define them.
|
||||||
# them. Instead, put their definitions in MATRIX_EVAL, which we eval
|
# Instead, put their definitions in MATRIX_EVAL, which we eval after the
|
||||||
# after the definitions from Travis.
|
# definitions from Travis.
|
||||||
|
|
||||||
language: cpp
|
language: cpp
|
||||||
|
|
||||||
env:
|
env:
|
||||||
@@ -21,7 +20,17 @@ stages:
|
|||||||
- compile
|
- compile
|
||||||
- test
|
- 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:
|
jobs:
|
||||||
include:
|
include:
|
||||||
- stage: "compile"
|
- stage: "compile"
|
||||||
@@ -37,19 +46,12 @@ jobs:
|
|||||||
- help2man --version
|
- help2man --version
|
||||||
- makeinfo --version
|
- makeinfo --version
|
||||||
- m4 --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.
|
# 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 fetch --unshallow || true
|
||||||
|
- git submodule update --init --recursive
|
||||||
|
|
||||||
- ./bootstrap
|
- ./bootstrap
|
||||||
- if [[ -f ~/.bashrc ]]; then source ~/.bashrc; fi
|
|
||||||
- ./configure --enable-gcc-warnings CC="$CC" CXX="$CXX" $CONFIGUREFLAGS || { cat config.log && false; }
|
- ./configure --enable-gcc-warnings CC="$CC" CXX="$CXX" $CONFIGUREFLAGS || { cat config.log && false; }
|
||||||
- make -j2
|
- make -j2
|
||||||
- make -j2 dist
|
- make -j2 dist
|
||||||
|
|||||||
Reference in New Issue
Block a user