1
0
mirror of https://github.com/stedolan/jq.git synced 2024-05-11 05:55:39 +00:00
stedolan-jq/.travis.yml

76 lines
1.8 KiB
YAML
Raw Normal View History

2016-01-18 14:58:58 -06:00
os:
- linux
- osx
sudo: false
language: c
2015-06-27 10:16:13 -07:00
compiler:
- gcc
- clang
matrix:
include:
- compiler: gcc
env: COVERAGE="--disable-valgrind --enable-gcov"
2016-01-18 14:58:58 -06:00
os: linux
2015-06-27 10:16:13 -07:00
2015-06-20 22:44:09 -07:00
addons:
apt:
packages:
- libonig-dev
- valgrind
2016-01-18 14:58:58 -06:00
- bison
2015-06-20 22:44:09 -07:00
before_install:
2016-01-18 14:58:58 -06:00
- echo "$TRAVIS_OS_NAME"
- uname -s
- brew update || true;
brew install flex || true;
brew install bison || true;
brew install oniguruma || true;
2015-08-23 20:36:11 -07:00
- rm src/{lexer,parser}.{c,h}
2015-06-20 22:44:09 -07:00
install:
- bundle install --gemfile=docs/Gemfile
2015-06-20 22:44:09 -07:00
- wget http://ftp.debian.org/debian/pool/main/b/bison/bison_3.0.2.dfsg-2_amd64.deb
- ar p bison_3.0.2.dfsg-2_amd64.deb data.tar.xz | tar xJ
2015-06-27 10:16:13 -07:00
- if [ -n "$COVERAGE" ]; then pip install --user cpp-coveralls; fi
2015-06-20 22:44:09 -07:00
before_script:
2016-01-18 14:58:58 -06:00
# If this is OS X we'll get bison from brew, else we'll get bison
# from the .deb unpacked above in the install section.
- PATH=/usr/local/opt/bison/bin:$PWD/usr/bin:$PATH
- echo SHELL=$SHELL
- echo PATH=$PATH
- which bison
- bison --version
- autoreconf -i
2016-01-18 14:58:58 -06:00
- ./configure YACC="$(which bison) -y" $COVERAGE
script:
2016-01-18 14:58:58 -06:00
# When using the bison from Debian we need to tell that bison where
# to find its data. Yay non-relocatable code. Not.
- echo PATH=$PATH
- which bison
- make BISON_PKGDATADIR=$PWD/usr/share/bison src/parser.c || make src/parser.c
- make -j4
2015-06-20 22:44:09 -07:00
- make check -j4
2015-06-27 10:16:13 -07:00
after_script:
2015-06-27 13:48:54 -07:00
- |
if [ -n "$COVERAGE" ]; then
2016-01-18 14:58:58 -06:00
rm -rf src/.libs # don't care about coverage for libjq
2015-08-23 20:36:11 -07:00
coveralls --gcov-options '\-lp' \
-e src/lexer.c -e src/parser.c -e src/jv_dtoa.c
2015-06-27 13:48:54 -07:00
fi
2015-06-27 10:16:13 -07:00
2015-06-20 22:44:09 -07:00
after_failure:
- cat test-suite.log
- cat tests/*.log
notifications:
email: false