language: cpp os: - linux - osx dist: trusty addons: apt: sources: - ubuntu-toolchain-r-test packages: - gcc-4.8 - g++-4.8 install: - if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF; fi - if [ "$TRAVIS_OS_NAME" = "linux" ]; then echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list; fi - if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get update -qq; fi - if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get install -y mono-devel p7zip-full; fi - if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew install wget p7zip; fi - if [ "$TRAVIS_OS_NAME" = "osx" ]; then wget -O mono.pkg http://download.mono-project.com/archive/nightly/macos-10-x86/mono-MDK.pkg; fi - if [ "$TRAVIS_OS_NAME" = "osx" ]; then sudo installer -pkg "mono.pkg" -target /; fi - wget https://nuget.org/nuget.exe - mono nuget.exe install NUnit -Version 2.6.4 -OutputDirectory deps - mono nuget.exe install NUnit.Runners -Version 2.6.4 -OutputDirectory deps - cp deps/NUnit.2.6.4/lib/nunit.framework.* deps/NUnit/ - if [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$CXX" = "g++" ]; then export CXX="g++-4.8" CC="gcc-4.8"; fi - if [ "$TRAVIS_OS_NAME" = "linux" ]; then PREMAKE=build/premake5-linux-64; else PREMAKE=build/premake5-osx; fi - $PREMAKE --file=build/scripts/LLVM.lua download_llvm script: - if [ "$TRAVIS_OS_NAME" = "linux" ]; then PREMAKE=build/premake5-linux-64; else PREMAKE=build/premake5-osx; fi - if [ "$TRAVIS_OS_NAME" = "linux" ]; then BUILD_CONF=release_x64; else BUILD_CONF=release_x32; fi - $PREMAKE --file=build/premake4.lua gmake - config=$BUILD_CONF make -C build/gmake/ # HACK - work around the native libNamespacesDerived being unable to find its dependency - BUILD_DIR=`ls build/gmake/lib` - mkdir -p "$PWD"/build/gmake/lib/lib/"$BUILD_DIR" - cp "$PWD"/build/gmake/lib/"$BUILD_DIR"/libNamespacesBase.* "$PWD"/build/gmake/lib/lib/"$BUILD_DIR" - TEST_RESULT=0 - for test in build/gmake/lib/Release_*/*.Tests.*.dll; do MONO_PATH=deps/NUnit.Runners.2.6.4/tools mono deps/NUnit.Runners.2.6.4/tools/nunit-console.exe -nologo $test || TEST_RESULT=$?; done - exit "$TEST_RESULT"