From 50eb4a02f848458ab9a967563514390b079ad881 Mon Sep 17 00:00:00 2001 From: Jeremiah Senkpiel Date: Wed, 20 Sep 2017 23:12:35 -0400 Subject: [PATCH] ci: attempt at separate linter CI job Refs: https://github.com/ayojs/ayo/pull/71 --- .travis.yml | 7 +++++-- tools/run-ci.sh | 11 +++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) create mode 100755 tools/run-ci.sh 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