Merge pull request #3191 from matt-kwong/kokoro

Add MacOS and Linux tests to Kokoro
This commit is contained in:
Feng Xiao 2017-06-06 16:44:30 -07:00 committed by GitHub
commit d4d41af19b
39 changed files with 337 additions and 0 deletions

6
kokoro/README.md Normal file
View File

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

View File

@ -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

View File

@ -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
kokoro/linux/csharp/build.sh Executable file
View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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
kokoro/macos/cpp/build.sh Executable file
View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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
kokoro/macos/jruby/build.sh Executable file
View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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
kokoro/macos/python/build.sh Executable file
View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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
kokoro/macos/ruby21/build.sh Executable file
View File

@ -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

View File

@ -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
kokoro/macos/ruby22/build.sh Executable file
View File

@ -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

View File

@ -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