Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport dropped support of Bazel 5 to 24.x #13418

Merged
merged 3 commits into from
Jul 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 28 additions & 32 deletions .github/workflows/test_cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,16 @@ jobs:
- { name: No-RTTI, flags: --cxxopt=-fno-rtti }
include:
# Set defaults
- image: us-docker.pkg.dev/protobuf-build/containers/test/linux/sanitize@sha256:309dae3122031447d714414814d262e5f31cb93c0e248e9c02f9d8cdafd7e3b9
- image: us-docker.pkg.dev/protobuf-build/containers/test/linux/sanitize@sha256:04cd765285bc52cbbf51d66c8c66d8603579cf0f19cc42df26b09d2c270541fb
- targets: //pkg/... //src/... @com_google_protobuf_examples//...

# Override cases with custom images
- config: { name: "TCMalloc" }
image: "us-docker.pkg.dev/protobuf-build/containers/test/linux/tcmalloc@sha256:4df3b4749e787ba0a671ec0b783d0f1ba05f60be4c9e9fd72c875550a0cde1ea"
image: "us-docker.pkg.dev/protobuf-build/containers/test/linux/tcmalloc@sha256:e4493c58e7c3f3a0775e0b19a46bc822e866a5275b7a5463f509af8072f283db"
targets: "//src/..."
- config: { name: "aarch64" }
targets: "//src/... //src/google/protobuf/compiler:protoc_aarch64_test"
image: "us-docker.pkg.dev/protobuf-build/containers/test/linux/emulation:aarch64-3af05275178e16af30961976af126eabbbb2c733"
# TODO(b/278116805) Enable this once Bazel 6 is supported.
#- config: { name: "Bazel6" }
# targets: "//src/..."
# image: "us-docker.pkg.dev/protobuf-build/containers/common/linux/bazel:6.0.0-6361b3a6e5c97e9951d03a4de28542fc45f1adab"
image: "us-docker.pkg.dev/protobuf-build/containers/test/linux/emulation:aarch64-222e7e87028b7098e088f5ca7cae06d32f483eb5"
name: Linux ${{ matrix.config.name }}
runs-on: ubuntu-latest
steps:
Expand All @@ -48,7 +44,7 @@ jobs:
with:
ref: ${{ inputs.safe-checkout }}
- name: Run tests
uses: protocolbuffers/protobuf-ci/bazel-docker@v1
uses: protocolbuffers/protobuf-ci/bazel-docker@v2
with:
image: ${{ matrix.image }}
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
Expand All @@ -68,9 +64,9 @@ jobs:
with:
ref: ${{ inputs.safe-checkout }}
- name: Run tests
uses: protocolbuffers/protobuf-ci/bazel-docker@v1
uses: protocolbuffers/protobuf-ci/bazel-docker@v2
with:
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/gcc:${{ matrix.version }}-5.4.0-2d15d9e888c9e7f90961dbd3afc8ea209717fb4b
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/gcc:${{ matrix.version }}-6.3.0-518b4fcd8d0ded2484c94f02e835526cacfdac2d
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
bazel-cache: cpp_linux/gcc-${{ matrix.version }}
bazel: test //pkg/... //src/... @com_google_protobuf_examples//...
Expand All @@ -90,19 +86,19 @@ jobs:
submodules: recursive
- name: Cross compile protoc for ${{ matrix.arch }}
id: cross-compile
uses: protocolbuffers/protobuf-ci/cross-compile-protoc@v1
uses: protocolbuffers/protobuf-ci/cross-compile-protoc@v2
with:
image: us-docker.pkg.dev/protobuf-build/containers/common/linux/bazel:5.1.1-6361b3a6e5c97e9951d03a4de28542fc45f1adab
image: us-docker.pkg.dev/protobuf-build/containers/common/linux/bazel:6.3.0-91a0ac83e968068672bc6001a4d474cfd9a50f1d
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
architecture: linux-${{ matrix.arch }}
- name: Setup ccache
uses: protocolbuffers/protobuf-ci/ccache@v1
uses: protocolbuffers/protobuf-ci/ccache@v2
with:
cache-prefix: linux-release-${{ matrix.arch }}
- name: Run tests
uses: protocolbuffers/protobuf-ci/docker@v1
uses: protocolbuffers/protobuf-ci/docker@v2
with:
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/emulation:${{ matrix.arch }}-3af05275178e16af30961976af126eabbbb2c733
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/emulation:${{ matrix.arch }}-222e7e87028b7098e088f5ca7cae06d32f483eb5
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
entrypoint: bash
command: >
Expand Down Expand Up @@ -137,12 +133,12 @@ jobs:
ref: ${{ inputs.safe-checkout }}

- name: Setup ccache
uses: protocolbuffers/protobuf-ci/ccache@v1
uses: protocolbuffers/protobuf-ci/ccache@v2
with:
cache-prefix: linux-cmake-${{ matrix.name }}

- name: Run tests
uses: protocolbuffers/protobuf-ci/docker@v1
uses: protocolbuffers/protobuf-ci/docker@v2
with:
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/cmake:3.13.3-e6272cdfe97c6df307e17b83f3a7a70844f6fc08
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
Expand All @@ -162,12 +158,12 @@ jobs:
submodules: recursive

- name: Setup ccache
uses: protocolbuffers/protobuf-ci/ccache@v1
uses: protocolbuffers/protobuf-ci/ccache@v2
with:
cache-prefix: linux-cmake-install

- name: Run tests
uses: protocolbuffers/protobuf-ci/docker@v1
uses: protocolbuffers/protobuf-ci/docker@v2
with:
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/cmake:3.10.3-1da1e086a7d1863b8bdd181ef6388a02dcd62f3a
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
Expand All @@ -191,12 +187,12 @@ jobs:
ref: ${{ inputs.safe-checkout }}

- name: Setup ccache
uses: protocolbuffers/protobuf-ci/ccache@v1
uses: protocolbuffers/protobuf-ci/ccache@v2
with:
cache-prefix: linux-cmake-examples

- name: Run tests
uses: protocolbuffers/protobuf-ci/docker@v1
uses: protocolbuffers/protobuf-ci/docker@v2
with:
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/cmake:3.10.3-1da1e086a7d1863b8bdd181ef6388a02dcd62f3a
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
Expand Down Expand Up @@ -231,14 +227,14 @@ jobs:
submodules: recursive

- name: Setup ccache
uses: protocolbuffers/protobuf-ci/ccache@v1
uses: protocolbuffers/protobuf-ci/ccache@v2
with:
cache-prefix: linux-cmake-gcc-${{ matrix.name }}

- name: Run tests
uses: protocolbuffers/protobuf-ci/docker@v1
uses: protocolbuffers/protobuf-ci/docker@v2
with:
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/gcc:12.2-5.4.0-307caa02808127e49720f3e77d6a9f3b3ef5a915
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/gcc:12.2-6.3.0-518b4fcd8d0ded2484c94f02e835526cacfdac2d
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
entrypoint: bash
command: >-
Expand All @@ -261,12 +257,12 @@ jobs:
submodules: recursive

- name: Setup ccache
uses: protocolbuffers/protobuf-ci/ccache@v1
uses: protocolbuffers/protobuf-ci/ccache@v2
with:
cache-prefix: linux-cmake-${{ matrix.name }}

- name: Run tests
uses: protocolbuffers/protobuf-ci/docker@v1
uses: protocolbuffers/protobuf-ci/docker@v2
with:
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/cmake:3.13.3-1da1e086a7d1863b8bdd181ef6388a02dcd62f3a
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
Expand All @@ -285,12 +281,12 @@ jobs:
submodules: recursive

- name: Setup ccache
uses: protocolbuffers/protobuf-ci/ccache@v1
uses: protocolbuffers/protobuf-ci/ccache@v2
with:
cache-prefix: linux-cmake-32-bit

- name: Run tests
uses: protocolbuffers/protobuf-ci/docker@v1
uses: protocolbuffers/protobuf-ci/docker@v2
with:
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/32bit@sha256:f99f051daa8b12f4ebad5927f389bc71372f771ab080290ab451cbaf1648f9ea
platform: linux/386
Expand Down Expand Up @@ -331,7 +327,7 @@ jobs:
with:
ref: ${{ inputs.safe-checkout }}
- name: Run tests
uses: protocolbuffers/protobuf-ci/bazel@v1
uses: protocolbuffers/protobuf-ci/bazel@v2
with:
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
bazel: ${{ matrix.bazel }}
Expand Down Expand Up @@ -386,15 +382,15 @@ jobs:
submodules: recursive

- name: Setup ccache
uses: protocolbuffers/protobuf-ci/ccache@v1
uses: protocolbuffers/protobuf-ci/ccache@v2
with:
cache-prefix: ${{ matrix.name }}
vsversion: ${{ matrix.vsversion }}

# Install phase.
- name: Configure CMake for install
if: matrix.install-flags
uses: protocolbuffers/protobuf-ci/bash@v1
uses: protocolbuffers/protobuf-ci/bash@v2
with:
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
command: cmake . ${{ matrix.install-flags }} ${{ env.CCACHE_CMAKE_FLAGS }}
Expand All @@ -416,7 +412,7 @@ jobs:
run: cmake --build . --target clean && rm CMakeCache.txt

- name: Configure CMake
uses: protocolbuffers/protobuf-ci/bash@v1
uses: protocolbuffers/protobuf-ci/bash@v2
with:
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
command: cmake . ${{ matrix.flags }} ${{ env.CCACHE_CMAKE_FLAGS }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test_csharp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ jobs:
with:
ref: ${{ inputs.safe-checkout }}
- name: Run tests
uses: protocolbuffers/protobuf-ci/bazel-docker@v1
uses: protocolbuffers/protobuf-ci/bazel-docker@v2
with:
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/csharp:3.1.415-6.0.100-508417e5215994ade7585d28ba3aad681a25fa5d
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/csharp:3.1.415-6.0.100-66964dc8b07b6d1fc73a5cc14e59e84c1c534cea
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
bazel-cache: csharp_linux
bazel: test //csharp/... --action_env=DOTNET_CLI_TELEMETRY_OPTOUT=1 --test_env=DOTNET_CLI_HOME=/home/bazel
Expand Down Expand Up @@ -60,7 +60,7 @@ jobs:
- name: 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)
uses: protocolbuffers/protobuf-ci/docker@v1
uses: protocolbuffers/protobuf-ci/docker@v2
with:
image: mcr.microsoft.com/dotnet/sdk:6.0.100-bullseye-slim
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
Expand All @@ -77,7 +77,7 @@ jobs:
# 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
uses: protocolbuffers/protobuf-ci/docker@v1
uses: protocolbuffers/protobuf-ci/docker@v2
with:
image: mcr.microsoft.com/dotnet/sdk:6.0.100-bullseye-slim-arm64v8
skip-staleness-check: true
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/test_java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@ jobs:
include:
- name: OpenJDK 8
version: '8'
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/java:8-03a376b5d6ef66f827fc307716e3b841cc26b709
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/java:8-1fdbb997433cb22c1e49ef75ad374a8d6bb88702
targets: //java/... //java/internal:java_version
- name: OpenJDK 11
version: '11'
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/java:11-03a376b5d6ef66f827fc307716e3b841cc26b709
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/java:11-1fdbb997433cb22c1e49ef75ad374a8d6bb88702
targets: //java/... //java/internal:java_version
- name: OpenJDK 17
version: '17'
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/java:17-03a376b5d6ef66f827fc307716e3b841cc26b709
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/java:17-1fdbb997433cb22c1e49ef75ad374a8d6bb88702
targets: //java/... //java/internal:java_version
- name: aarch64
version: 'aarch64'
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/emulation:aarch64-3af05275178e16af30961976af126eabbbb2c733
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/emulation:aarch64-222e7e87028b7098e088f5ca7cae06d32f483eb5
targets: //java/... //src/google/protobuf/compiler:protoc_aarch64_test

name: Linux ${{ matrix.name }}
Expand All @@ -42,7 +42,7 @@ jobs:
with:
ref: ${{ inputs.safe-checkout }}
- name: Run tests
uses: protocolbuffers/protobuf-ci/bazel-docker@v1
uses: protocolbuffers/protobuf-ci/bazel-docker@v2
with:
image: ${{ matrix.image }}
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
Expand All @@ -58,9 +58,9 @@ jobs:
with:
ref: ${{ inputs.safe-checkout }}
- name: Run Linkage Monitor test
uses: protocolbuffers/protobuf-ci/bazel-docker@v1
uses: protocolbuffers/protobuf-ci/bazel-docker@v2
with:
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/java:8-03a376b5d6ef66f827fc307716e3b841cc26b709
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/java:8-1fdbb997433cb22c1e49ef75ad374a8d6bb88702
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
bazel-cache: java_linux/8
bazel: test --test_output=all //java:linkage_monitor --spawn_strategy=standalone
Expand All @@ -75,9 +75,9 @@ jobs:
ref: ${{ inputs.safe-checkout }}
- name: Build protoc
id: build-protoc
uses: protocolbuffers/protobuf-ci/cross-compile-protoc@v1
uses: protocolbuffers/protobuf-ci/cross-compile-protoc@v2
with:
image: us-docker.pkg.dev/protobuf-build/containers/common/linux/bazel:5.1.1-6361b3a6e5c97e9951d03a4de28542fc45f1adab
image: us-docker.pkg.dev/protobuf-build/containers/common/linux/bazel:6.3.0-91a0ac83e968068672bc6001a4d474cfd9a50f1d
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
architecture: linux-x86_64
- name: Move protoc into place and clean up
Expand All @@ -89,9 +89,9 @@ jobs:
mvn -e -B -Dhttps.protocols=TLSv1.2 install -Dmaven.test.skip=true
working-directory: java
- name: Generate pom.xml files from the template
uses: protocolbuffers/protobuf-ci/bazel-docker@v1
uses: protocolbuffers/protobuf-ci/bazel-docker@v2
with:
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/java:11-03a376b5d6ef66f827fc307716e3b841cc26b709
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/java:11-1fdbb997433cb22c1e49ef75ad374a8d6bb88702
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
bazel-cache: java_linux/11
# protobuf-java and protobuf-java-util are the member of the BOM
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test_objectivec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ jobs:
ref: ${{ inputs.safe-checkout }}

- name: Setup ccache
uses: protocolbuffers/protobuf-ci/ccache@v1
uses: protocolbuffers/protobuf-ci/ccache@v2
with:
cache-prefix: objectivec_${{ matrix.platform }}_${{ matrix.xc_config }}
support-modules: true

- name: Run tests
uses: protocolbuffers/protobuf-ci/bash@v1
uses: protocolbuffers/protobuf-ci/bash@v2
env:
CC: ${{ github.workspace }}/ci/clang_wrapper
CXX: ${{ github.workspace }}/ci/clang_wrapper++
Expand Down Expand Up @@ -81,7 +81,7 @@ jobs:
with:
ref: ${{ inputs.safe-checkout }}
- name: Pod lib lint
uses: protocolbuffers/protobuf-ci/bash@v1
uses: protocolbuffers/protobuf-ci/bash@v2
with:
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
command: |
Expand Down Expand Up @@ -122,7 +122,7 @@ jobs:
with:
ref: ${{ inputs.safe-checkout }}
- name: bazel ${{ matrix.config.bazel_action }}
uses: protocolbuffers/protobuf-ci/bazel@v1
uses: protocolbuffers/protobuf-ci/bazel@v2
with:
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
bazel: ${{ matrix.config.bazel_action }} ${{ matrix.config.flags }} ${{ matrix.bazel_targets }}
Expand Down
Loading