Change Travis config to utilize Build Stages
See: https://docs.travis-ci.com/user/build-stages/
This commit is contained in:
1 parent
bd34b8dd2e
commit
c163e88af3
1 file changed
+45
-23
+45
-23
@@ -1,20 +1,14 @@
|
|||||||
os:
|
|
||||||
- linux
|
|
||||||
- osx
|
|
||||||
|
|
||||||
sudo: false
|
sudo: false
|
||||||
|
|
||||||
language: c
|
language: c
|
||||||
|
|
||||||
compiler:
|
jobs:
|
||||||
- gcc
|
|
||||||
- clang
|
|
||||||
|
|
||||||
matrix:
|
|
||||||
include:
|
include:
|
||||||
- compiler: gcc
|
# Build with gcc and run tests on Ubuntu.
|
||||||
env: COVERAGE="--disable-valgrind --enable-gcov"
|
- &test-ubuntu
|
||||||
|
stage: test
|
||||||
os: linux
|
os: linux
|
||||||
|
compiler: gcc
|
||||||
|
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
@@ -24,11 +18,7 @@ addons:
|
|||||||
- automake
|
- automake
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
- echo "$TRAVIS_OS_NAME"
|
|
||||||
- uname -s
|
- uname -s
|
||||||
- brew update || true;
|
|
||||||
brew install flex || true;
|
|
||||||
brew install bison || true;
|
|
||||||
- rvm install ruby-1.9.3-p551
|
- rvm install ruby-1.9.3-p551
|
||||||
- rvm use 1.9.3
|
- rvm use 1.9.3
|
||||||
- rm src/{lexer,parser}.{c,h}
|
- rm src/{lexer,parser}.{c,h}
|
||||||
@@ -77,18 +67,50 @@ script:
|
|||||||
- make -j4
|
- make -j4
|
||||||
- make check -j4
|
- make check -j4
|
||||||
|
|
||||||
after_script:
|
|
||||||
- |
|
|
||||||
if [ -n "$COVERAGE" ]; then
|
|
||||||
rm -rf src/.libs # don't care about coverage for libjq
|
|
||||||
coveralls --gcov-options '\-lp' \
|
|
||||||
-e src/lexer.c -e src/parser.c -e src/jv_dtoa.c
|
|
||||||
fi
|
|
||||||
|
|
||||||
after_failure:
|
after_failure:
|
||||||
- cat test-suite.log
|
- cat test-suite.log
|
||||||
- cat tests/*.log
|
- cat tests/*.log
|
||||||
|
|
||||||
|
|
||||||
|
# Build with clang and run tests on Ubuntu.
|
||||||
|
- <<: *test-ubuntu
|
||||||
|
compiler: clang
|
||||||
|
|
||||||
|
|
||||||
|
# Build with gcc and run tests with gcov on Ubuntu.
|
||||||
|
- <<: *test-ubuntu
|
||||||
|
env: COVERAGE="--disable-valgrind --enable-gcov"
|
||||||
|
|
||||||
|
after_script:
|
||||||
|
- rm -rf src/.libs # don't care about coverage for libjq
|
||||||
|
- coveralls --gcov-options '\-lp'
|
||||||
|
-e src/lexer.c -e src/parser.c -e src/jv_dtoa.c
|
||||||
|
|
||||||
|
|
||||||
|
# Build with gcc and run tests on macOS.
|
||||||
|
- &test-osx
|
||||||
|
<<: *test-ubuntu
|
||||||
|
os: osx
|
||||||
|
|
||||||
|
before_install:
|
||||||
|
- uname -s
|
||||||
|
- brew update
|
||||||
|
- brew install flex
|
||||||
|
- brew install bison
|
||||||
|
- rvm install ruby-1.9.3-p551
|
||||||
|
- rvm use 1.9.3
|
||||||
|
- rm src/{lexer,parser}.{c,h}
|
||||||
|
- sed -i.bak '/^AM_INIT_AUTOMAKE(\[-Wno-portability 1\.14\])$/s/14/11/' modules/oniguruma/configure.ac
|
||||||
|
|
||||||
|
install:
|
||||||
|
- bundle install --gemfile=docs/Gemfile
|
||||||
|
- if [ -n "$COVERAGE" ]; then pip install --user cpp-coveralls; fi
|
||||||
|
|
||||||
|
|
||||||
|
# Build with clang and run tests on macOS.
|
||||||
|
- <<: *test-osx
|
||||||
|
compiler: clang
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
email: false
|
email: false
|
||||||
|
|
||||||
Reference in new issue
Block a user