From 09d45f5d6e10d8959393045f2543842afe3f4331 Mon Sep 17 00:00:00 2001 From: Dong Xie Date: Wed, 25 Jan 2017 00:24:36 +0000 Subject: [PATCH] [csharp] update travis for dotnet --- .travis.yml | 5 +++++ .travis/before-install-linux-dotnet.sh | 10 ++++++++++ .travis/before-install-mvn3.3.9-trusty.sh | 14 ++++++++++++++ .travis/run-tests-dotnet.sh | 4 ++++ 4 files changed, 33 insertions(+) create mode 100755 .travis/before-install-linux-dotnet.sh create mode 100755 .travis/before-install-mvn3.3.9-trusty.sh create mode 100755 .travis/run-tests-dotnet.sh diff --git a/.travis.yml b/.travis.yml index 0807adec7..83f1c0eb6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,4 @@ +dist: trusty sudo: true language: java @@ -45,6 +46,9 @@ matrix: - os: linux jdk: oraclejdk7 env: TARGET=csharp + - os: linux + jdk: oraclejdk7 + env: TARGET=dotnet - os: linux jdk: oraclejdk7 env: TARGET=python2 @@ -59,6 +63,7 @@ matrix: env: TARGET=go before_install: + - ./.travis/before-install-mvn3.3.9-trusty.sh - ./.travis/before-install-$TRAVIS_OS_NAME-$TARGET.sh script: diff --git a/.travis/before-install-linux-dotnet.sh b/.travis/before-install-linux-dotnet.sh new file mode 100755 index 000000000..dc9651fc6 --- /dev/null +++ b/.travis/before-install-linux-dotnet.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +set -euo pipefail + +sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ trusty main" > /etc/apt/sources.list.d/dotnetdev.list' +sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 417A0893 +sudo apt-get update + +sudo apt-get install dotnet-dev-1.0.0-preview2.1-003177 + diff --git a/.travis/before-install-mvn3.3.9-trusty.sh b/.travis/before-install-mvn3.3.9-trusty.sh new file mode 100755 index 000000000..d1e03c255 --- /dev/null +++ b/.travis/before-install-mvn3.3.9-trusty.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +set -ex + +wget http://apache.mirrors.lucidnetworks.net/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz && \ + wget https://www.apache.org/dist/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz.md5 && \ + echo "$(cat apache-maven-3.3.9-bin.tar.gz.md5) apache-maven-3.3.9-bin.tar.gz" > apache-maven-3.3.9-bin.tar.gz.md5 && \ + md5sum -c *.md5 + +sudo rm -rf /usr/local/maven/ && sudo mkdir -p /usr/local/maven && \ + sudo tar xzvf apache-maven-3.3.9-bin.tar.gz -C /usr/local/maven --strip-components=1 + +mvn -v + diff --git a/.travis/run-tests-dotnet.sh b/.travis/run-tests-dotnet.sh new file mode 100755 index 000000000..0c3042bf9 --- /dev/null +++ b/.travis/run-tests-dotnet.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +mvn -q -Dparallel=methods -DthreadCount=4 -Dtest=csharp.* -DargLine="-Dantlr-csharp-netstandard=true" test +