forked from microsoft/bond
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
92 lines (88 loc) · 4.6 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
dist: trusty
# trusty requires virtualization, which is set by 'sudo: required'
sudo: required
language: csharp
os:
- linux
cache:
directories:
- compiler/.cabal-sandbox
- cs/packages
- /home/travis/.ccache
env:
- FLAVOR="cs"
- FLAVOR="cpp-core" BOOST="1.64.0"
- FLAVOR="cpp-core" BOOST="1.63.0"
- FLAVOR="cpp-core" BOOST="1.62.0"
- FLAVOR="cpp-core" BOOST="1.61.0"
- FLAVOR="cpp-core" BOOST="1.60.0"
- FLAVOR="cpp-core" BOOST="1.59.0"
- FLAVOR="cpp-core" BOOST="1.58.0"
- FLAVOR="cpp-comm" BOOST="1.63.0"
- FLAVOR="cpp-grpc" BOOST="1.64.0"
- FLAVOR="cpp-grpc" BOOST="1.63.0"
- FLAVOR="hs" GHC_VERSION="7.8.4"
- FLAVOR="hs" GHC_VERSION="7.6.3"
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- hvr-ghc
packages:
- g++-4.8
- cabal-install-1.22
- ghc-7.8.4
- ghc-7.6.3
- ghc
- ccache
- wget
before_install:
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then echo "Hardware:"; grep model\ name /proc/cpuinfo | uniq -c; free -m; 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 -xf 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
# set defaults
- if [ "$CXX" == "" ]; then echo "Setting default $CXX"; export CXX="clang++"; fi
- if [ "$CC" == "" ]; then echo "Setting default $CC"; export CC="clang"; fi
- if [ "$BOOST" == "" ]; then echo "Setting default $BOOST"; export BOOST=1.63.0; fi
# pull down our boost binaries
- export BOOST_ARCHIVE=boost-$BOOST.tar.xz
- wget https://bondboostbinaries.blob.core.windows.net/bondboostbinaries/$BOOST_ARCHIVE -O /tmp/$BOOST_ARCHIVE
- pushd /; sudo tar -xf /tmp/$BOOST_ARCHIVE; popd
- export BOOST_ROOT=/opt/boost_`echo $BOOST | tr . _`
# ccache splits up your C{,XX}FLAGS and makes separate preprocessor and
# compiler calls. It includes a few flags that aren't used by one half of
# the process or the other. -Qunused-arguments prevents clang from failing
# the build because of this.
- export CXX="ccache $CXX -Qunused-arguments --system-header-prefix=boost/"
- export CC="ccache $CC -Qunused-arguments --system-header-prefix=boost/"
- echo "CXX=$CXX"
- echo "CC=$CC"
# nunit installation
- if [ "$FLAVOR" == "cs" ]; then travis_retry nuget install NUnit.Runners -version 2.6.4; fi
- export PATH=/opt/cabal/1.22/bin:/opt/ghc/${GHC_VERSION}/bin:$PATH
- cabal update
- cabal install happy Cabal
before_script:
# restore nuget packages for solution
- if [ "$FLAVOR" == "cs" ]; then travis_retry nuget restore cs/cs.sln; fi
script:
- mkdir build && cd build
- if [ "$FLAVOR" == "cs" ]; then cmake -DBOND_SKIP_GBC_TESTS=TRUE -DBOND_SKIP_CORE_TESTS=TRUE -DBOND_ENABLE_COMM=FALSE -DBOND_ENABLE_GRPC=FALSE ..; fi
- if [ "$FLAVOR" == "cs" ]; then make --jobs 2 DESTDIR=$HOME install; fi
- if [ "$FLAVOR" == "cs" ]; then cd ..; fi
- if [ "$FLAVOR" == "cs" ]; then export BOND_COMPILER_PATH=$HOME/usr/local/bin; fi
- if [ "$FLAVOR" == "cs" ]; then xbuild /p:Configuration=Debug cs/cs.sln; fi
- if [ "$FLAVOR" == "cs" ]; then xbuild /p:Configuration=Fields cs/cs.sln; fi
- if [ "$FLAVOR" == "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 [ "$FLAVOR" == "cpp-core" ]; then cmake -DBOND_SKIP_GBC_TESTS=TRUE -DBOND_ENABLE_COMM=FALSE -DBOND_ENABLE_GRPC=FALSE ..; fi
- if [ "$FLAVOR" == "cpp-core" ]; then make --jobs 2 check; fi
- if [ "$FLAVOR" == "cpp-comm" ]; then cmake -DBOND_SKIP_GBC_TESTS=TRUE -DBOND_SKIP_CORE_TESTS=TRUE -DBOND_ENABLE_GRPC=FALSE ..; fi
- if [ "$FLAVOR" == "cpp-comm" ]; then make --jobs 2 check; fi
- if [ "$FLAVOR" == "cpp-grpc" ]; then cmake -DBOND_SKIP_GBC_TESTS=TRUE -DBOND_SKIP_CORE_TESTS=TRUE -DBOND_ENABLE_COMM=FALSE -DgRPC_ZLIB_PROVIDER=package ..; fi
- if [ "$FLAVOR" == "cpp-grpc" ]; then make --jobs 2 check; fi
- if [ "$FLAVOR" == "hs" ]; then cmake -DBOND_SKIP_CORE_TESTS=TRUE -DBOND_ENABLE_COMM=FALSE -DBOND_ENABLE_GRPC=FALSE ..; fi
- if [ "$FLAVOR" == "hs" ]; then make gbc-tests; fi
- if [ "$FLAVOR" == "hs" ]; then cd ../compiler; fi
- if [ "$FLAVOR" == "hs" ]; then ../build/compiler/build/gbc-tests/gbc-tests; fi