diff --git a/kokoro/linux/32-bit/build.sh b/kokoro/linux/32-bit/build.sh deleted file mode 100755 index 5966f5c50e..0000000000 --- a/kokoro/linux/32-bit/build.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash -# -# This is the top-level script we give to Kokoro as the entry point for -# running the "pull request 32" project: -# -# This script selects a specific Dockerfile (for building a Docker image) and -# a script to run inside that image. - -set -ex - -# Change to repo root -cd $(dirname $0)/../../.. -GIT_REPO_ROOT=$(pwd) - -CONTAINER_IMAGE=us-docker.pkg.dev/protobuf-build/containers/test/linux/32bit@sha256:6651a299483f7368876db7aed0802ad4ebf038d626d8995ba7df08978ff43210 - -git submodule update --init --recursive -use_bazel.sh 5.1.1 -sudo ./kokoro/common/setup_kokoro_environment.sh -./regenerate_stale_files.sh - -gcloud components update --quiet -gcloud auth configure-docker us-docker.pkg.dev --quiet - -docker run \ - "$@" \ - -v $GIT_REPO_ROOT:/workspace \ - $CONTAINER_IMAGE \ - bash -l "/workspace/kokoro/linux/32-bit/test_php.sh" diff --git a/kokoro/linux/32-bit/common.cfg b/kokoro/linux/32-bit/common.cfg deleted file mode 100644 index 28b66c07c2..0000000000 --- a/kokoro/linux/32-bit/common.cfg +++ /dev/null @@ -1,11 +0,0 @@ -# Config file for running tests in Kokoro - -# Location of the build script in repository -build_file: "protobuf/kokoro/linux/32-bit/build.sh" -timeout_mins: 120 - -action { - define_artifacts { - regex: "**/sponge_log.xml" - } -} diff --git a/kokoro/linux/32-bit/continuous.cfg b/kokoro/linux/32-bit/continuous.cfg deleted file mode 100644 index 8523c22536..0000000000 --- a/kokoro/linux/32-bit/continuous.cfg +++ /dev/null @@ -1 +0,0 @@ -# Keep this file empty! Use common.cfg instead. diff --git a/kokoro/linux/32-bit/presubmit.cfg b/kokoro/linux/32-bit/presubmit.cfg deleted file mode 100644 index 8523c22536..0000000000 --- a/kokoro/linux/32-bit/presubmit.cfg +++ /dev/null @@ -1 +0,0 @@ -# Keep this file empty! Use common.cfg instead. diff --git a/kokoro/linux/32-bit/test_php.sh b/kokoro/linux/32-bit/test_php.sh deleted file mode 100644 index ef973379e6..0000000000 --- a/kokoro/linux/32-bit/test_php.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/bash - -set -eux - -# Change to repo root -cd $(dirname $0)/../../.. - -use_php() { - VERSION=$1 - export PATH=/usr/local/php-${VERSION}/bin:$PATH -} - -build_php() { - use_php $1 - pushd php - rm -rf vendor - php -v - php -m - composer update - composer test - popd -} - -test_php_c() { - pushd php - rm -rf vendor - php -v - php -m - composer update - composer test_c - popd -} - -build_php_c() { - use_php $1 - test_php_c -} - -mkdir -p build -pushd build -cmake .. -DCMAKE_CXX_STANDARD=14 -cmake --build . -- -j20 -ctest --verbose --parallel 20 -export PROTOC=$(pwd)/protoc -popd - -git config --global --add safe.directory "*" - -build_php 7.4 -build_php 8.0 -build_php_c 7.4 -build_php_c 8.0 -build_php_c 7.4-zts -build_php_c 8.0-zts - -# Cleanup after CMake build -rm -rf build diff --git a/kokoro/linux/aarch64/dockcross_helpers/run_dockcross_manylinux2014_aarch64.sh b/kokoro/linux/aarch64/dockcross_helpers/run_dockcross_manylinux2014_aarch64.sh deleted file mode 100755 index 3e8bc4298e..0000000000 --- a/kokoro/linux/aarch64/dockcross_helpers/run_dockcross_manylinux2014_aarch64.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash - -set -ex - -# go to the repo root -cd $(dirname $0)/../../../.. -GIT_REPO_ROOT=`pwd` - -if [[ -t 0 ]]; then - DOCKER_TTY_ARGS="-it" -else - # The input device on kokoro is not a TTY, so -it does not work. - DOCKER_TTY_ARGS= -fi - -# Pin the dockcross image since newer versions of the image break the build -# We use an older version of dockcross image that has gcc4.9.4 because it was built -# before https://github.com/dockcross/dockcross/pull/449 -# Thanks to that, wheel build with this image aren't actually -# compliant with manylinux2014, but only with manylinux_2_24 -PINNED_DOCKCROSS_IMAGE_VERSION=quay.io/pypa/manylinux2014_aarch64:2022-12-10-a8f854a - -# running dockcross image without any arguments generates a wrapper -# scripts that can be used to run commands under the dockcross image -# easily. -# See https://github.com/dockcross/dockcross#usage for details -docker run -v $GIT_REPO_ROOT:/workspace --rm $PINNED_DOCKCROSS_IMAGE_VERSION /bin/bash -c "cd /workspace; git config --global --add safe.directory '*'; $@" diff --git a/kokoro/linux/aarch64/php_build_and_run_tests_with_qemu_aarch64.sh b/kokoro/linux/aarch64/php_build_and_run_tests_with_qemu_aarch64.sh deleted file mode 100755 index bcb3d9dd94..0000000000 --- a/kokoro/linux/aarch64/php_build_and_run_tests_with_qemu_aarch64.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -set -ex - -# Install composer -curl -sS https://getcomposer.org/installer | php -mkdir -p "$HOME/bin" -mv composer.phar "$HOME/bin/composer" -PATH="$HOME/bin:$PATH" - -# go to the repo root -cd $(dirname $0)/../../.. - -cd php - -composer install -composer test -composer test_c diff --git a/kokoro/linux/aarch64/protoc_crosscompile_aarch64.sh b/kokoro/linux/aarch64/protoc_crosscompile_aarch64.sh deleted file mode 100755 index 7f07968d9a..0000000000 --- a/kokoro/linux/aarch64/protoc_crosscompile_aarch64.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash -# -# Builds protobuf C++ with aarch64 crosscompiler. - -set -ex - -cmake -DCMAKE_POSITION_INDEPENDENT_CODE=ON -Dprotobuf_WITH_ZLIB=0 -Dprotobuf_BUILD_TESTS=OFF . -make -j8 diff --git a/kokoro/linux/aarch64/qemu_helpers/prepare_qemu.sh b/kokoro/linux/aarch64/qemu_helpers/prepare_qemu.sh deleted file mode 100755 index f61320222a..0000000000 --- a/kokoro/linux/aarch64/qemu_helpers/prepare_qemu.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash -# -# Setup and configure qemu userspace emulator on kokoro worker so that we can seamlessly emulate processes running -# inside docker containers. - -set -ex - -# show pre-existing qemu registration -cat /proc/sys/fs/binfmt_misc/qemu-aarch64 - -# Kokoro ubuntu1604 workers have already qemu-user and qemu-user-static packages installed, but it's and old version that: -# * prints warning about some syscalls (e.g "qemu: Unsupported syscall: 278") -# * doesn't register with binfmt_misc with the persistent ("F") flag we need (see below) -# -# To overcome the above limitations, we use the https://github.com/multiarch/qemu-user-static -# docker image to provide a new enough version of qemu-user-static and register it with -# the desired binfmt_misc flags. The most important flag we need is "F" (set by "--persistent yes"), -# which allows the qemu-aarch64-static binary to be loaded eagerly at the time of registration with binfmt_misc. -# That way, we can emulate aarch64 binaries running inside docker containers transparently, without needing the emulator -# binary to be accessible from the docker image we're emulating. -# Note that on newer distributions (such as glinux), simply "apt install qemu-user-static" is sufficient -# to install qemu-user-static with the right flags. -docker run --rm --privileged multiarch/qemu-user-static:5.2.0-2 --reset --credential yes --persistent yes - -# Print current qemu reqistration to make sure everything is setup correctly. -cat /proc/sys/fs/binfmt_misc/qemu-aarch64 diff --git a/kokoro/linux/aarch64/ruby_build_and_run_tests_with_qemu_aarch64.sh b/kokoro/linux/aarch64/ruby_build_and_run_tests_with_qemu_aarch64.sh deleted file mode 100755 index dc093bc96a..0000000000 --- a/kokoro/linux/aarch64/ruby_build_and_run_tests_with_qemu_aarch64.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -set -ex - -# go to the repo root -cd $(dirname $0)/../../.. - -gem install bundler - -cd ruby - -bundle -rake -rake clobber_package gem - -# run all the tests -rake test diff --git a/kokoro/linux/aarch64/test_csharp_aarch64.sh b/kokoro/linux/aarch64/test_csharp_aarch64.sh deleted file mode 100755 index cc3bffe04d..0000000000 --- a/kokoro/linux/aarch64/test_csharp_aarch64.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash - -set -ex - -# go to the repo root -cd $(dirname $0)/../../.. - -if [[ -t 0 ]]; then - DOCKER_TTY_ARGS="-it" -else - # The input device on kokoro is not a TTY, so -it does not work. - DOCKER_TTY_ARGS= -fi - -# First, build protobuf C# tests under x86_64 docker image -# Tests are built "dotnet publish" because we want all the dependencies to the copied to the destination directory -# (we want to avoid references to ~/.nuget that won't be available in the subsequent docker run) -CSHARP_BUILD_COMMAND="dotnet publish -c Release -f net60 csharp/src/Google.Protobuf.Test/Google.Protobuf.Test.csproj" -docker run $DOCKER_TTY_ARGS --rm --user "$(id -u):$(id -g)" -e "HOME=/home/fake-user" -e "DOTNET_CLI_TELEMETRY_OPTOUT=true" -e "DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true" -v "$(mktemp -d):/home/fake-user" -v "$(pwd)":/work -w /work mcr.microsoft.com/dotnet/sdk:6.0.100-bullseye-slim bash -c "$CSHARP_BUILD_COMMAND" - -# Use an actual aarch64 docker image to run protobuf C# tests with an emulator. "dotnet vstest" allows -# running tests from a pre-built project. -# * mount the protobuf root as /work to be able to access the crosscompiled files -# * to avoid running the process inside docker as root (which can pollute the workspace with files owned by root), we force -# running under current user's UID and GID. To be able to do that, we need to provide a home directory for the user -# otherwise the UID would be homeless under the docker container and pip install wouldn't work. For simplicity, -# we just run map the user's home to a throwaway temporary directory -CSHARP_TEST_COMMAND="dotnet vstest csharp/src/Google.Protobuf.Test/bin/Release/net60/publish/Google.Protobuf.Test.dll" -docker run $DOCKER_TTY_ARGS --rm --user "$(id -u):$(id -g)" -e "HOME=/home/fake-user" -e "DOTNET_CLI_TELEMETRY_OPTOUT=true" -e "DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true" -v "$(mktemp -d):/home/fake-user" -v "$(pwd)":/work -w /work mcr.microsoft.com/dotnet/sdk:6.0.100-bullseye-slim-arm64v8 bash -c "$CSHARP_TEST_COMMAND" diff --git a/kokoro/linux/aarch64/test_php_aarch64.sh b/kokoro/linux/aarch64/test_php_aarch64.sh deleted file mode 100755 index 3eb8fa45e2..0000000000 --- a/kokoro/linux/aarch64/test_php_aarch64.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash - -set -ex - -# go to the repo root -cd $(dirname $0)/../../.. - -git submodule update --init --recursive - -# there is no php testing docker image readily available, so we build -# our own. It's a aarch64 image, but that's fine since qemu will -# automatically be used to run the commands in the dockerfile. -docker build -t testimage_protobuf_php_arm64v8 kokoro/linux/aarch64/testimage_protobuf_php_arm64v8 - -if [[ -t 0 ]]; then - DOCKER_TTY_ARGS="-it" -else - # The input device on kokoro is not a TTY, so -it does not work. - DOCKER_TTY_ARGS= -fi - -# crosscompile protoc as we will later need it for the php build. -# we build it under the dockcross/manylinux2014-aarch64 image so that the resulting protoc binary is compatible -# with a wide range of linux distros (including any docker images we will use later to build and test php) -kokoro/linux/aarch64/dockcross_helpers/run_dockcross_manylinux2014_aarch64.sh kokoro/linux/aarch64/protoc_crosscompile_aarch64.sh - -# use an actual aarch64 docker image (with a real aarch64 php) to run build & test protobuf php under an emulator -# * mount the protobuf root as /work to be able to access the crosscompiled files -# * to avoid running the process inside docker as root (which can pollute the workspace with files owned by root), we force -# running under current user's UID and GID. To be able to do that, we need to provide a home directory for the user -# otherwise the UID would be homeless under the docker container and pip install wouldn't work. For simplicity, -# we just run map the user's home to a throwaway temporary directory -docker run $DOCKER_TTY_ARGS --rm --user "$(id -u):$(id -g)" -e "HOME=/home/fake-user" -v "$(mktemp -d):/home/fake-user" -v "$(pwd)":/work -w /work testimage_protobuf_php_arm64v8 kokoro/linux/aarch64/php_build_and_run_tests_with_qemu_aarch64.sh diff --git a/kokoro/linux/aarch64/test_ruby_aarch64.sh b/kokoro/linux/aarch64/test_ruby_aarch64.sh deleted file mode 100755 index e256e4edcc..0000000000 --- a/kokoro/linux/aarch64/test_ruby_aarch64.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash - -set -ex - -# go to the repo root -cd $(dirname $0)/../../.. - -if [[ -t 0 ]]; then - DOCKER_TTY_ARGS="-it" -else - # The input device on kokoro is not a TTY, so -it does not work. - DOCKER_TTY_ARGS= -fi - -# crosscompile protoc as we will later need it for the ruby build. -# we build it under the dockcross/manylinux2014-aarch64 image so that the resulting protoc binary is compatible -# with a wide range of linux distros (including any docker images we will use later to build and test ruby) -kokoro/linux/aarch64/dockcross_helpers/run_dockcross_manylinux2014_aarch64.sh kokoro/linux/aarch64/protoc_crosscompile_aarch64.sh - -# use an actual aarch64 docker image (with a real aarch64 ruby) to run build & test protobuf ruby under an emulator -# * mount the protobuf root as /work to be able to access the crosscompiled files -# * to avoid running the process inside docker as root (which can pollute the workspace with files owned by root), we force -# running under current user's UID and GID. To be able to do that, we need to provide a home directory for the user -# otherwise the UID would be homeless under the docker container and pip install wouldn't work. For simplicity, -# we just run map the user's home to a throwaway temporary directory - -docker run $DOCKER_TTY_ARGS --rm --user "$(id -u):$(id -g)" -e "HOME=/home/fake-user" -e "PROTOC=/work/protoc" -v "$(mktemp -d):/home/fake-user" -v "$(pwd)":/work -w /work arm64v8/ruby:2.7.3-buster kokoro/linux/aarch64/ruby_build_and_run_tests_with_qemu_aarch64.sh diff --git a/kokoro/linux/aarch64/testimage_protobuf_php_arm64v8/Dockerfile b/kokoro/linux/aarch64/testimage_protobuf_php_arm64v8/Dockerfile deleted file mode 100644 index eae1bbc4bd..0000000000 --- a/kokoro/linux/aarch64/testimage_protobuf_php_arm64v8/Dockerfile +++ /dev/null @@ -1,3 +0,0 @@ -FROM arm64v8/debian:buster - -RUN apt-get update && apt-get install -y php7.3-cli php7.3-dev php7.3-bcmath composer phpunit curl git valgrind && apt-get clean diff --git a/kokoro/linux/csharp_aarch64/build.sh b/kokoro/linux/csharp_aarch64/build.sh deleted file mode 100755 index 2b8321f648..0000000000 --- a/kokoro/linux/csharp_aarch64/build.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash -# -# This is the top-level script we give to Kokoro as the entry point for -# running the "continuous" and "presubmit" jobs. - -set -ex - -# Change to repo root -cd $(dirname $0)/../../.. - -# Initialize any submodules and regenerate files -git submodule update --init --recursive -use_bazel.sh 5.1.1 -sudo ./kokoro/common/setup_kokoro_environment.sh -./regenerate_stale_files.sh - -kokoro/linux/aarch64/qemu_helpers/prepare_qemu.sh - -kokoro/linux/aarch64/test_csharp_aarch64.sh diff --git a/kokoro/linux/csharp_aarch64/common.cfg b/kokoro/linux/csharp_aarch64/common.cfg deleted file mode 100644 index df28ef368f..0000000000 --- a/kokoro/linux/csharp_aarch64/common.cfg +++ /dev/null @@ -1,11 +0,0 @@ -# Config file for running tests in Kokoro - -# Location of the build script in repository -build_file: "protobuf/kokoro/linux/csharp_aarch64/build.sh" -timeout_mins: 120 - -action { - define_artifacts { - regex: "**/sponge_log.xml" - } -} diff --git a/kokoro/linux/csharp_aarch64/continuous.cfg b/kokoro/linux/csharp_aarch64/continuous.cfg deleted file mode 100644 index 8523c22536..0000000000 --- a/kokoro/linux/csharp_aarch64/continuous.cfg +++ /dev/null @@ -1 +0,0 @@ -# Keep this file empty! Use common.cfg instead. diff --git a/kokoro/linux/csharp_aarch64/presubmit.cfg b/kokoro/linux/csharp_aarch64/presubmit.cfg deleted file mode 100644 index 8523c22536..0000000000 --- a/kokoro/linux/csharp_aarch64/presubmit.cfg +++ /dev/null @@ -1 +0,0 @@ -# Keep this file empty! Use common.cfg instead. diff --git a/kokoro/linux/php_aarch64/build.sh b/kokoro/linux/php_aarch64/build.sh deleted file mode 100755 index bc2d60ea18..0000000000 --- a/kokoro/linux/php_aarch64/build.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash -# -# This is the top-level script we give to Kokoro as the entry point for -# running the "continuous" and "presubmit" jobs. - -set -ex - -# Change to repo root -cd $(dirname $0)/../../.. - -# Initialize any submodules and regenerate files. -git submodule update --init --recursive -use_bazel.sh 5.1.1 -sudo ./kokoro/common/setup_kokoro_environment.sh -./regenerate_stale_files.sh - -kokoro/linux/aarch64/qemu_helpers/prepare_qemu.sh - -kokoro/linux/aarch64/test_php_aarch64.sh diff --git a/kokoro/linux/php_aarch64/common.cfg b/kokoro/linux/php_aarch64/common.cfg deleted file mode 100644 index ff20682dfb..0000000000 --- a/kokoro/linux/php_aarch64/common.cfg +++ /dev/null @@ -1,11 +0,0 @@ -# Config file for running tests in Kokoro - -# Location of the build script in repository -build_file: "protobuf/kokoro/linux/php_aarch64/build.sh" -timeout_mins: 120 - -action { - define_artifacts { - regex: "**/sponge_log.xml" - } -} diff --git a/kokoro/linux/php_aarch64/continuous.cfg b/kokoro/linux/php_aarch64/continuous.cfg deleted file mode 100644 index 8523c22536..0000000000 --- a/kokoro/linux/php_aarch64/continuous.cfg +++ /dev/null @@ -1 +0,0 @@ -# Keep this file empty! Use common.cfg instead. diff --git a/kokoro/linux/php_aarch64/presubmit.cfg b/kokoro/linux/php_aarch64/presubmit.cfg deleted file mode 100644 index 8523c22536..0000000000 --- a/kokoro/linux/php_aarch64/presubmit.cfg +++ /dev/null @@ -1 +0,0 @@ -# Keep this file empty! Use common.cfg instead. diff --git a/kokoro/linux/ruby_aarch64/build.sh b/kokoro/linux/ruby_aarch64/build.sh deleted file mode 100755 index 5306c03013..0000000000 --- a/kokoro/linux/ruby_aarch64/build.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash -# -# This is the top-level script we give to Kokoro as the entry point for -# running the "continuous" and "presubmit" jobs. - -set -ex - -# Change to repo root -cd $(dirname $0)/../../.. - -# Initialize any submodules and regenerate files. -git submodule update --init --recursive -use_bazel.sh 5.1.1 -sudo ./kokoro/common/setup_kokoro_environment.sh -./regenerate_stale_files.sh - -kokoro/linux/aarch64/qemu_helpers/prepare_qemu.sh - -kokoro/linux/aarch64/test_ruby_aarch64.sh diff --git a/kokoro/linux/ruby_aarch64/common.cfg b/kokoro/linux/ruby_aarch64/common.cfg deleted file mode 100644 index ae82696404..0000000000 --- a/kokoro/linux/ruby_aarch64/common.cfg +++ /dev/null @@ -1,11 +0,0 @@ -# Config file for running tests in Kokoro - -# Location of the build script in repository -build_file: "protobuf/kokoro/linux/ruby_aarch64/build.sh" -timeout_mins: 120 - -action { - define_artifacts { - regex: "**/sponge_log.xml" - } -} diff --git a/kokoro/linux/ruby_aarch64/continuous.cfg b/kokoro/linux/ruby_aarch64/continuous.cfg deleted file mode 100644 index 8523c22536..0000000000 --- a/kokoro/linux/ruby_aarch64/continuous.cfg +++ /dev/null @@ -1 +0,0 @@ -# Keep this file empty! Use common.cfg instead. diff --git a/kokoro/linux/ruby_aarch64/presubmit.cfg b/kokoro/linux/ruby_aarch64/presubmit.cfg deleted file mode 100644 index 8523c22536..0000000000 --- a/kokoro/linux/ruby_aarch64/presubmit.cfg +++ /dev/null @@ -1 +0,0 @@ -# Keep this file empty! Use common.cfg instead.