Permalink
Fetching contributors…
Cannot retrieve contributors at this time
128 lines (127 sloc) 4.65 KB
addons: &def_addons
apt:
packages:
- lcov
artifacts:
paths:
- $(ls -1 $(make showbuilddir)/*.{gz,zip} | tr "\n" :)
- $(find . -name 'core.*' -o -name 'core' | tr "\n" :)
target_paths:
- build/$TRAVIS_BUILD_NUMBER/$TRAVIS_JOB_NUMBER
- version/$(git describe --always --tags --match 'v?.?.?*' $TRAVIS_COMMIT)
language: c
env:
global:
- DEPSSRC=$HOME/local
- LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$DEPSSRC/lib/x86_64-linux-gnu"
- PATH="$PATH:$DEPSSRC/bin"
matrix:
include:
- compiler: x86_64-w64-mingw32-gcc
os: linux
env:
- PLATFORM=mingw BITS=64 HOST=x86_64
- CXX=$HOST-w64-mingw32-g++
- CHECK_RULE=check_sw GCOV= JIT=0 SDL=0
- PKG_RULE=zip
addons:
<<: *def_addons
apt:
packages:
- mingw-w64
- mingw-w64-dev
- gcc-mingw-w64-x86-64
- g++-mingw-w64-x86-64
- binutils-mingw-w64-x86-64
- wine
- compiler: i686-w64-mingw32-gcc
os: linux
env:
- PLATFORM=mingw BITS=32 HOST=i686
- CXX=$HOST-w64-mingw32-g++
- CHECK_RULE=check_sw GCOV= JIT=0 SDL=0
- PKG_RULE=zip
addons:
<<: *def_addons
apt:
packages:
- mingw-w64
- mingw-w64-dev
- gcc-mingw-w64-i686
- g++-mingw-w64-i686
- binutils-mingw-w64-i686
- wine
- compiler: "clang"
os: osx
env:
- PLATFORM=osx BITS=64 HOST=x86_64
- CHECK_RULE=check_sw GCOV= SDL=0
- PKG_RULE=gzip
- CXX=clang++
- compiler: "gcc"
os: osx
env:
- PLATFORM=osx BITS=64 HOST=x86_64
- CHECK_RULE=check_sw GCOV= JIT=0 SDL=0
- PKG_RULE=gzip
- compiler: "clang"
os: linux
env:
- PLATFORM=linux BITS=64 HOST=x86_64
# Travis doesn't have SDL2 installed, so we have to tell it where we
# downloaded a version
- SDL2_PKGCONFIG="PKG_CONFIG_PATH=$DEPSSRC/lib/x86_64-linux-gnu/pkgconfig pkg-config --define-variable=prefix=$DEPSSRC"
- CHECK_RULE=check GCOV=
- PKG_RULE=gzip
- CXX=clang++
- compiler: "gcc"
os: linux
env:
- PLATFORM=linux BITS=64 HOST=x86_64
# Travis doesn't have SDL2 installed, so we have to tell it where we
# downloaded a version
- SDL2_PKGCONFIG="PKG_CONFIG_PATH=$DEPSSRC/lib/x86_64-linux-gnu/pkgconfig pkg-config --define-variable=prefix=$DEPSSRC"
# TODO do `check` or `check_hw` here too, not just `check_sw` (as part of `coverage`)
- CHECK_RULE=coverage GCOV=1
- PKG_RULE=gzip
- COVERITY_SCAN_PROJECT_NAME="$TRAVIS_REPO_SLUG"
- COVERITY_SCAN_BRANCH_PATTERN="coverity_scan"
- COVERITY_SCAN_NOTIFICATION_EMAIL="coverity@tenyr.info"
- COVERITY_SCAN_BUILD_COMMAND="make V=1 all vpi"
sudo: false
install:
- gem install coveralls-lcov
before_script:
- mkdir -p $DEPSSRC
- if [[ $TRAVIS_OS_NAME = linux ]] ; then curl -s 'http://dl.tenyr.info/deps/libsdl2_2.0.3%2Bimage_2.0.0%2Bdev-precise-binaries.tar.gz' | tar -C $DEPSSRC -zx ; fi
- if [[ $TRAVIS_OS_NAME = linux ]] ; then curl -s 'http://dl.tenyr.info/deps/iverilog-s20140801-139-gaf85d44-x86_64-linux-binaries-0.10.0.tar.gz' | tar -C $DEPSSRC -zx ; fi
- if [[ $PLATFORM = mingw ]] ; then make download-all-sdl2 ; fi
- if [[ $PLATFORM = mingw ]] ; then sed "s#{{{}}}#z:$(echo $PWD/3rdparty/sdl2/$HOST-w64-mingw32/bin | sed 's#/#\\\\\\\\#g')#" scripts/winepath.reg > scripts/winepath2.reg ; wine regedit scripts/winepath2.reg ; fi
- if [[ $TRAVIS_OS_NAME = osx ]] ; then brew install bison ; BISONS=(/usr/local/Cellar/bison/*/bin/bison) ; export BISON="${BISONS[${#BISONS[@]}-1]}" ; fi
# implement Coverity Scan with before_script instead of addons.coverity_scan
# to work around too-early quota check by the coverity_scan addon
- if [[ -n $COVERITY_SCAN_PROJECT_NAME ]] ; then curl -s 'https://scan.coverity.com/scripts/travisci_build_coverity_scan.sh' | bash || true ; fi
script:
- make V=1 all
- make $CHECK_RULE
- make local-install
- make $PKG_RULE
after_success:
- |
if [[ -n $GCOV ]] ; then
coveralls-lcov $(make showbuilddir)/coverage.info.src
coveralls-lcov $(make showbuilddir)/coverage.info.vpi
bash <(curl -s https://codecov.io/bash) -f $(make showbuilddir)/coverage.info.src -f $(make showbuilddir)/coverage.info.vpi
fi
notifications:
irc:
channels:
- "irc.freenode.org#tenyr"
use_notice: true
skip_join: true
webhooks:
urls:
- https://webhooks.gitter.im/e/2363bd78181634f85b62
on_success: always
on_failure: change
on_start: never