Fix broken staleness GHA jobs.

This separates kokoro setup from the stale file regeneration process.

PiperOrigin-RevId: 496985475
pull/11383/head
Mike Kruskal 2 years ago committed by Copybara-Service
parent 04c02340d1
commit be0b7e696d
  1. 11
      kokoro/common/setup_kokoro_environment.sh
  2. 1
      kokoro/linux/32-bit/build.sh
  3. 1
      kokoro/linux/cmake/build.sh
  4. 1
      kokoro/linux/cmake_install/build.sh
  5. 1
      kokoro/linux/cmake_ninja/build.sh
  6. 1
      kokoro/linux/cmake_shared/build.sh
  7. 1
      kokoro/linux/csharp_aarch64/build.sh
  8. 9
      kokoro/linux/java_linkage_monitor/build.sh
  9. 1
      kokoro/linux/php_aarch64/build.sh
  10. 1
      kokoro/linux/ruby_aarch64/build.sh
  11. 3
      kokoro/macos-next/cpp/build.sh
  12. 8
      regenerate_stale_files.sh

@ -0,0 +1,11 @@
#!/bin/bash
set -eux
# Upgrade to a supported gcc version
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get -y update && \
sudo apt-get install --no-install-recommends -y --fix-missing --option Acquire::Retries=10 --option Acquire::http::Timeout="1800" \
gcc-7 g++-7
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 100 --slave /usr/bin/g++ g++ /usr/bin/g++-7
sudo update-alternatives --set gcc /usr/bin/gcc-7

@ -16,6 +16,7 @@ CONTAINER_IMAGE=gcr.io/protobuf-build/php/32bit@sha256:8c3cf171ac8a3f91296517d82
git submodule update --init --recursive
use_bazel.sh 5.1.1
sudo ./kokoro/common/setup_kokoro_environment.sh
./regenerate_stale_files.sh
docker run \

@ -13,6 +13,7 @@ CONTAINER_IMAGE=gcr.io/protobuf-build/cmake/linux@sha256:79e6ed9d7f3f8e56167a330
# Update git 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
tmpfile=$(mktemp -u)

@ -13,6 +13,7 @@ CONTAINER_IMAGE=gcr.io/protobuf-build/cmake/linux@sha256:79e6ed9d7f3f8e56167a330
# Update git 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
tmpfile=$(mktemp -u)

@ -13,6 +13,7 @@ CONTAINER_IMAGE=gcr.io/protobuf-build/cmake/linux@sha256:79e6ed9d7f3f8e56167a330
# Update git 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
tmpfile=$(mktemp -u)

@ -13,6 +13,7 @@ CONTAINER_IMAGE=gcr.io/protobuf-build/cmake/linux@sha256:79e6ed9d7f3f8e56167a330
# Update git 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
tmpfile=$(mktemp -u)

@ -11,6 +11,7 @@ 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

@ -10,17 +10,10 @@ set -eux
use_bazel.sh 4.2.2
# Upgrade to a supported gcc version
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get -y update && \
sudo apt-get install -y \
gcc-7 g++-7
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 100 --slave /usr/bin/g++ g++ /usr/bin/g++-7
sudo update-alternatives --set gcc /usr/bin/gcc-7
# Change to repo root
cd $(dirname $0)/../../..
sudo ./kokoro/common/setup_kokoro_environment.sh
bazel build //:protoc
# The java build setup expects protoc in the root directory.

@ -11,6 +11,7 @@ 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

@ -11,6 +11,7 @@ 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

@ -22,8 +22,7 @@ cd $(dirname $0)/../../..
# Update submodules and regenerate files
#
git submodule update --init --recursive
bazel test //src:cmake_lists_staleness_test || ./bazel-bin/src/cmake_lists_staleness_test --fix
bazel test //src/google/protobuf:well_known_types_staleness_test || ./bazel-bin/src/google/protobuf/well_known_types_staleness_test --fix
./regenerate_stale_files.sh
#
# Run build

@ -8,14 +8,6 @@ set -ex
# Cd to the repo root.
cd $(dirname -- "$0")
# Upgrade to a supported gcc version
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get -y update && \
sudo apt-get install -y \
gcc-7 g++-7
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 100 --slave /usr/bin/g++ g++ /usr/bin/g++-7
sudo update-alternatives --set gcc /usr/bin/gcc-7
# Run and fix all staleness tests.
bazel test //src:cmake_lists_staleness_test || ./bazel-bin/src/cmake_lists_staleness_test --fix
bazel test //src/google/protobuf:well_known_types_staleness_test || ./bazel-bin/src/google/protobuf/well_known_types_staleness_test --fix

Loading…
Cancel
Save