forked from mono/CppSharp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
43 lines (38 loc) · 2.2 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew install wget xz; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then wget -O mono.pkg http://download.mono-project.com/archive/4.2.1/macos-10-x86/MonoFramework-MDK-4.2.1.102.macos10.xamarin.x86.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/ &&
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"