зеркало из https://github.com/mozilla/kaldi.git
Travis CI: Do not run make test if nothing changed in src/
This commit is contained in:
Родитель
7b1a95db9a
Коммит
3ebc96a486
|
@ -16,8 +16,6 @@ addons:
|
|||
- g++-4.9
|
||||
- gfortran-4.9
|
||||
- liblapack-dev
|
||||
# - libopenblas-dev
|
||||
# - libblas-dev
|
||||
|
||||
branches:
|
||||
only:
|
||||
|
@ -38,4 +36,3 @@ script:
|
|||
|
||||
after_failure:
|
||||
- tools/extras/travis_show_failures.sh
|
||||
- ldd -v src/matrix/matrix-lib-test
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
# We take into account dependency pointers optionally set in the enironment.
|
||||
# We take into account dependency pointers optionally set in the environment.
|
||||
# Typical usage shown below; any one can be safely left unset.
|
||||
# INCDIRS="~/xroot/usr/include"
|
||||
# LIBDIRS="~/xroot/usr/lib /usr/lib/openblas-base"
|
||||
|
@ -11,6 +11,9 @@
|
|||
# Maximum make parallelism. Simply -j runs out of memory on Travis VM.
|
||||
MAXPAR=3
|
||||
|
||||
# Directories with code that can be tested with Travis (space-separated)
|
||||
TESTABLE_DIRS="src/"
|
||||
|
||||
# Run verbose (run and echo) and exit if failed.
|
||||
runvx() {
|
||||
echo "\$ $@"
|
||||
|
@ -31,6 +34,17 @@ mtoken() { echo ${2+$1=$2}; }
|
|||
runvx uname -a
|
||||
runvx env
|
||||
|
||||
# Check for changes in src/ only; report success right away if none.
|
||||
# However, do run tests if TRAVIS_COMMIT_RANGE does not parse. This
|
||||
# most likely means the branch was reset by --force; re-run tests then.
|
||||
if git rev-parse "${TRAVIS_COMMIT_RANGE}" >/dev/null 2>&1 && \
|
||||
! git diff --name-only "${TRAVIS_COMMIT_RANGE}" -- ${TESTABLE_DIRS} | read REPLY
|
||||
then
|
||||
echo; echo "No changes outside ${TESTABLE_DIRS} in the commit" \
|
||||
"range ${TRAVIS_COMMIT_RANGE}; reporting success."
|
||||
exit 0;
|
||||
fi
|
||||
|
||||
# Prepare make command fragments.
|
||||
CF="$CFLAGS -g $(addsw -I $INCDIRS)"
|
||||
LDF="$LDFLAGS $(addsw -L $LIBDIRS)"
|
||||
|
|
Загрузка…
Ссылка в новой задаче