Tests: updated ValueTest for decimal values
[sdk/tools/netcoredbg.git] / .travis.yml
1 matrix:
2   include:
3     - os: linux
4       dist: trusty
5       sudo: false
6       addons:
7         apt:
8           sources:
9           - ubuntu-toolchain-r-test
10           - sourceline: 'deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-3.9 main'
11             key_url: 'http://apt.llvm.org/llvm-snapshot.gpg.key'
12           packages:
13           - git
14           - ninja-build
15           - cmake
16           - llvm-3.9
17           - clang-3.9
18           - lldb-3.9
19           - liblldb-3.9-dev
20           - libunwind8
21           - libunwind8-dev
22           - gettext
23           - libicu-dev
24           - liblttng-ust-dev
25           - libcurl4-openssl-dev
26           - libssl-dev
27           - uuid-dev
28           - libnuma-dev
29           - libkrb5-dev
30           - g++-5
31     - os: linux
32       dist: trusty
33       sudo: required
34       env: TIZEN=1
35       addons:
36         apt:
37           sources:
38           - sourceline: 'deb http://download.tizen.org/tools/latest-release/Ubuntu_14.04/ /'
39           packages:
40           - gbs
41           - rpm2cpio
42     - os: osx
43       osx_image: xcode9.4
44
45 env:
46   global:
47   - CLI_VERSION=2.1
48   - RELEASE_BRANCH=master
49   - RELEASE_REPO=Samsung/netcoredbg
50   - secure: "goktFL3DGZOhxD11w6BNUFmA02pMJLbQ8YbbrbaaeV831iFScbJf3TUFUJqrgn4ecWCz7d9bPD38XIMrRAr2m1VPW9N0aH/Zd/goxgVwO9Eu3JH3VclGMzBwnu1em1N7XNbhcAyFd7AqgBbAk0D5uBAfbMQqsJRDtXw+buqzrfwPUDEMlMr4ipt2RBSNOGvgFAixT1XCTNJi+gxoTuKAXB9UZHE4jPzC5c/xQVJQBCJI9jm6GlJ6Yr7aWpAXjGV1d0v1ZFpWNpD7FslVzFe3iX4oNqAjODHrgBVg2IO5M1A9BnfnUDh3xPahZNoE1yiAYGenXrjOs6x15KlzNEaoJ3/bOeNVytdddGRqbp2iw7nDMYp0uIjorD0WmFU9keKUC6K3g1m1i7GVrimTZR+kvYVifwMmotRuos6Kh7VGdAL0drsOgjdwZAOVNvEBcCYKcpawMNinccRQ77iLRC9iu8yfQiz9aRnHWrFbj/8v0V+hXDBDYk37of3v9e5+56iHOftpJZgs/4Eaf6SZpfCo8TqKiRKoqBpE9p2udjs+INcBY2Jdqd4zJzO3JzHd0GWIyR/9MxI0fE/4J6p/wlybdQat+yfqvdMXJg72Sd2FNcZZjgjtTYKlAK3up8KBxAew9i1YTwnYJsXR/+dKq61OKYVXM7ixAZuTmaJjEbAEDcI="
51
52 branches:
53   except:
54     - latest
55
56 language: cpp
57 compiler: clang
58
59 cache:
60   directories:
61     - $HOME/.nuget
62     - coreclr/bin/Product/Linux.x64.Release/inc
63     - coreclr/bin/Product/Linux.x64.Release/lib
64     - coreclr/bin/Product/OSX.x64.Release/inc
65     - coreclr/bin/Product/OSX.x64.Release/lib
66     - coreclr/src/inc
67     - coreclr/src/pal/inc
68     - coreclr/src/pal/inc/rt
69     - coreclr/src/pal/prebuilt/inc
70     - coreclr/src/debug/inc
71     - coreclr/src/debug/shim
72     - coreclr/src/dlls/dbgshim
73     - coreclr/src/coreclr/hosts/inc
74     - coreclr/src/ToolBox/SOS/Strike
75     - $HOME/GBS-ROOT/local/cache
76
77 before_install:
78   - |
79       if [ ${TRAVIS_OS_NAME} = 'osx' ]; then
80         brew update
81         brew install git cmake ninja icu4c pkgconfig
82         brew link --force icu4c
83         mkdir -p /usr/local/lib/pkgconfig
84         ln -s /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/
85         ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/
86         ln -s /usr/local/opt/openssl/lib/pkgconfig/libcrypto.pc /usr/local/lib/pkgconfig/
87         ln -s /usr/local/opt/openssl/lib/pkgconfig/libssl.pc /usr/local/lib/pkgconfig/
88         ln -s /usr/local/opt/openssl/lib/pkgconfig/openssl.pc /usr/local/lib/pkgconfig/
89       fi
90
91 install:
92   - |
93       if [ -z "$TIZEN" ]; then
94         # Download .NET CLI
95         export DOTNET_INSTALL_DIR="$PWD/.dotnetcli"
96         curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --channel "$CLI_VERSION" --install-dir "$DOTNET_INSTALL_DIR"
97         export PATH="$DOTNET_INSTALL_DIR:$PATH"
98         # Set CoreCLR binaries output directory name and (for linux) specific compiler versions
99         if [ ${TRAVIS_OS_NAME} = 'linux' ]; then
100           export CORECLR_PRODUCT=Linux.x64.Release CC=clang-3.9 CXX=clang++-3.9
101         elif [ ${TRAVIS_OS_NAME} = 'osx' ]; then
102           export CORECLR_PRODUCT=OSX.x64.Release
103         fi
104         # Make CoreCLR sources and binaries available for build script
105         if [ ! -f "coreclr/src/inc/.cache_valid" ]; then
106           # Invalidate cache and build CoreCLR, put dbgshim library into cached directory
107           rm -rf coreclr
108           git clone --depth 1 https://github.com/dotnet/coreclr -b "release/$CLI_VERSION" && cd coreclr
109           ./build.sh ninja skiptests skipnuget release && cp bin/Product/$CORECLR_PRODUCT/libdbgshim.* bin/Product/$CORECLR_PRODUCT/lib && touch src/inc/.cache_valid
110           cd ..
111         else
112           # Restore dbgshim library location from cached directory
113           cp coreclr/bin/Product/$CORECLR_PRODUCT/lib/libdbgshim.* coreclr/bin/Product/$CORECLR_PRODUCT
114         fi
115       fi
116
117 script:
118   - |
119       if [ -z "$TIZEN" ]; then
120         # Build and run tests
121         mkdir build && cd build
122         cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release -DCLR_DIR=$PWD/../coreclr -DCMAKE_INSTALL_PREFIX=$PWD/../bin
123         ninja && ninja install
124         cd ..
125         dotnet build tests && dotnet test tests/runner
126       else
127         # Verify that Tizen build does not break
128         cat <<EOF > $HOME/.gbs.conf
129       [general]
130       profile = profile.target-TM1.unified
131       buildroot = ~/GBS-ROOT/
132       [profile.target-TM1.unified]
133       repos = repo.target.unified, repo.target.base
134       [repo.target.unified]
135       url=http://download.tizen.org/releases/milestone/tizen/unified/tizen-unified_20180528.1/repos/standard/packages/
136       [repo.target.base]
137       url=http://download.tizen.org/releases/milestone/tizen/base/tizen-base_20180518.1/repos/standard/packages/
138       EOF
139         gbs build -A armv7l
140       fi
141
142 before_deploy:
143   - |
144       if [ "$TRAVIS_BRANCH" = "$RELEASE_BRANCH" -a "$TRAVIS_PULL_REQUEST" = "false" ]; then
145         # Tag last commit as 'latest'.
146         git config --local user.name "Travis"
147         git config --local user.email "travis@travis-ci.org"
148
149         git remote add release "https://${GITHUB_API_KEY}@github.com/${RELEASE_REPO}.git"
150
151         git push -d release latest
152         git tag -d latest
153         git tag -a "latest" -m "[Autogenerated] This is the latest version pushed to the ${TRAVIS_BRANCH} branch."
154         git push release --tags
155         # Prepare files for deployment
156         if [ -z "$TIZEN" ]; then
157           mv bin netcoredbg
158           tar cfz netcoredbg-${TRAVIS_OS_NAME}-${TRAVIS_BRANCH}.tar.gz ./netcoredbg/*
159         else
160           # Generate tar.gz from rpm for Tizen SDK
161           RPMFILE=$(find ~/GBS-ROOT/local/repos/target_TM1.unified/armv7l/RPMS -type f -name 'netcoredbg-[0-9]*.rpm')
162           if [ ! -f "$RPMFILE" ]; then travis_terminate; fi
163           FILENAME=$(basename -- "$RPMFILE")
164           PKGNAME=$(echo "$FILENAME" | cut -d'-' -f1)
165           PKGVERSION=$(echo "$FILENAME" | cut -d'-' -f2)
166           PKGARCH=$(echo "$FILENAME"| cut -d'-' -f3 | cut -d'.' -f2)
167           TARGZNAME=$PKGNAME-$PKGVERSION-$PKGARCH.tar.gz
168           mkdir unpacked && cd unpacked
169           rpm2cpio "$RPMFILE" | cpio -idmv
170           touch ./home/owner/share/tmp/sdk_tools/$PKGNAME/version-$PKGVERSION
171           tar cfz ../$TARGZNAME --owner=root --group=root -C ./home/owner/share/tmp/sdk_tools .
172           cd ..
173           cp "$RPMFILE" ./
174         fi
175       fi
176 deploy:
177   provider: releases
178   api_key: $GITHUB_API_KEY
179   file:
180     - "*.tar.gz"
181     - "*.rpm"
182   file_glob: true
183   skip_cleanup: true
184   overwrite: true
185   on:
186     repo: $RELEASE_REPO
187     branch: $RELEASE_BRANCH