93 строки
3.9 KiB
YAML
93 строки
3.9 KiB
YAML
sudo: false
|
|
language: csharp
|
|
os:
|
|
- linux
|
|
- osx
|
|
cache:
|
|
directories:
|
|
- compiler/.cabal-sandbox
|
|
- cs/packages
|
|
env:
|
|
- BOND_LANG=cpp-clang
|
|
- BOND_LANG=cpp-gcc
|
|
- BOND_LANG=cs
|
|
- BOND_LANG=py-clang
|
|
- BOND_LANG=py-gcc
|
|
- BOND_GHC_VERSION=-7.8.4
|
|
- BOND_GHC_VERSION=-7.6.3
|
|
addons:
|
|
apt:
|
|
sources:
|
|
- boost-latest
|
|
- ubuntu-toolchain-r-test
|
|
- hvr-ghc
|
|
packages:
|
|
- g++-4.8
|
|
- libboost1.55-all-dev
|
|
- cabal-install-1.22
|
|
- ghc-7.8.4
|
|
- ghc-7.6.3
|
|
- ghc
|
|
matrix:
|
|
exclude:
|
|
# linux VM is too small to build C++ unit tests with g++
|
|
- os: linux
|
|
env: BOND_LANG=cpp-gcc
|
|
# linux C++ build/test already includes Python
|
|
- os: linux
|
|
env: BOND_LANG=py-clang
|
|
# don't test non-default versions of GHC on OSX
|
|
- os: osx
|
|
env: BOND_GHC_VERSION=-7.8.4
|
|
- os: osx
|
|
env: BOND_GHC_VERSION=-7.6.3
|
|
# on OS X g++ and clang++ are the same compiler
|
|
- os: osx
|
|
env: BOND_LANG=cpp-gcc
|
|
- os: osx
|
|
env: BOND_LANG=py-gcc
|
|
|
|
before_install:
|
|
# select C++ compiler
|
|
- export CXX="clang++" CC="clang"
|
|
- if [[ $BOND_LANG == *gcc ]]; then export CXX="g++-4.8" CC="gcc-4.8"; fi
|
|
# linux prereqisite packages
|
|
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then wget --no-check-certificate https://www.cmake.org/files/v3.2/cmake-3.2.3-Linux-x86_64.tar.gz; fi
|
|
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then tar -xzvf cmake-3.2.3-Linux-x86_64.tar.gz; fi
|
|
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then export PATH=$PWD/cmake-3.2.3-Linux-x86_64/bin:$PATH; fi
|
|
# OS X prerequisite packages
|
|
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew update; fi
|
|
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew install ghc cabal-install; fi
|
|
- if [ "$TRAVIS_OS_NAME" == "osx" ] && [[ $BOND_LANG == py* ]]; then brew unlink boost; fi
|
|
- if [ "$TRAVIS_OS_NAME" == "osx" ] && [[ $BOND_LANG == py* ]]; then brew install boost boost-python; fi
|
|
# nunit installation
|
|
- if [ "$BOND_LANG" == "cs" ]; then travis_retry nuget install NUnit.Runners -version 2.6.4; fi
|
|
- export PATH=/opt/cabal/1.22/bin:/opt/ghc/${BOND_GHC_VERSION#?}/bin:$PATH
|
|
- cabal update
|
|
- cabal install happy
|
|
|
|
before_script:
|
|
# restore nuget packages for solution
|
|
- if [ "$BOND_LANG" == "cs" ]; then travis_retry nuget restore cs/cs.sln; fi
|
|
|
|
script:
|
|
- mkdir build && cd build
|
|
- cmake ..
|
|
- if [ "$BOND_LANG" == "cs" ]; then make --jobs 2 DESTDIR=$HOME install; fi
|
|
- if [ "$BOND_LANG" == "cs" ]; then export BOND_COMPILER_PATH=$HOME/usr/local/bin; fi
|
|
- if [[ $BOND_LANG == cpp* ]]; then make --jobs 2 check; fi
|
|
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then export BOND_PYTHON_TARGETS="python_unit_test python_extension" BOND_PYTHON_TESTS=python_unit_test; fi
|
|
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then export BOND_PYTHON_TARGETS="python_compatibility_test python_unit_test python_extension compatibility_test" BOND_PYTHON_TESTS=".*python.*"; fi
|
|
- if [[ $BOND_LANG == py* ]]; then make $BOND_PYTHON_TARGETS; fi
|
|
- if [[ $BOND_LANG == py* ]]; then ctest --tests-regex $BOND_PYTHON_TESTS --output-on-failure; fi
|
|
- if [ "$BOND_GHC_VERSION" != "" ]; then make gbc-tests; fi
|
|
- cd ..
|
|
- if [ "$BOND_LANG" == "cs" ]; then xbuild /p:Configuration=Debug cs/cs.sln; fi
|
|
- if [ "$BOND_LANG" == "cs" ]; then xbuild /p:Configuration=Fields cs/cs.sln; fi
|
|
- if [ "$BOND_LANG" == "cs" ]; then mono NUnit.Runners.2.6.4/tools/nunit-console.exe -framework=mono-4.5 -labels cs/test/core/bin/debug/net45/Properties/Bond.UnitTest.dll cs/test/core/bin/debug/net45/Fields/Bond.UnitTest.dll cs/test/internal/bin/debug/net45/Bond.InternalTest.dll; fi
|
|
- if [ "$BOND_GHC_VERSION" != "" ]; then cd compiler; fi
|
|
- if [ "$BOND_GHC_VERSION" != "" ]; then ../build/compiler/build/gbc-tests/gbc-tests; fi
|
|
|
|
before_cache:
|
|
- if [ "$BOND_GHC_VERSION" != "" ]; then rm -rf compiler/.cabal-sandbox; fi
|