Reduce the workload of presubmit artifact builds and distribtests (#28228)

* Reduce the workload of presubmit artifact builds and distribtests

* Create and redirect Kokoro config
* Remove duplicated scripts and use env var config

* Clean-up Kokoro cfg

* [DO-NOT-SUBMIT] Add ad-hoc TASK_RUNNER_EXTRA_FILTERS

* Revert "[DO-NOT-SUBMIT] Add ad-hoc TASK_RUNNER_EXTRA_FILTERS"

This reverts commit 9436ac54ac.
pull/28231/head^2
Lidi Zheng 3 years ago committed by GitHub
parent ba06eeb07c
commit 7cfd399dd6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      tools/internal_ci/linux/grpc_build_artifacts.sh
  2. 4
      tools/internal_ci/linux/grpc_distribtests_php.sh
  3. 4
      tools/internal_ci/linux/grpc_distribtests_python.sh
  4. 4
      tools/internal_ci/linux/grpc_distribtests_ruby.sh
  5. 2
      tools/internal_ci/linux/grpc_distribtests_standalone.sh
  6. 31
      tools/internal_ci/linux/pull_request/grpc_build_artifacts.cfg
  7. 31
      tools/internal_ci/linux/pull_request/grpc_distribtests_php.cfg
  8. 31
      tools/internal_ci/linux/pull_request/grpc_distribtests_python.cfg
  9. 31
      tools/internal_ci/linux/pull_request/grpc_distribtests_ruby.cfg
  10. 31
      tools/internal_ci/linux/pull_request/grpc_distribtests_standalone.cfg
  11. 2
      tools/internal_ci/macos/grpc_build_artifacts.sh
  12. 4
      tools/internal_ci/macos/grpc_distribtests_php.sh
  13. 32
      tools/internal_ci/macos/pull_request/grpc_build_artifacts.cfg
  14. 32
      tools/internal_ci/macos/pull_request/grpc_distribtests_php.cfg
  15. 2
      tools/internal_ci/windows/grpc_build_artifacts.bat
  16. 2
      tools/internal_ci/windows/grpc_distribtests_standalone.bat
  17. 31
      tools/internal_ci/windows/pull_request/grpc_build_artifacts.cfg
  18. 31
      tools/internal_ci/windows/pull_request/grpc_distribtests_standalone.cfg
  19. 97
      tools/run_tests/artifacts/artifact_targets.py
  20. 157
      tools/run_tests/artifacts/distribtest_targets.py

@ -29,7 +29,7 @@ set -e # rvm commands are very verbose
rvm --default use ruby-2.4.1 rvm --default use ruby-2.4.1
set -ex set -ex
tools/run_tests/task_runner.py -f artifact linux -j 12 || FAILED="true" tools/run_tests/task_runner.py -f artifact linux ${TASK_RUNNER_EXTRA_FILTERS} -j 12 || FAILED="true"
tools/internal_ci/helper_scripts/store_artifacts_from_moved_src_tree.sh tools/internal_ci/helper_scripts/store_artifacts_from_moved_src_tree.sh

@ -24,7 +24,7 @@ cd $(dirname $0)/../../..
source tools/internal_ci/helper_scripts/prepare_build_linux_rc source tools/internal_ci/helper_scripts/prepare_build_linux_rc
# Build all PHP linux artifacts # Build all PHP linux artifacts
tools/run_tests/task_runner.py -f artifact linux php -j 4 -x build_artifacts/sponge_log.xml || FAILED="true" tools/run_tests/task_runner.py -f artifact linux php ${TASK_RUNNER_EXTRA_FILTERS} -j 4 -x build_artifacts/sponge_log.xml || FAILED="true"
# the next step expects to find the artifacts from the previous step in the "input_artifacts" folder. # the next step expects to find the artifacts from the previous step in the "input_artifacts" folder.
rm -rf input_artifacts rm -rf input_artifacts
@ -46,7 +46,7 @@ cp -r artifacts/* input_artifacts/ || true
# Run all PHP linux distribtests # Run all PHP linux distribtests
# We run the distribtests even if some of the artifacts have failed to build, since that gives # We run the distribtests even if some of the artifacts have failed to build, since that gives
# a better signal about which distribtest are affected by the currently broken artifact builds. # a better signal about which distribtest are affected by the currently broken artifact builds.
tools/run_tests/task_runner.py -f distribtest linux php -j 4 -x distribtests/sponge_log.xml || FAILED="true" tools/run_tests/task_runner.py -f distribtest linux php ${TASK_RUNNER_EXTRA_FILTERS} -j 4 -x distribtests/sponge_log.xml || FAILED="true"
tools/internal_ci/helper_scripts/store_artifacts_from_moved_src_tree.sh tools/internal_ci/helper_scripts/store_artifacts_from_moved_src_tree.sh

@ -29,7 +29,7 @@ source tools/internal_ci/helper_scripts/prepare_build_linux_rc
source tools/internal_ci/helper_scripts/prepare_qemu_rc source tools/internal_ci/helper_scripts/prepare_qemu_rc
# Build all python linux artifacts (this step actually builds all the binary wheels and source archives) # Build all python linux artifacts (this step actually builds all the binary wheels and source archives)
tools/run_tests/task_runner.py -f artifact linux python -j 12 -x build_artifacts/sponge_log.xml || FAILED="true" tools/run_tests/task_runner.py -f artifact linux python ${TASK_RUNNER_EXTRA_FILTERS} -j 12 -x build_artifacts/sponge_log.xml || FAILED="true"
# the next step expects to find the artifacts from the previous step in the "input_artifacts" folder. # the next step expects to find the artifacts from the previous step in the "input_artifacts" folder.
rm -rf input_artifacts rm -rf input_artifacts
@ -51,7 +51,7 @@ cp -r artifacts/* input_artifacts/ || true
# Run all python linux distribtests # Run all python linux distribtests
# We run the distribtests even if some of the artifacts have failed to build, since that gives # We run the distribtests even if some of the artifacts have failed to build, since that gives
# a better signal about which distribtest are affected by the currently broken artifact builds. # a better signal about which distribtest are affected by the currently broken artifact builds.
tools/run_tests/task_runner.py -f distribtest linux python -j 12 -x distribtests/sponge_log.xml || FAILED="true" tools/run_tests/task_runner.py -f distribtest linux python ${TASK_RUNNER_EXTRA_FILTERS} -j 12 -x distribtests/sponge_log.xml || FAILED="true"
tools/internal_ci/helper_scripts/store_artifacts_from_moved_src_tree.sh tools/internal_ci/helper_scripts/store_artifacts_from_moved_src_tree.sh

@ -30,7 +30,7 @@ rvm --default use ruby-2.4.1
set -ex set -ex
# Build all ruby linux artifacts (this step actually builds all the binary wheels and source archives) # Build all ruby linux artifacts (this step actually builds all the binary wheels and source archives)
tools/run_tests/task_runner.py -f artifact linux ruby -j 6 -x build_artifacts/sponge_log.xml || FAILED="true" tools/run_tests/task_runner.py -f artifact linux ruby ${TASK_RUNNER_EXTRA_FILTERS} -j 6 -x build_artifacts/sponge_log.xml || FAILED="true"
# Ruby "build_package" step is basically just a passthough for the "grpc" gems, so it's enough to just # Ruby "build_package" step is basically just a passthough for the "grpc" gems, so it's enough to just
# copy the native gems directly to the "distribtests" step and skip the "build_package" phase entirely. # copy the native gems directly to the "distribtests" step and skip the "build_package" phase entirely.
@ -47,7 +47,7 @@ cp -r artifacts/ruby_native_gem_*/* input_artifacts/ || true
# Run all ruby linux distribtests # Run all ruby linux distribtests
# We run the distribtests even if some of the artifacts have failed to build, since that gives # We run the distribtests even if some of the artifacts have failed to build, since that gives
# a better signal about which distribtest are affected by the currently broken artifact builds. # a better signal about which distribtest are affected by the currently broken artifact builds.
tools/run_tests/task_runner.py -f distribtest linux ruby -j 6 -x distribtests/sponge_log.xml || FAILED="true" tools/run_tests/task_runner.py -f distribtest linux ruby ${TASK_RUNNER_EXTRA_FILTERS} -j 6 -x distribtests/sponge_log.xml || FAILED="true"
tools/internal_ci/helper_scripts/store_artifacts_from_moved_src_tree.sh tools/internal_ci/helper_scripts/store_artifacts_from_moved_src_tree.sh

@ -23,4 +23,4 @@ cd $(dirname $0)/../../..
source tools/internal_ci/helper_scripts/prepare_build_linux_rc source tools/internal_ci/helper_scripts/prepare_build_linux_rc
tools/run_tests/task_runner.py -f distribtest linux cpp -j 6 tools/run_tests/task_runner.py -f distribtest linux cpp ${TASK_RUNNER_EXTRA_FILTERS} -j 6

@ -0,0 +1,31 @@
# Copyright 2021 The 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 the internal CI (in protobuf text format)
# Location of the continuous shell script in repository.
build_file: "grpc/tools/internal_ci/linux/grpc_build_artifacts.sh"
timeout_mins: 180
action {
define_artifacts {
regex: "**/*sponge_log.*"
regex: "github/grpc/reports/**"
regex: "github/grpc/artifacts/**"
}
}
env_vars {
key: "TASK_RUNNER_EXTRA_FILTERS"
value: "presubmit"
}

@ -0,0 +1,31 @@
# Copyright 2021 The 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 the internal CI (in protobuf text format)
# Location of the continuous shell script in repository.
build_file: "grpc/tools/internal_ci/linux/grpc_distribtests_php.sh"
timeout_mins: 240
action {
define_artifacts {
regex: "**/*sponge_log.*"
regex: "github/grpc/reports/**"
regex: "github/grpc/artifacts/**"
}
}
env_vars {
key: "TASK_RUNNER_EXTRA_FILTERS"
value: "presubmit"
}

@ -0,0 +1,31 @@
# Copyright 2021 The 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 the internal CI (in protobuf text format)
# Location of the continuous shell script in repository.
build_file: "grpc/tools/internal_ci/linux/grpc_distribtests_python.sh"
timeout_mins: 240
action {
define_artifacts {
regex: "**/*sponge_log.*"
regex: "github/grpc/reports/**"
regex: "github/grpc/artifacts/**"
}
}
env_vars {
key: "TASK_RUNNER_EXTRA_FILTERS"
value: "presubmit"
}

@ -0,0 +1,31 @@
# Copyright 2021 The 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 the internal CI (in protobuf text format)
# Location of the continuous shell script in repository.
build_file: "grpc/tools/internal_ci/linux/grpc_distribtests_ruby.sh"
timeout_mins: 240
action {
define_artifacts {
regex: "**/*sponge_log.*"
regex: "github/grpc/reports/**"
regex: "github/grpc/artifacts/**"
}
}
env_vars {
key: "TASK_RUNNER_EXTRA_FILTERS"
value: "presubmit"
}

@ -0,0 +1,31 @@
# Copyright 2021 The 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 the internal CI (in protobuf text format)
# Location of the continuous shell script in repository.
build_file: "grpc/tools/internal_ci/linux/grpc_distribtests_standalone.sh"
timeout_mins: 120
action {
define_artifacts {
regex: "**/*sponge_log.*"
regex: "github/grpc/reports/**"
regex: "github/grpc/artifacts/**"
}
}
env_vars {
key: "TASK_RUNNER_EXTRA_FILTERS"
value: "presubmit"
}

@ -41,7 +41,7 @@ time bash tools/distrib/build_ruby_environment_macos.sh
gem install rubygems-update gem install rubygems-update
update_rubygems update_rubygems
tools/run_tests/task_runner.py -f artifact macos || FAILED="true" tools/run_tests/task_runner.py -f artifact macos ${TASK_RUNNER_EXTRA_FILTERS} || FAILED="true"
tools/internal_ci/helper_scripts/store_artifacts_from_moved_src_tree.sh tools/internal_ci/helper_scripts/store_artifacts_from_moved_src_tree.sh

@ -25,7 +25,7 @@ export PREPARE_BUILD_INSTALL_DEPS_PHP=true
source tools/internal_ci/helper_scripts/prepare_build_macos_rc source tools/internal_ci/helper_scripts/prepare_build_macos_rc
# Build all PHP macos artifacts # Build all PHP macos artifacts
tools/run_tests/task_runner.py -f artifact macos php -j 4 -x build_artifacts/sponge_log.xml || FAILED="true" tools/run_tests/task_runner.py -f artifact macos php ${TASK_RUNNER_EXTRA_FILTERS} -j 4 -x build_artifacts/sponge_log.xml || FAILED="true"
# PHP's "build_package" step is basically just a passthough, so the build artifacts can be used # PHP's "build_package" step is basically just a passthough, so the build artifacts can be used
# directly by the "distribtests" step (and we skip the "build_package" phase entirely on mac). # directly by the "distribtests" step (and we skip the "build_package" phase entirely on mac).
@ -40,7 +40,7 @@ cp -r artifacts/php_pecl_package_macos_*/* input_artifacts/ || true
# Run all PHP linux distribtests # Run all PHP linux distribtests
# We run the distribtests even if some of the artifacts have failed to build, since that gives # We run the distribtests even if some of the artifacts have failed to build, since that gives
# a better signal about which distribtest are affected by the currently broken artifact builds. # a better signal about which distribtest are affected by the currently broken artifact builds.
tools/run_tests/task_runner.py -f distribtest macos php -j 4 -x distribtests/sponge_log.xml || FAILED="true" tools/run_tests/task_runner.py -f distribtest macos php ${TASK_RUNNER_EXTRA_FILTERS} -j 4 -x distribtests/sponge_log.xml || FAILED="true"
tools/internal_ci/helper_scripts/store_artifacts_from_moved_src_tree.sh tools/internal_ci/helper_scripts/store_artifacts_from_moved_src_tree.sh

@ -0,0 +1,32 @@
# Copyright 2021 The 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 the internal CI (in protobuf text format)
# Location of the continuous shell script in repository.
build_file: "grpc/tools/internal_ci/macos/grpc_build_artifacts.sh"
gfile_resources: "/bigstore/grpc-testing-secrets/gcp_credentials/GrpcTesting-d0eeee2db331.json"
timeout_mins: 240
action {
define_artifacts {
regex: "**/*sponge_log.*"
regex: "github/grpc/reports/**"
regex: "github/grpc/artifacts/**"
}
}
env_vars {
key: "TASK_RUNNER_EXTRA_FILTERS"
value: "presubmit"
}

@ -0,0 +1,32 @@
# Copyright 2021 The 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 the internal CI (in protobuf text format)
# Location of the continuous shell script in repository.
build_file: "grpc/tools/internal_ci/macos/grpc_distribtests_php.sh"
gfile_resources: "/bigstore/grpc-testing-secrets/gcp_credentials/GrpcTesting-d0eeee2db331.json"
timeout_mins: 240
action {
define_artifacts {
regex: "**/*sponge_log.*"
regex: "github/grpc/reports/**"
regex: "github/grpc/artifacts/**"
}
}
env_vars {
key: "TASK_RUNNER_EXTRA_FILTERS"
value: "presubmit"
}

@ -29,7 +29,7 @@ cd /d %~dp0\..\..\..
set PREPARE_BUILD_INSTALL_DEPS_PYTHON=true set PREPARE_BUILD_INSTALL_DEPS_PYTHON=true
call tools/internal_ci/helper_scripts/prepare_build_windows.bat || exit /b 1 call tools/internal_ci/helper_scripts/prepare_build_windows.bat || exit /b 1
python tools/run_tests/task_runner.py -f artifact windows -j 4 python tools/run_tests/task_runner.py -f artifact windows %TASK_RUNNER_EXTRA_FILTERS% -j 4
set RUNTESTS_EXITCODE=%errorlevel% set RUNTESTS_EXITCODE=%errorlevel%
bash tools/internal_ci/helper_scripts/store_artifacts_from_moved_src_tree.sh bash tools/internal_ci/helper_scripts/store_artifacts_from_moved_src_tree.sh

@ -24,7 +24,7 @@ cd /d %~dp0\..\..\..
call tools/internal_ci/helper_scripts/prepare_build_windows.bat || exit /b 1 call tools/internal_ci/helper_scripts/prepare_build_windows.bat || exit /b 1
python tools/run_tests/task_runner.py -f distribtest windows cpp -j 4 python tools/run_tests/task_runner.py -f distribtest windows cpp %TASK_RUNNER_EXTRA_FILTERS% -j 4
set RUNTESTS_EXITCODE=%errorlevel% set RUNTESTS_EXITCODE=%errorlevel%
exit /b %RUNTESTS_EXITCODE% exit /b %RUNTESTS_EXITCODE%

@ -0,0 +1,31 @@
# Copyright 2021 The 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 the internal CI (in protobuf text format)
# Location of the continuous shell script in repository.
build_file: "grpc/tools/internal_ci/windows/grpc_build_artifacts.bat"
timeout_mins: 240
action {
define_artifacts {
regex: "**/*sponge_log.*"
regex: "github/grpc/reports/**"
regex: "github/grpc/artifacts/**"
}
}
env_vars {
key: "TASK_RUNNER_EXTRA_FILTERS"
value: "presubmit"
}

@ -0,0 +1,31 @@
# Copyright 2021 The 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 the internal CI (in protobuf text format)
# Location of the continuous shell script in repository.
build_file: "grpc/tools/internal_ci/windows/grpc_distribtests_standalone.bat"
timeout_mins: 120
action {
define_artifacts {
regex: "**/*sponge_log.*"
regex: "github/grpc/reports/**"
regex: "github/grpc/artifacts/**"
}
}
env_vars {
key: "TASK_RUNNER_EXTRA_FILTERS"
value: "presubmit"
}

@ -99,11 +99,13 @@ _ARCH_FLAG_MAP = {'x86': '-m32', 'x64': '-m64'}
class PythonArtifact: class PythonArtifact:
"""Builds Python artifacts.""" """Builds Python artifacts."""
def __init__(self, platform, arch, py_version): def __init__(self, platform, arch, py_version, presubmit=False):
self.name = 'python_%s_%s_%s' % (platform, arch, py_version) self.name = 'python_%s_%s_%s' % (platform, arch, py_version)
self.platform = platform self.platform = platform
self.arch = arch self.arch = arch
self.labels = ['artifact', 'python', platform, arch, py_version] self.labels = ['artifact', 'python', platform, arch, py_version]
if presubmit:
self.labels.append('presubmit')
self.py_version = py_version self.py_version = py_version
if 'manylinux' in platform: if 'manylinux' in platform:
self.labels.append('linux') self.labels.append('linux')
@ -191,11 +193,13 @@ class PythonArtifact:
class RubyArtifact: class RubyArtifact:
"""Builds ruby native gem.""" """Builds ruby native gem."""
def __init__(self, platform, arch): def __init__(self, platform, arch, presubmit=False):
self.name = 'ruby_native_gem_%s_%s' % (platform, arch) self.name = 'ruby_native_gem_%s_%s' % (platform, arch)
self.platform = platform self.platform = platform
self.arch = arch self.arch = arch
self.labels = ['artifact', 'ruby', platform, arch] self.labels = ['artifact', 'ruby', platform, arch]
if presubmit:
self.labels.append('presubmit')
def pre_build_jobspecs(self): def pre_build_jobspecs(self):
return [] return []
@ -212,7 +216,7 @@ class RubyArtifact:
class CSharpExtArtifact: class CSharpExtArtifact:
"""Builds C# native extension library""" """Builds C# native extension library"""
def __init__(self, platform, arch, arch_abi=None): def __init__(self, platform, arch, arch_abi=None, presubmit=False):
self.name = 'csharp_ext_%s_%s' % (platform, arch) self.name = 'csharp_ext_%s_%s' % (platform, arch)
self.platform = platform self.platform = platform
self.arch = arch self.arch = arch
@ -221,6 +225,8 @@ class CSharpExtArtifact:
if arch_abi: if arch_abi:
self.name += '_%s' % arch_abi self.name += '_%s' % arch_abi
self.labels.append(arch_abi) self.labels.append(arch_abi)
if presubmit:
self.labels.append('presubmit')
def pre_build_jobspecs(self): def pre_build_jobspecs(self):
return [] return []
@ -270,11 +276,13 @@ class CSharpExtArtifact:
class PHPArtifact: class PHPArtifact:
"""Builds PHP PECL package""" """Builds PHP PECL package"""
def __init__(self, platform, arch): def __init__(self, platform, arch, presubmit=False):
self.name = 'php_pecl_package_{0}_{1}'.format(platform, arch) self.name = 'php_pecl_package_{0}_{1}'.format(platform, arch)
self.platform = platform self.platform = platform
self.arch = arch self.arch = arch
self.labels = ['artifact', 'php', platform, arch] self.labels = ['artifact', 'php', platform, arch]
if presubmit:
self.labels.append('presubmit')
def pre_build_jobspecs(self): def pre_build_jobspecs(self):
return [] return []
@ -294,11 +302,13 @@ class PHPArtifact:
class ProtocArtifact: class ProtocArtifact:
"""Builds protoc and protoc-plugin artifacts""" """Builds protoc and protoc-plugin artifacts"""
def __init__(self, platform, arch): def __init__(self, platform, arch, presubmit=False):
self.name = 'protoc_%s_%s' % (platform, arch) self.name = 'protoc_%s_%s' % (platform, arch)
self.platform = platform self.platform = platform
self.arch = arch self.arch = arch
self.labels = ['artifact', 'protoc', platform, arch] self.labels = ['artifact', 'protoc', platform, arch]
if presubmit:
self.labels.append('presubmit')
def pre_build_jobspecs(self): def pre_build_jobspecs(self):
return [] return []
@ -343,66 +353,73 @@ class ProtocArtifact:
def targets(): def targets():
"""Gets list of supported targets""" """Gets list of supported targets"""
return [ return [
ProtocArtifact('linux', 'x64'), ProtocArtifact('linux', 'x64', presubmit=True),
ProtocArtifact('linux', 'x86'), ProtocArtifact('linux', 'x86', presubmit=True),
ProtocArtifact('linux', 'aarch64'), ProtocArtifact('linux', 'aarch64', presubmit=True),
ProtocArtifact('macos', 'x64'), ProtocArtifact('macos', 'x64', presubmit=True),
ProtocArtifact('windows', 'x64'), ProtocArtifact('windows', 'x64', presubmit=True),
ProtocArtifact('windows', 'x86'), ProtocArtifact('windows', 'x86', presubmit=True),
CSharpExtArtifact('linux', 'x64'), CSharpExtArtifact('linux', 'x64', presubmit=True),
CSharpExtArtifact('linux', 'aarch64'), CSharpExtArtifact('linux', 'aarch64', presubmit=True),
CSharpExtArtifact('macos', 'x64'), CSharpExtArtifact('macos', 'x64', presubmit=True),
CSharpExtArtifact('windows', 'x64'), CSharpExtArtifact('windows', 'x64', presubmit=True),
CSharpExtArtifact('windows', 'x86'), CSharpExtArtifact('windows', 'x86', presubmit=True),
CSharpExtArtifact('linux', 'android', arch_abi='arm64-v8a'), CSharpExtArtifact('linux',
CSharpExtArtifact('linux', 'android', arch_abi='armeabi-v7a'), 'android',
CSharpExtArtifact('linux', 'android', arch_abi='x86'), arch_abi='arm64-v8a',
CSharpExtArtifact('macos', 'ios'), presubmit=True),
PythonArtifact('manylinux2014', 'x64', 'cp36-cp36m'), CSharpExtArtifact('linux',
'android',
arch_abi='armeabi-v7a',
presubmit=True),
CSharpExtArtifact('linux', 'android', arch_abi='x86', presubmit=True),
CSharpExtArtifact('macos', 'ios', presubmit=True),
PythonArtifact('manylinux2014', 'x64', 'cp36-cp36m', presubmit=True),
PythonArtifact('manylinux2014', 'x64', 'cp37-cp37m'), PythonArtifact('manylinux2014', 'x64', 'cp37-cp37m'),
PythonArtifact('manylinux2014', 'x64', 'cp38-cp38'), PythonArtifact('manylinux2014', 'x64', 'cp38-cp38'),
PythonArtifact('manylinux2014', 'x64', 'cp39-cp39'), PythonArtifact('manylinux2014', 'x64', 'cp39-cp39'),
PythonArtifact('manylinux2014', 'x64', 'cp310-cp310'), PythonArtifact('manylinux2014', 'x64', 'cp310-cp310', presubmit=True),
PythonArtifact('manylinux2014', 'x86', 'cp36-cp36m'), PythonArtifact('manylinux2014', 'x86', 'cp36-cp36m', presubmit=True),
PythonArtifact('manylinux2014', 'x86', 'cp37-cp37m'), PythonArtifact('manylinux2014', 'x86', 'cp37-cp37m'),
PythonArtifact('manylinux2014', 'x86', 'cp38-cp38'), PythonArtifact('manylinux2014', 'x86', 'cp38-cp38'),
PythonArtifact('manylinux2014', 'x86', 'cp39-cp39'), PythonArtifact('manylinux2014', 'x86', 'cp39-cp39'),
PythonArtifact('manylinux2014', 'x86', 'cp310-cp310'), PythonArtifact('manylinux2014', 'x86', 'cp310-cp310', presubmit=True),
PythonArtifact('manylinux2010', 'x64', 'cp36-cp36m'), PythonArtifact('manylinux2010', 'x64', 'cp36-cp36m'),
PythonArtifact('manylinux2010', 'x64', 'cp37-cp37m'), PythonArtifact('manylinux2010', 'x64', 'cp37-cp37m', presubmit=True),
PythonArtifact('manylinux2010', 'x64', 'cp38-cp38'), PythonArtifact('manylinux2010', 'x64', 'cp38-cp38'),
PythonArtifact('manylinux2010', 'x64', 'cp39-cp39'), PythonArtifact('manylinux2010', 'x64', 'cp39-cp39'),
PythonArtifact('manylinux2010', 'x86', 'cp36-cp36m'), PythonArtifact('manylinux2010', 'x86', 'cp36-cp36m'),
PythonArtifact('manylinux2010', 'x86', 'cp37-cp37m'), PythonArtifact('manylinux2010', 'x86', 'cp37-cp37m', presubmit=True),
PythonArtifact('manylinux2010', 'x86', 'cp38-cp38'), PythonArtifact('manylinux2010', 'x86', 'cp38-cp38'),
PythonArtifact('manylinux2010', 'x86', 'cp39-cp39'), PythonArtifact('manylinux2010', 'x86', 'cp39-cp39'),
PythonArtifact('manylinux2014', 'aarch64', 'cp36-cp36m'), PythonArtifact('manylinux2014', 'aarch64', 'cp36-cp36m',
presubmit=True),
PythonArtifact('manylinux2014', 'aarch64', 'cp37-cp37m'), PythonArtifact('manylinux2014', 'aarch64', 'cp37-cp37m'),
PythonArtifact('manylinux2014', 'aarch64', 'cp38-cp38'), PythonArtifact('manylinux2014', 'aarch64', 'cp38-cp38', presubmit=True),
PythonArtifact('manylinux2014', 'aarch64', 'cp39-cp39'), PythonArtifact('manylinux2014', 'aarch64', 'cp39-cp39'),
PythonArtifact('manylinux2014', 'aarch64', 'cp310-cp310'), PythonArtifact('manylinux2014', 'aarch64', 'cp310-cp310'),
PythonArtifact('linux_extra', 'armv7', 'cp36-cp36m'), PythonArtifact('linux_extra', 'armv7', 'cp36-cp36m', presubmit=True),
PythonArtifact('linux_extra', 'armv7', 'cp37-cp37m'), PythonArtifact('linux_extra', 'armv7', 'cp37-cp37m'),
PythonArtifact('linux_extra', 'armv7', 'cp38-cp38'), PythonArtifact('linux_extra', 'armv7', 'cp38-cp38'),
PythonArtifact('linux_extra', 'armv7', 'cp39-cp39'), PythonArtifact('linux_extra', 'armv7', 'cp39-cp39'),
PythonArtifact('linux_extra', 'armv7', 'cp310-cp310'), PythonArtifact('linux_extra', 'armv7', 'cp310-cp310', presubmit=True),
PythonArtifact('macos', 'x64', 'python3.6'), PythonArtifact('macos', 'x64', 'python3.6', presubmit=True),
PythonArtifact('macos', 'x64', 'python3.7'), PythonArtifact('macos', 'x64', 'python3.7'),
PythonArtifact('macos', 'x64', 'python3.8'), PythonArtifact('macos', 'x64', 'python3.8'),
PythonArtifact('macos', 'x64', 'python3.9'), PythonArtifact('macos', 'x64', 'python3.9'),
PythonArtifact('macos', 'x64', 'python3.10'), PythonArtifact('macos', 'x64', 'python3.10', presubmit=True),
PythonArtifact('windows', 'x86', 'Python36_32bit'), PythonArtifact('windows', 'x86', 'Python36_32bit', presubmit=True),
PythonArtifact('windows', 'x86', 'Python37_32bit'), PythonArtifact('windows', 'x86', 'Python37_32bit'),
PythonArtifact('windows', 'x86', 'Python38_32bit'), PythonArtifact('windows', 'x86', 'Python38_32bit'),
PythonArtifact('windows', 'x86', 'Python39_32bit'), PythonArtifact('windows', 'x86', 'Python39_32bit'),
PythonArtifact('windows', 'x86', 'Python310_32bit'), PythonArtifact('windows', 'x86', 'Python310_32bit', presubmit=True),
PythonArtifact('windows', 'x64', 'Python36'), PythonArtifact('windows', 'x64', 'Python36', presubmit=True),
PythonArtifact('windows', 'x64', 'Python37'), PythonArtifact('windows', 'x64', 'Python37'),
PythonArtifact('windows', 'x64', 'Python38'), PythonArtifact('windows', 'x64', 'Python38'),
PythonArtifact('windows', 'x64', 'Python39'), PythonArtifact('windows', 'x64', 'Python39'),
PythonArtifact('windows', 'x64', 'Python310'), PythonArtifact('windows', 'x64', 'Python310', presubmit=True),
RubyArtifact('linux', 'x64'), RubyArtifact('linux', 'x64', presubmit=True),
RubyArtifact('macos', 'x64'), RubyArtifact('macos', 'x64', presubmit=True),
PHPArtifact('linux', 'x64'), PHPArtifact('linux', 'x64', presubmit=True),
PHPArtifact('macos', 'x64') PHPArtifact('macos', 'x64', presubmit=True)
] ]

@ -85,12 +85,15 @@ class CSharpDistribTest(object):
platform, platform,
arch, arch,
docker_suffix=None, docker_suffix=None,
use_dotnet_cli=False): use_dotnet_cli=False,
presubmit=False):
self.name = 'csharp_%s_%s' % (platform, arch) self.name = 'csharp_%s_%s' % (platform, arch)
self.platform = platform self.platform = platform
self.arch = arch self.arch = arch
self.docker_suffix = docker_suffix self.docker_suffix = docker_suffix
self.labels = ['distribtest', 'csharp', platform, arch] self.labels = ['distribtest', 'csharp', platform, arch]
if presubmit:
self.labels.append('presubmit')
self.script_suffix = '' self.script_suffix = ''
if docker_suffix: if docker_suffix:
self.name += '_%s' % docker_suffix self.name += '_%s' % docker_suffix
@ -146,7 +149,12 @@ class CSharpDistribTest(object):
class PythonDistribTest(object): class PythonDistribTest(object):
"""Tests Python package""" """Tests Python package"""
def __init__(self, platform, arch, docker_suffix, source=False): def __init__(self,
platform,
arch,
docker_suffix,
source=False,
presubmit=False):
self.source = source self.source = source
if source: if source:
self.name = 'python_dev_%s_%s_%s' % (platform, arch, docker_suffix) self.name = 'python_dev_%s_%s_%s' % (platform, arch, docker_suffix)
@ -156,6 +164,8 @@ class PythonDistribTest(object):
self.arch = arch self.arch = arch
self.docker_suffix = docker_suffix self.docker_suffix = docker_suffix
self.labels = ['distribtest', 'python', platform, arch, docker_suffix] self.labels = ['distribtest', 'python', platform, arch, docker_suffix]
if presubmit:
self.labels.append('presubmit')
def pre_build_jobspecs(self): def pre_build_jobspecs(self):
return [] return []
@ -191,7 +201,8 @@ class RubyDistribTest(object):
arch, arch,
docker_suffix, docker_suffix,
ruby_version=None, ruby_version=None,
source=False): source=False,
presubmit=False):
self.package_type = 'binary' self.package_type = 'binary'
if source: if source:
self.package_type = 'source' self.package_type = 'source'
@ -203,6 +214,8 @@ class RubyDistribTest(object):
self.docker_suffix = docker_suffix self.docker_suffix = docker_suffix
self.ruby_version = ruby_version self.ruby_version = ruby_version
self.labels = ['distribtest', 'ruby', platform, arch, docker_suffix] self.labels = ['distribtest', 'ruby', platform, arch, docker_suffix]
if presubmit:
self.labels.append('presubmit')
def pre_build_jobspecs(self): def pre_build_jobspecs(self):
return [] return []
@ -233,12 +246,14 @@ class RubyDistribTest(object):
class PHP7DistribTest(object): class PHP7DistribTest(object):
"""Tests PHP7 package""" """Tests PHP7 package"""
def __init__(self, platform, arch, docker_suffix=None): def __init__(self, platform, arch, docker_suffix=None, presubmit=False):
self.name = 'php7_%s_%s_%s' % (platform, arch, docker_suffix) self.name = 'php7_%s_%s_%s' % (platform, arch, docker_suffix)
self.platform = platform self.platform = platform
self.arch = arch self.arch = arch
self.docker_suffix = docker_suffix self.docker_suffix = docker_suffix
self.labels = ['distribtest', 'php', 'php7', platform, arch] self.labels = ['distribtest', 'php', 'php7', platform, arch]
if presubmit:
self.labels.append('presubmit')
if docker_suffix: if docker_suffix:
self.labels.append(docker_suffix) self.labels.append(docker_suffix)
@ -269,7 +284,12 @@ class PHP7DistribTest(object):
class CppDistribTest(object): class CppDistribTest(object):
"""Tests Cpp make install by building examples.""" """Tests Cpp make install by building examples."""
def __init__(self, platform, arch, docker_suffix=None, testcase=None): def __init__(self,
platform,
arch,
docker_suffix=None,
testcase=None,
presubmit=False):
if platform == 'linux': if platform == 'linux':
self.name = 'cpp_%s_%s_%s_%s' % (platform, arch, docker_suffix, self.name = 'cpp_%s_%s_%s_%s' % (platform, arch, docker_suffix,
testcase) testcase)
@ -286,6 +306,8 @@ class CppDistribTest(object):
arch, arch,
testcase, testcase,
] ]
if presubmit:
self.labels.append('presubmit')
if docker_suffix: if docker_suffix:
self.labels.append(docker_suffix) self.labels.append(docker_suffix)
@ -318,64 +340,125 @@ def targets():
"""Gets list of supported targets""" """Gets list of supported targets"""
return [ return [
# C++ # C++
CppDistribTest('linux', 'x64', 'jessie', 'cmake_as_submodule'), CppDistribTest('linux',
CppDistribTest('linux', 'x64', 'stretch', 'cmake'), 'x64',
CppDistribTest('linux', 'x64', 'stretch', 'cmake_as_externalproject'), 'jessie',
CppDistribTest('linux', 'x64', 'stretch', 'cmake_fetchcontent'), 'cmake_as_submodule',
CppDistribTest('linux', 'x64', 'stretch', 'cmake_module_install'), presubmit=True),
CppDistribTest('linux', 'x64', 'stretch', CppDistribTest('linux', 'x64', 'stretch', 'cmake', presubmit=True),
'cmake_module_install_pkgconfig'), CppDistribTest('linux',
CppDistribTest('linux', 'x64', 'stretch', 'cmake_pkgconfig'), 'x64',
CppDistribTest('linux', 'x64', 'stretch_aarch64_cross', 'stretch',
'cmake_aarch64_cross'), 'cmake_as_externalproject',
CppDistribTest('windows', 'x86', testcase='cmake'), presubmit=True),
CppDistribTest('windows', 'x86', testcase='cmake_as_externalproject'), CppDistribTest('linux',
'x64',
'stretch',
'cmake_fetchcontent',
presubmit=True),
CppDistribTest('linux',
'x64',
'stretch',
'cmake_module_install',
presubmit=True),
CppDistribTest('linux',
'x64',
'stretch',
'cmake_module_install_pkgconfig',
presubmit=True),
CppDistribTest('linux',
'x64',
'stretch',
'cmake_pkgconfig',
presubmit=True),
CppDistribTest('linux',
'x64',
'stretch_aarch64_cross',
'cmake_aarch64_cross',
presubmit=True),
CppDistribTest('windows', 'x86', testcase='cmake', presubmit=True),
CppDistribTest('windows',
'x86',
testcase='cmake_as_externalproject',
presubmit=True),
# C# # C#
CSharpDistribTest('linux', 'x64', 'jessie'), CSharpDistribTest('linux', 'x64', 'jessie', presubmit=True),
CSharpDistribTest('linux', 'x64', 'stretch'), CSharpDistribTest('linux', 'x64', 'stretch'),
CSharpDistribTest('linux', 'x64', 'stretch', use_dotnet_cli=True), CSharpDistribTest('linux',
'x64',
'stretch',
use_dotnet_cli=True,
presubmit=True),
CSharpDistribTest('linux', 'x64', 'centos7'), CSharpDistribTest('linux', 'x64', 'centos7'),
CSharpDistribTest('linux', 'x64', 'ubuntu1604'), CSharpDistribTest('linux', 'x64', 'ubuntu1604'),
CSharpDistribTest('linux', 'x64', 'ubuntu1604', use_dotnet_cli=True), CSharpDistribTest('linux', 'x64', 'ubuntu1604', use_dotnet_cli=True),
CSharpDistribTest('linux', 'x64', 'alpine', use_dotnet_cli=True), CSharpDistribTest('linux',
CSharpDistribTest('linux', 'x64', 'dotnet31', use_dotnet_cli=True), 'x64',
CSharpDistribTest('linux', 'x64', 'dotnet5', use_dotnet_cli=True), 'alpine',
CSharpDistribTest('macos', 'x64'), use_dotnet_cli=True,
CSharpDistribTest('windows', 'x86'), presubmit=True),
CSharpDistribTest('windows', 'x64'), CSharpDistribTest('linux',
'x64',
'dotnet31',
use_dotnet_cli=True,
presubmit=True),
CSharpDistribTest('linux',
'x64',
'dotnet5',
use_dotnet_cli=True,
presubmit=True),
CSharpDistribTest('macos', 'x64', presubmit=True),
CSharpDistribTest('windows', 'x86', presubmit=True),
CSharpDistribTest('windows', 'x64', presubmit=True),
# Python # Python
PythonDistribTest('linux', 'x64', 'buster'), PythonDistribTest('linux', 'x64', 'buster', presubmit=True),
PythonDistribTest('linux', 'x86', 'buster'), PythonDistribTest('linux', 'x86', 'buster', presubmit=True),
PythonDistribTest('linux', 'x64', 'centos7'), PythonDistribTest('linux', 'x64', 'centos7'),
PythonDistribTest('linux', 'x64', 'fedora34'), PythonDistribTest('linux', 'x64', 'fedora34'),
PythonDistribTest('linux', 'x64', 'opensuse'), PythonDistribTest('linux', 'x64', 'opensuse'),
PythonDistribTest('linux', 'x64', 'arch'), PythonDistribTest('linux', 'x64', 'arch'),
PythonDistribTest('linux', 'x64', 'ubuntu1804'), PythonDistribTest('linux', 'x64', 'ubuntu1804'),
PythonDistribTest('linux', 'aarch64', 'python38_buster'), PythonDistribTest('linux', 'aarch64', 'python38_buster',
PythonDistribTest('linux', 'x64', 'alpine3.7', source=True), presubmit=True),
PythonDistribTest('linux', 'x64', 'buster', source=True), PythonDistribTest('linux',
PythonDistribTest('linux', 'x86', 'buster', source=True), 'x64',
'alpine3.7',
source=True,
presubmit=True),
PythonDistribTest('linux', 'x64', 'buster', source=True,
presubmit=True),
PythonDistribTest('linux', 'x86', 'buster', source=True,
presubmit=True),
PythonDistribTest('linux', 'x64', 'centos7', source=True), PythonDistribTest('linux', 'x64', 'centos7', source=True),
PythonDistribTest('linux', 'x64', 'fedora34', source=True), PythonDistribTest('linux', 'x64', 'fedora34', source=True),
PythonDistribTest('linux', 'x64', 'arch', source=True), PythonDistribTest('linux', 'x64', 'arch', source=True),
PythonDistribTest('linux', 'x64', 'ubuntu1804', source=True), PythonDistribTest('linux', 'x64', 'ubuntu1804', source=True),
# Ruby # Ruby
RubyDistribTest('linux', 'x64', 'jessie', ruby_version='ruby_2_4'), RubyDistribTest('linux',
'x64',
'jessie',
ruby_version='ruby_2_4',
presubmit=True),
RubyDistribTest('linux', 'x64', 'jessie', ruby_version='ruby_2_5'), RubyDistribTest('linux', 'x64', 'jessie', ruby_version='ruby_2_5'),
RubyDistribTest('linux', 'x64', 'jessie', ruby_version='ruby_2_6'), RubyDistribTest('linux', 'x64', 'jessie', ruby_version='ruby_2_6'),
RubyDistribTest('linux', 'x64', 'jessie', ruby_version='ruby_2_7'), RubyDistribTest('linux',
'x64',
'jessie',
ruby_version='ruby_2_7',
presubmit=True),
# TODO(apolcyn): add a ruby 3.0 test once protobuf adds support # TODO(apolcyn): add a ruby 3.0 test once protobuf adds support
RubyDistribTest('linux', RubyDistribTest('linux',
'x64', 'x64',
'jessie', 'jessie',
ruby_version='ruby_2_4', ruby_version='ruby_2_4',
source=True), source=True,
presubmit=True),
RubyDistribTest('linux', 'x64', 'centos7'), RubyDistribTest('linux', 'x64', 'centos7'),
RubyDistribTest('linux', 'x64', 'fedora23'), RubyDistribTest('linux', 'x64', 'fedora23'),
RubyDistribTest('linux', 'x64', 'opensuse'), RubyDistribTest('linux', 'x64', 'opensuse'),
RubyDistribTest('linux', 'x64', 'ubuntu1604'), RubyDistribTest('linux', 'x64', 'ubuntu1604'),
RubyDistribTest('linux', 'x64', 'ubuntu1804'), RubyDistribTest('linux', 'x64', 'ubuntu1804', presubmit=True),
# PHP7 # PHP7
PHP7DistribTest('linux', 'x64', 'stretch'), PHP7DistribTest('linux', 'x64', 'stretch', presubmit=True),
PHP7DistribTest('macos', 'x64'), PHP7DistribTest('macos', 'x64', presubmit=True),
] ]

Loading…
Cancel
Save