Pārlūkot izejas kodu

Add MacOS and Linux tests to Kokoro

Matt Kwong 8 gadi atpakaļ
vecāks
revīzija
6156af10e8
39 mainītis faili ar 337 papildinājumiem un 0 dzēšanām
  1. 6 0
      kokoro/README.md
  2. 11 0
      kokoro/linux/cpp_distcheck/build.sh
  3. 5 0
      kokoro/linux/cpp_distcheck/presubmit.cfg
  4. 11 0
      kokoro/linux/csharp/build.sh
  5. 5 0
      kokoro/linux/csharp/presubmit.cfg
  6. 11 0
      kokoro/linux/java_compatibility/build.sh
  7. 5 0
      kokoro/linux/java_compatibility/presubmit.cfg
  8. 9 0
      kokoro/linux/prepare_build_linux_rc
  9. 11 0
      kokoro/linux/python_compatibility/build.sh
  10. 5 0
      kokoro/linux/python_compatibility/presubmit.cfg
  11. 11 0
      kokoro/macos/cpp/build.sh
  12. 5 0
      kokoro/macos/cpp/presubmit.cfg
  13. 11 0
      kokoro/macos/cpp_distcheck/build.sh
  14. 5 0
      kokoro/macos/cpp_distcheck/presubmit.cfg
  15. 11 0
      kokoro/macos/javascript/build.sh
  16. 5 0
      kokoro/macos/javascript/presubmit.cfg
  17. 11 0
      kokoro/macos/jruby/build.sh
  18. 5 0
      kokoro/macos/jruby/presubmit.cfg
  19. 11 0
      kokoro/macos/objectivec_cocoapods_integration/build.sh
  20. 5 0
      kokoro/macos/objectivec_cocoapods_integration/presubmit.cfg
  21. 11 0
      kokoro/macos/objectivec_ios_debug/build.sh
  22. 5 0
      kokoro/macos/objectivec_ios_debug/presubmit.cfg
  23. 11 0
      kokoro/macos/objectivec_ios_release/build.sh
  24. 5 0
      kokoro/macos/objectivec_ios_release/presubmit.cfg
  25. 11 0
      kokoro/macos/objectivec_osx/build.sh
  26. 5 0
      kokoro/macos/objectivec_osx/presubmit.cfg
  27. 11 0
      kokoro/macos/php5.6_mac/build.sh
  28. 5 0
      kokoro/macos/php5.6_mac/presubmit.cfg
  29. 11 0
      kokoro/macos/php7.0_mac/build.sh
  30. 5 0
      kokoro/macos/php7.0_mac/presubmit.cfg
  31. 33 0
      kokoro/macos/prepare_build_macos_rc
  32. 11 0
      kokoro/macos/python/build.sh
  33. 5 0
      kokoro/macos/python/presubmit.cfg
  34. 12 0
      kokoro/macos/python_cpp/build.sh
  35. 5 0
      kokoro/macos/python_cpp/presubmit.cfg
  36. 11 0
      kokoro/macos/ruby21/build.sh
  37. 5 0
      kokoro/macos/ruby21/presubmit.cfg
  38. 11 0
      kokoro/macos/ruby22/build.sh
  39. 5 0
      kokoro/macos/ruby22/presubmit.cfg

+ 6 - 0
kokoro/README.md

@@ -0,0 +1,6 @@
+
+Kokoro Infrastructure
+----------------------
+
+The files in this directory serve as plumbing for running Protobuf
+tests under Kokoro, our internal CI.

+ 11 - 0
kokoro/linux/cpp_distcheck/build.sh

@@ -0,0 +1,11 @@
+#!/bin/bash
+#
+# Build file to set up and run tests
+
+# Change to repo root
+cd $(dirname $0)/../../..
+
+# Prepare worker environment to run tests
+source kokoro/linux/prepare_build_linux_rc
+
+./tests.sh cpp_distcheck

+ 5 - 0
kokoro/linux/cpp_distcheck/presubmit.cfg

@@ -0,0 +1,5 @@
+# Config file for running tests in Kokoro
+
+# Location of the build script in repository
+build_file: "protobuf/kokoro/linux/cpp_distcheck/build.sh"
+timeout_mins: 1440

+ 11 - 0
kokoro/linux/csharp/build.sh

@@ -0,0 +1,11 @@
+#!/bin/bash
+#
+# Build file to set up and run tests
+
+# Change to repo root
+cd $(dirname $0)/../../..
+
+# Prepare worker environment to run tests
+source kokoro/linux/prepare_build_linux_rc
+
+./tests.sh csharp

+ 5 - 0
kokoro/linux/csharp/presubmit.cfg

@@ -0,0 +1,5 @@
+# Config file for running tests in Kokoro
+
+# Location of the build script in repository
+build_file: "protobuf/kokoro/linux/csharp/build.sh"
+timeout_mins: 1440

+ 11 - 0
kokoro/linux/java_compatibility/build.sh

@@ -0,0 +1,11 @@
+#!/bin/bash
+#
+# Build file to set up and run tests
+
+# Change to repo root
+cd $(dirname $0)/../../..
+
+# Prepare worker environment to run tests
+source kokoro/linux/prepare_build_linux_rc
+
+./tests.sh java_compatibility

+ 5 - 0
kokoro/linux/java_compatibility/presubmit.cfg

@@ -0,0 +1,5 @@
+# Config file for running tests in Kokoro
+
+# Location of the build script in repository
+build_file: "protobuf/kokoro/linux/java_compatibility/build.sh"
+timeout_mins: 1440

+ 9 - 0
kokoro/linux/prepare_build_linux_rc

@@ -0,0 +1,9 @@
+#!/bin/bash
+
+# Source this rc script to prepare the environment for Linux builds
+
+# Set up dotnet
+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 -y dotnet-dev-1.0.4

+ 11 - 0
kokoro/linux/python_compatibility/build.sh

@@ -0,0 +1,11 @@
+#!/bin/bash
+#
+# Build file to set up and run tests
+
+# Change to repo root
+cd $(dirname $0)/../../..
+
+# Prepare worker environment to run tests
+source kokoro/linux/prepare_build_linux_rc
+
+./tests.sh python_compatibility

+ 5 - 0
kokoro/linux/python_compatibility/presubmit.cfg

@@ -0,0 +1,5 @@
+# Config file for running tests in Kokoro
+
+# Location of the build script in repository
+build_file: "protobuf/kokoro/linux/python_compatibility/build.sh"
+timeout_mins: 1440

+ 11 - 0
kokoro/macos/cpp/build.sh

@@ -0,0 +1,11 @@
+#!/bin/bash
+#
+# Build file to set up and run tests
+
+# Change to repo root
+cd $(dirname $0)/../../..
+
+# Prepare worker environment to run tests
+source kokoro/macos/prepare_build_macos_rc
+
+./tests.sh cpp

+ 5 - 0
kokoro/macos/cpp/presubmit.cfg

@@ -0,0 +1,5 @@
+# Config file for running tests in Kokoro
+
+# Location of the build script in repository
+build_file: "protobuf/kokoro/macos/cpp/build.sh"
+timeout_mins: 1440

+ 11 - 0
kokoro/macos/cpp_distcheck/build.sh

@@ -0,0 +1,11 @@
+#!/bin/bash
+#
+# Build file to set up and run tests
+
+# Change to repo root
+cd $(dirname $0)/../../..
+
+# Prepare worker environment to run tests
+source kokoro/macos/prepare_build_macos_rc
+
+./tests.sh cpp_distcheck

+ 5 - 0
kokoro/macos/cpp_distcheck/presubmit.cfg

@@ -0,0 +1,5 @@
+# Config file for running tests in Kokoro
+
+# Location of the build script in repository
+build_file: "protobuf/kokoro/macos/cpp_distcheck/build.sh"
+timeout_mins: 1440

+ 11 - 0
kokoro/macos/javascript/build.sh

@@ -0,0 +1,11 @@
+#!/bin/bash
+#
+# Build file to set up and run tests
+
+# Change to repo root
+cd $(dirname $0)/../../..
+
+# Prepare worker environment to run tests
+source kokoro/macos/prepare_build_macos_rc
+
+./tests.sh javascript

+ 5 - 0
kokoro/macos/javascript/presubmit.cfg

@@ -0,0 +1,5 @@
+# Config file for running tests in Kokoro
+
+# Location of the build script in repository
+build_file: "protobuf/kokoro/macos/javascript/build.sh"
+timeout_mins: 1440

+ 11 - 0
kokoro/macos/jruby/build.sh

@@ -0,0 +1,11 @@
+#!/bin/bash
+#
+# Build file to set up and run tests
+
+# Change to repo root
+cd $(dirname $0)/../../..
+
+# Prepare worker environment to run tests
+source kokoro/macos/prepare_build_macos_rc
+
+./tests.sh jruby

+ 5 - 0
kokoro/macos/jruby/presubmit.cfg

@@ -0,0 +1,5 @@
+# Config file for running tests in Kokoro
+
+# Location of the build script in repository
+build_file: "protobuf/kokoro/macos/jruby/build.sh"
+timeout_mins: 1440

+ 11 - 0
kokoro/macos/objectivec_cocoapods_integration/build.sh

@@ -0,0 +1,11 @@
+#!/bin/bash
+#
+# Build file to set up and run tests
+
+# Change to repo root
+cd $(dirname $0)/../../..
+
+# Prepare worker environment to run tests
+source kokoro/macos/prepare_build_macos_rc
+
+./tests.sh objectivec_cocoapods_integration

+ 5 - 0
kokoro/macos/objectivec_cocoapods_integration/presubmit.cfg

@@ -0,0 +1,5 @@
+# Config file for running tests in Kokoro
+
+# Location of the build script in repository
+build_file: "protobuf/kokoro/macos/objectivec_cocoapods_integration/build.sh"
+timeout_mins: 1440

+ 11 - 0
kokoro/macos/objectivec_ios_debug/build.sh

@@ -0,0 +1,11 @@
+#!/bin/bash
+#
+# Build file to set up and run tests
+
+# Change to repo root
+cd $(dirname $0)/../../..
+
+# Prepare worker environment to run tests
+source kokoro/macos/prepare_build_macos_rc
+
+./tests.sh objectivec_ios_debug

+ 5 - 0
kokoro/macos/objectivec_ios_debug/presubmit.cfg

@@ -0,0 +1,5 @@
+# Config file for running tests in Kokoro
+
+# Location of the build script in repository
+build_file: "protobuf/kokoro/macos/objectivec_ios_debug/build.sh"
+timeout_mins: 1440

+ 11 - 0
kokoro/macos/objectivec_ios_release/build.sh

@@ -0,0 +1,11 @@
+#!/bin/bash
+#
+# Build file to set up and run tests
+
+# Change to repo root
+cd $(dirname $0)/../../..
+
+# Prepare worker environment to run tests
+source kokoro/macos/prepare_build_macos_rc
+
+./tests.sh objectivec_ios_release

+ 5 - 0
kokoro/macos/objectivec_ios_release/presubmit.cfg

@@ -0,0 +1,5 @@
+# Config file for running tests in Kokoro
+
+# Location of the build script in repository
+build_file: "protobuf/kokoro/macos/objectivec_ios_release/build.sh"
+timeout_mins: 1440

+ 11 - 0
kokoro/macos/objectivec_osx/build.sh

@@ -0,0 +1,11 @@
+#!/bin/bash
+#
+# Build file to set up and run tests
+
+# Change to repo root
+cd $(dirname $0)/../../..
+
+# Prepare worker environment to run tests
+source kokoro/macos/prepare_build_macos_rc
+
+./tests.sh objectivec_osx

+ 5 - 0
kokoro/macos/objectivec_osx/presubmit.cfg

@@ -0,0 +1,5 @@
+# Config file for running tests in Kokoro
+
+# Location of the build script in repository
+build_file: "protobuf/kokoro/macos/objectivec_osx/build.sh"
+timeout_mins: 1440

+ 11 - 0
kokoro/macos/php5.6_mac/build.sh

@@ -0,0 +1,11 @@
+#!/bin/bash
+#
+# Build file to set up and run tests
+
+# Change to repo root
+cd $(dirname $0)/../../..
+
+# Prepare worker environment to run tests
+source kokoro/macos/prepare_build_macos_rc
+
+./tests.sh php5.6_mac

+ 5 - 0
kokoro/macos/php5.6_mac/presubmit.cfg

@@ -0,0 +1,5 @@
+# Config file for running tests in Kokoro
+
+# Location of the build script in repository
+build_file: "protobuf/kokoro/macos/php5.6_mac/build.sh"
+timeout_mins: 1440

+ 11 - 0
kokoro/macos/php7.0_mac/build.sh

@@ -0,0 +1,11 @@
+#!/bin/bash
+#
+# Build file to set up and run tests
+
+# Change to repo root
+cd $(dirname $0)/../../..
+
+# Prepare worker environment to run tests
+source kokoro/macos/prepare_build_macos_rc
+
+./tests.sh php7.0_mac

+ 5 - 0
kokoro/macos/php7.0_mac/presubmit.cfg

@@ -0,0 +1,5 @@
+# Config file for running tests in Kokoro
+
+# Location of the build script in repository
+build_file: "protobuf/kokoro/macos/php7.0_mac/build.sh"
+timeout_mins: 1440

+ 33 - 0
kokoro/macos/prepare_build_macos_rc

@@ -0,0 +1,33 @@
+#!/bin/bash
+#
+# This script sets up a Kokoro MacOS worker for running Protobuf tests
+
+##
+# Select Xcode version
+
+export DEVELOPER_DIR=/Applications/Xcode_8.1.app/Contents/Developer
+
+##
+# Select C/C++ compilers
+
+export CC=gcc
+export CXX=g++
+
+##
+# Install Brew and core softwares
+
+ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
+brew tap homebrew/homebrew-php
+brew install autoconf automake ccache cmake gflags gpg gpg2 libtool maven node pcre php56 ruby wget
+
+##
+# Install Tox
+
+sudo pip install tox==2.4.1
+
+##
+# Install RVM
+
+gpg2 --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
+command curl -sSL https://rvm.io/mpapis.asc | gpg2 --import -
+curl -sSL https://get.rvm.io | bash -s stable --ruby

+ 11 - 0
kokoro/macos/python/build.sh

@@ -0,0 +1,11 @@
+#!/bin/bash
+#
+# Build file to set up and run tests
+
+# Change to repo root
+cd $(dirname $0)/../../..
+
+# Prepare worker environment to run tests
+source kokoro/macos/prepare_build_macos_rc
+
+./tests.sh python

+ 5 - 0
kokoro/macos/python/presubmit.cfg

@@ -0,0 +1,5 @@
+# Config file for running tests in Kokoro
+
+# Location of the build script in repository
+build_file: "protobuf/kokoro/macos/python/build.sh"
+timeout_mins: 1440

+ 12 - 0
kokoro/macos/python_cpp/build.sh

@@ -0,0 +1,12 @@
+#!/bin/bash
+#
+# Build file to set up and run tests
+
+# Change to repo root
+cd $(dirname $0)/../../..
+
+# Prepare worker environment to run tests
+source kokoro/macos/prepare_build_macos_rc
+g++ --version
+
+./tests.sh python_cpp

+ 5 - 0
kokoro/macos/python_cpp/presubmit.cfg

@@ -0,0 +1,5 @@
+# Config file for running tests in Kokoro
+
+# Location of the build script in repository
+build_file: "protobuf/kokoro/macos/python_cpp/build.sh"
+timeout_mins: 1440

+ 11 - 0
kokoro/macos/ruby21/build.sh

@@ -0,0 +1,11 @@
+#!/bin/bash
+#
+# Build file to set up and run tests
+
+# Change to repo root
+cd $(dirname $0)/../../..
+
+# Prepare worker environment to run tests
+source kokoro/macos/prepare_build_macos_rc
+
+./tests.sh ruby21

+ 5 - 0
kokoro/macos/ruby21/presubmit.cfg

@@ -0,0 +1,5 @@
+# Config file for running tests in Kokoro
+
+# Location of the build script in repository
+build_file: "protobuf/kokoro/macos/ruby21/build.sh"
+timeout_mins: 1440

+ 11 - 0
kokoro/macos/ruby22/build.sh

@@ -0,0 +1,11 @@
+#!/bin/bash
+#
+# Build file to set up and run tests
+
+# Change to repo root
+cd $(dirname $0)/../../..
+
+# Prepare worker environment to run tests
+source kokoro/macos/prepare_build_macos_rc
+
+./tests.sh ruby22

+ 5 - 0
kokoro/macos/ruby22/presubmit.cfg

@@ -0,0 +1,5 @@
+# Config file for running tests in Kokoro
+
+# Location of the build script in repository
+build_file: "protobuf/kokoro/macos/ruby22/build.sh"
+timeout_mins: 1440