avro-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From blachn...@apache.org
Subject [avro] branch branch-1.9 updated: AVRO-2467: Run C# tests on Windows in Travis (#579)
Date Thu, 25 Jul 2019 20:59:33 GMT
This is an automated email from the ASF dual-hosted git repository.

blachniet pushed a commit to branch branch-1.9
in repository https://gitbox.apache.org/repos/asf/avro.git


The following commit(s) were added to refs/heads/branch-1.9 by this push:
     new 1ff50ee  AVRO-2467: Run C# tests on Windows in Travis (#579)
1ff50ee is described below

commit 1ff50ee1806777c7c6a95f6d07873abcbda75f76
Author: Brian Lachniet <blachniet@gmail.com>
AuthorDate: Thu Jul 25 16:58:15 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)
    
    (cherry picked from commit 10d61843003a16b738f65dd9d4580ede284f09d8)
---
 .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


Mime
View raw message