From 03fb2cbb040da0757b6b32a4fdefbeed2e2ff788 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Mon, 12 Mar 2018 21:22:01 +0100 Subject: [PATCH] Adding builds to our CI. --- kokoro.bat => test/kokoro.bat | 3 +++ kokoro.sh => test/kokoro.sh | 6 +++++- test/kokoro/linux.cfg | 2 +- test/kokoro/macos.cfg | 2 +- test/kokoro/windows.cfg | 2 +- tools/release/kokoro.bat | 28 ++++++++++++++++++++++++ tools/release/kokoro.sh | 37 ++++++++++++++++++++++++++++++++ tools/release/kokoro/linux.cfg | 25 +++++++++++++++++++++ tools/release/kokoro/macos.cfg | 25 +++++++++++++++++++++ tools/release/kokoro/windows.cfg | 25 +++++++++++++++++++++ 10 files changed, 151 insertions(+), 4 deletions(-) rename kokoro.bat => test/kokoro.bat (95%) rename kokoro.sh => test/kokoro.sh (86%) create mode 100644 tools/release/kokoro.bat create mode 100755 tools/release/kokoro.sh create mode 100644 tools/release/kokoro/linux.cfg create mode 100644 tools/release/kokoro/macos.cfg create mode 100644 tools/release/kokoro/windows.cfg diff --git a/kokoro.bat b/test/kokoro.bat similarity index 95% rename from kokoro.bat rename to test/kokoro.bat index fc5fd8b2..47a31e37 100644 --- a/kokoro.bat +++ b/test/kokoro.bat @@ -15,8 +15,11 @@ @echo "Starting Windows test" cd /d %~dp0 +cd .. git submodule update --init git submodule foreach --recursive git submodule update --init +call tools\release\kokoro.bat + .\run-tests.bat diff --git a/kokoro.sh b/test/kokoro.sh similarity index 86% rename from kokoro.sh rename to test/kokoro.sh index 3e51749c..dbc6c8db 100755 --- a/kokoro.sh +++ b/test/kokoro.sh @@ -14,10 +14,14 @@ # limitations under the License. set -e -cd $(dirname $0) +cd $(dirname $0)/.. # Install gRPC and its submodules. git submodule update --init git submodule foreach --recursive git submodule update --init +./packages/grpc-native-core/tools/buildgen/generate_projects.sh + +./tools/release/kokoro.sh + ./run-tests.sh diff --git a/test/kokoro/linux.cfg b/test/kokoro/linux.cfg index c6b2c88f..f40e6db4 100644 --- a/test/kokoro/linux.cfg +++ b/test/kokoro/linux.cfg @@ -15,7 +15,7 @@ # Config file for Kokoro (in protobuf text format) # Location of the continuous shell script in repository. -build_file: "grpc-node/kokoro.sh" +build_file: "grpc-node/test/kokoro.sh" timeout_mins: 60 action { define_artifacts { diff --git a/test/kokoro/macos.cfg b/test/kokoro/macos.cfg index c6b2c88f..f40e6db4 100644 --- a/test/kokoro/macos.cfg +++ b/test/kokoro/macos.cfg @@ -15,7 +15,7 @@ # Config file for Kokoro (in protobuf text format) # Location of the continuous shell script in repository. -build_file: "grpc-node/kokoro.sh" +build_file: "grpc-node/test/kokoro.sh" timeout_mins: 60 action { define_artifacts { diff --git a/test/kokoro/windows.cfg b/test/kokoro/windows.cfg index e4a4524b..2b9d0906 100644 --- a/test/kokoro/windows.cfg +++ b/test/kokoro/windows.cfg @@ -15,5 +15,5 @@ # Config file for Kokoro (in protobuf text format) # Location of the continuous shell script in repository. -build_file: "grpc-node/kokoro.bat" +build_file: "grpc-node/test/kokoro.bat" timeout_mins: 60 diff --git a/tools/release/kokoro.bat b/tools/release/kokoro.bat new file mode 100644 index 00000000..e86e01bd --- /dev/null +++ b/tools/release/kokoro.bat @@ -0,0 +1,28 @@ +@rem Copyright 2018 gRPC authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem http://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. + +@echo "Starting Windows build" + +cd /d %~dp0 +cd ..\.. + +git submodule update --init +git submodule foreach --recursive git submodule update --init + +set ARTIFACTS_OUT=artifacts +cd packages\grpc-native-core +call tools\run_tests\artifacts\build_artifact_node.bat +cd ..\.. + +move packages\grpc-native-core\artifacts . diff --git a/tools/release/kokoro.sh b/tools/release/kokoro.sh new file mode 100755 index 00000000..7282c737 --- /dev/null +++ b/tools/release/kokoro.sh @@ -0,0 +1,37 @@ +#!/bin/sh +# Copyright 2018 gRPC authors. +# +# Licensed 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 +# +# http://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 +cd $(dirname $0)/../.. +base_dir=$(pwd) + +# Install gRPC and its submodules. +git submodule update --init +git submodule foreach --recursive git submodule update --init + +./packages/grpc-native-core/tools/buildgen/generate_projects.sh + +OS=`uname` + +case $OS in +Linux) + ./packages/grpc-native-core/tools/run_tests/artifacts/build_all_linux_artifacts.sh + mv packages/grpc-native-core/artifacts . + ;; +Darwin) + export ARTIFACTS_OUT=$(base_dir)/artifacts + ./packages/grpc-native-core/tools/run_tests/artifacts/build_artifact_node.sh + ;; +esac diff --git a/tools/release/kokoro/linux.cfg b/tools/release/kokoro/linux.cfg new file mode 100644 index 00000000..80bc144f --- /dev/null +++ b/tools/release/kokoro/linux.cfg @@ -0,0 +1,25 @@ +# Copyright 2018 gRPC authors. +# +# Licensed 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 +# +# http://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. + +# Config file for Kokoro (in protobuf text format) + +# Location of the continuous shell script in repository. +build_file: "grpc-node/tools/release/kokoro.sh" +timeout_mins: 60 +action { + define_artifacts { + regex: "github/grpc-node/artifacts/**", + strip_prefix: "github/grpc-node/artifacts" + } +} diff --git a/tools/release/kokoro/macos.cfg b/tools/release/kokoro/macos.cfg new file mode 100644 index 00000000..80bc144f --- /dev/null +++ b/tools/release/kokoro/macos.cfg @@ -0,0 +1,25 @@ +# Copyright 2018 gRPC authors. +# +# Licensed 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 +# +# http://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. + +# Config file for Kokoro (in protobuf text format) + +# Location of the continuous shell script in repository. +build_file: "grpc-node/tools/release/kokoro.sh" +timeout_mins: 60 +action { + define_artifacts { + regex: "github/grpc-node/artifacts/**", + strip_prefix: "github/grpc-node/artifacts" + } +} diff --git a/tools/release/kokoro/windows.cfg b/tools/release/kokoro/windows.cfg new file mode 100644 index 00000000..925126e5 --- /dev/null +++ b/tools/release/kokoro/windows.cfg @@ -0,0 +1,25 @@ +# Copyright 2018 gRPC authors. +# +# Licensed 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 +# +# http://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. + +# Config file for Kokoro (in protobuf text format) + +# Location of the continuous shell script in repository. +build_file: "grpc-node/tools/release/kokoro.bat" +timeout_mins: 60 +action { + define_artifacts { + regex: "github/grpc-node/artifacts/**", + strip_prefix: "github/grpc-node/artifacts" + } +}