You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@avro.apache.org by bl...@apache.org on 2019/07/25 20:55:44 UTC
[avro] branch master updated: AVRO-2467: Run C# tests on Windows in
Travis (#579)
This is an automated email from the ASF dual-hosted git repository.
blachniet pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/avro.git
The following commit(s) were added to refs/heads/master by this push:
new 10d6184 AVRO-2467: Run C# tests on Windows in Travis (#579)
10d6184 is described below
commit 10d61843003a16b738f65dd9d4580ede284f09d8
Author: Brian Lachniet <bl...@gmail.com>
AuthorDate: Thu Jul 25 16:55:38 2019 -0400
AVRO-2467: Run C# tests on Windows in Travis (#579)
* AVRO-2467: Run C# tests on Windows in Travis (#579)
* AVRO-2467: Apply review suggestions to .travis scripts (#579)
- Ensure that the scripts for each Travis step exist & are executable.
- Swap some single quotes for double quotes in the shell scripts.
* AVRO-2467: Remove extra quotes in Travis script (#579)
---
.travis.yml | 28 +++++++++++++++-------------
.travis/before_install.sh | 35 +++++++++++++++++++++++++++++++++++
.travis/script.sh | 32 ++++++++++++++++++++++++++++++++
3 files changed, 82 insertions(+), 13 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index 6f9c45f..9df38fb 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -22,19 +22,21 @@ sudo: required
services:
- docker
-language: generic
+matrix:
+ include:
+ - language: generic
+ env:
+ JAVA=8
-env:
- - JAVA=8
- - JAVA=11
+ - language: generic
+ env:
+ JAVA=11
-before_install:
- - sudo apt-get -q update
- - sudo apt-get -q install --no-install-recommends -y curl git gnupg-agent locales pinentry-curses pkg-config rsync software-properties-common
- - sudo apt-get -q clean
- - sudo rm -rf /var/lib/apt/lists/*
- - curl -L https://www-us.apache.org/dist/yetus/0.8.0/yetus-0.8.0-bin.tar.gz | tar xvz -C /tmp/
+ - os: windows
+ language: bash
-script:
- - sed -i.bak 's/openjdk:8/openjdk:'${JAVA}'/' share/docker/Dockerfile
- - /tmp/yetus-0.8.0/bin/test-patch --plugins=buildtest --java-home=/usr/local/openjdk-${JAVA} --user-plugins=share/precommit/ --run-tests --empty-patch --docker --dockerfile=share/docker/Dockerfile --dirty-workspace --verbose=true
+before_install: "if [ -x ./.travis/before_install.sh ] ; then ./.travis/before_install.sh ; fi"
+install: "if [ -x ./.travis/install.sh ] ; then ./.travis/install.sh ; fi"
+before_script: "if [ -x ./.travis/before_script.sh ] ; then ./.travis/before_script.sh ; fi"
+script: "if [ -x ./.travis/script.sh ] ; then ./.travis/script.sh ; fi"
+after_script: "if [ -x ./.travis/after_script.sh ] ; then ./.travis/after_script.sh ; fi"
diff --git a/.travis/before_install.sh b/.travis/before_install.sh
new file mode 100755
index 0000000..b091cc5
--- /dev/null
+++ b/.travis/before_install.sh
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+set -e
+
+case "$TRAVIS_OS_NAME" in
+"linux")
+ sudo apt-get -q update
+ sudo apt-get -q install --no-install-recommends -y curl git gnupg-agent locales pinentry-curses pkg-config rsync software-properties-common
+ sudo apt-get -q clean
+ sudo rm -rf /var/lib/apt/lists/*
+ curl -L https://www-us.apache.org/dist/yetus/0.8.0/yetus-0.8.0-bin.tar.gz | tar xvz -C /tmp/
+ ;;
+"windows")
+ choco install dotnetcore-sdk --version 2.2.300
+ ;;
+*)
+ echo "Invalid PLATFORM"
+ exit 1
+ ;;
+esac
diff --git a/.travis/script.sh b/.travis/script.sh
new file mode 100755
index 0000000..adacc3d
--- /dev/null
+++ b/.travis/script.sh
@@ -0,0 +1,32 @@
+#!/bin/bash
+
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+set -e
+
+case "$TRAVIS_OS_NAME" in
+"linux")
+ sed -i.bak "s/openjdk:8/openjdk:${JAVA}/" share/docker/Dockerfile
+ /tmp/yetus-0.8.0/bin/test-patch --plugins=buildtest --java-home=/usr/local/openjdk-"${JAVA}" --user-plugins=share/precommit/ --run-tests --empty-patch --docker --dockerfile=share/docker/Dockerfile --dirty-workspace --verbose=true
+ ;;
+"windows")
+ ./lang/csharp/build.sh test
+ ;;
+*)
+ echo "Invalid PLATFORM"
+ exit 1
+ ;;
+esac