mirror of https://github.com/ARMmbed/mbed-os.git
Travis: Use shallow fetches
We only compare files in current PR with the base branch. There's no need to fetch the full git history or branches that are not involved in the comparison. This is to save time in Travis runs.pull/14705/head
parent
2ea0386f55
commit
d28ce001ab
15
.travis.yml
15
.travis.yml
|
@ -68,9 +68,8 @@ matrix:
|
||||||
before_script:
|
before_script:
|
||||||
- mkdir -p SCANCODE
|
- mkdir -p SCANCODE
|
||||||
- mkdir -p SCANCODE_NEW_FILES
|
- mkdir -p SCANCODE_NEW_FILES
|
||||||
# Fetch remaining information needed for branch comparison
|
# Fetch the base branch to compare against
|
||||||
- git fetch --all --unshallow --tags
|
- git fetch origin "${TRAVIS_BRANCH}" --depth=1
|
||||||
- git fetch origin "${TRAVIS_BRANCH}"
|
|
||||||
script:
|
script:
|
||||||
# scancode does not support list of files, only one file or directory
|
# scancode does not support list of files, only one file or directory
|
||||||
# we use SCANCODE directory for all changed files (their copies with full tree)
|
# we use SCANCODE directory for all changed files (their copies with full tree)
|
||||||
|
@ -130,9 +129,8 @@ matrix:
|
||||||
export PATH="${PWD}/bin:${PATH}";
|
export PATH="${PWD}/bin:${PATH}";
|
||||||
cd -
|
cd -
|
||||||
- astyle --version
|
- astyle --version
|
||||||
# Fetch remaining information needed for branch comparison
|
# Fetch the base branch to compare against
|
||||||
- git fetch --all --unshallow --tags
|
- git fetch origin "${TRAVIS_BRANCH}" --depth=1
|
||||||
- git fetch origin "${TRAVIS_BRANCH}"
|
|
||||||
script:
|
script:
|
||||||
- >-
|
- >-
|
||||||
git diff --name-only --diff-filter=d FETCH_HEAD..HEAD \
|
git diff --name-only --diff-filter=d FETCH_HEAD..HEAD \
|
||||||
|
@ -246,9 +244,8 @@ matrix:
|
||||||
- python -m pip install --upgrade setuptools==40.4.3
|
- python -m pip install --upgrade setuptools==40.4.3
|
||||||
- pip install tabulate argparse
|
- pip install tabulate argparse
|
||||||
- pip list --verbose
|
- pip list --verbose
|
||||||
# Fetch remaining information needed for branch comparison
|
# Fetch the base branch to compare against
|
||||||
- git fetch --all --unshallow --tags
|
- git fetch origin "${TRAVIS_BRANCH}" --depth=1
|
||||||
- git fetch origin "${TRAVIS_BRANCH}"
|
|
||||||
script:
|
script:
|
||||||
- >-
|
- >-
|
||||||
git diff --name-only --diff-filter=d FETCH_HEAD..HEAD \
|
git diff --name-only --diff-filter=d FETCH_HEAD..HEAD \
|
||||||
|
|
Loading…
Reference in New Issue