diff --git a/.travis.yml b/.travis.yml index 73db5f76c5..69b0d20f96 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,10 @@ os: - osx sudo: false cache: ccache +matrix: + include: + - os: linux + env: LINTER_ONLY=true before_install: - export HOMEBREW_NO_AUTO_UPDATE=1 # work around https://github.com/travis-ci/travis-ci/issues/7456 - if [ $TRAVIS_OS_NAME = osx ]; then brew install ccache; fi @@ -17,5 +21,4 @@ install: - ./configure - make -j2 V= script: - - make -j2 test-ci - - make lint + - tools/run-ci.sh # do linter env variable detection diff --git a/tools/run-ci.sh b/tools/run-ci.sh new file mode 100755 index 0000000000..85013f98f3 --- /dev/null +++ b/tools/run-ci.sh @@ -0,0 +1,11 @@ +#!/bin/bash +set -ev + +# always change the working directory to the project's root directory +cd $(dirname $0)/.. + +if [ "${LINTER_ONLY}" = "true" ]; then + make lint +else + make -j2 test-ci +fi