Skip to content

Commit

Permalink
upgrade test images to bazel 6.4
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 644466391
  • Loading branch information
protobuf-github-bot authored and copybara-github committed Jul 12, 2024
1 parent 1b6869e commit be9d5d0
Show file tree
Hide file tree
Showing 20 changed files with 253 additions and 183 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test_bazel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
fail-fast: false
matrix:
runner: [ ubuntu, windows, macos ]
bazelversion: [ '7.1.2' ]
bazelversion: [ '6.4.0' ]
bzlmod: [true, false ]
include:
- runner: ubuntu
Expand Down Expand Up @@ -46,7 +46,7 @@ jobs:
run: echo "${{ matrix.bazelversion }}" > .bazelversion

- name: Run tests
uses: protocolbuffers/protobuf-ci/bazel@v3
uses: protocolbuffers/protobuf-ci/bazel@b7-test
with:
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
bazel-cache: examples
Expand Down
102 changes: 72 additions & 30 deletions .github/workflows/test_cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
strategy:
fail-fast: false # Don't cancel all jobs if one fails.
matrix:
bazel-version: ['6.4.0']
config:
- { name: Optimized, flags: --config=opt }
- { name: Debug, flags: --config=dbg }
Expand All @@ -26,19 +27,19 @@ jobs:
- { name: No-RTTI, flags: --cxxopt=-fno-rtti }
include:
# Set defaults
- image: us-docker.pkg.dev/protobuf-build/containers/test/linux/sanitize@sha256:3d959f731dc5c54af4865c31ee2bd581ec40028adcdf4c038f3122581f595191
- image: us-docker.pkg.dev/protobuf-build/containers/test/linux/sanitize:6.4.0-27cf7b86212020d7e552bc13b1e084abb971da75
- targets: //pkg/... //src/... @com_google_protobuf_examples//... //third_party/utf8_range/...

# Override cases with custom images
- config: { name: "Bazel7" }
image: "us-docker.pkg.dev/protobuf-build/containers/common/linux/bazel:7.1.2-cf84e92285ca133b9c8104ad7b14d70e953cbb8e"
image: "us-docker.pkg.dev/protobuf-build/containers/common/linux/bazel:6.4.0-cf84e92285ca133b9c8104ad7b14d70e953cbb8e"
targets: "//src/... //third_party/utf8_range/..."
- config: { name: "TCMalloc" }
image: "us-docker.pkg.dev/protobuf-build/containers/test/linux/tcmalloc@sha256:1c5133455481f4d1bb8afa477029604f41f1a3c46cebe4d9958cf1af95b5c87c"
image: "us-docker.pkg.dev/protobuf-build/containers/test/linux/tcmalloc:6.4.0-27cf7b86212020d7e552bc13b1e084abb971da75
targets: "//src/... //third_party/utf8_range/..."
- config: { name: "aarch64" }
targets: "//src/... //src/google/protobuf/compiler:protoc_aarch64_test //third_party/utf8_range/..."
image: "us-docker.pkg.dev/protobuf-build/containers/test/linux/emulation:6.3.0-aarch64-68e662b3a56b881804dc4e9d45f949791cbc4b94"
image: "us-docker.pkg.dev/protobuf-build/containers/test/linux/emulation:6.4.0-aarch64-08714ed7a713068c8418003a2d95f423d4b1eac9"
name: Linux ${{ matrix.config.name }}
runs-on: ${{ matrix.config.runner || 'ubuntu-latest' }}
steps:
Expand All @@ -58,6 +59,7 @@ jobs:
strategy:
fail-fast: false # Don't cancel all jobs if one fails.
matrix:
bazel-version: ['6.4.0']
version: ['9.5', '13.1']
name: Linux GCC ${{ matrix.version }}
runs-on: ubuntu-latest
Expand All @@ -69,7 +71,7 @@ jobs:
- name: Run tests
uses: protocolbuffers/protobuf-ci/bazel-docker@v3
with:
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/gcc:${{ matrix.version }}-6.3.0-63dd26c0c7a808d92673a3e52e848189d4ab0f17
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/gcc:${{ matrix.bazel-version }}-${{ matrix.version }}-27cf7b86212020d7e552bc13b1e084abb971da75
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
bazel-cache: cpp_linux/gcc-${{ matrix.version }}
bazel: test //pkg/... //src/... @com_google_protobuf_examples//... //third_party/utf8_range/...
Expand All @@ -79,6 +81,7 @@ jobs:
fail-fast: false # Don't cancel all jobs if one fails.
matrix:
arch: [x86_64, aarch64]
bazel-version: ['6.4.0']
name: Linux Release ${{ matrix.arch}}
runs-on: ubuntu-20-4core
steps:
Expand All @@ -91,7 +94,7 @@ jobs:
id: cross-compile
uses: protocolbuffers/protobuf-ci/cross-compile-protoc@v3
with:
image: us-docker.pkg.dev/protobuf-build/containers/common/linux/bazel:6.3.0-91a0ac83e968068672bc6001a4d474cfd9a50f1d
image: us-docker.pkg.dev/protobuf-build/containers/common/linux/bazel:${{ matrix.bazel-version }}-cf84e92285ca133b9c8104ad7b14d70e953cbb8e
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
architecture: linux-${{ matrix.arch }}
- name: Setup sccache
Expand All @@ -100,9 +103,11 @@ jobs:
cache-prefix: linux-release-${{ matrix.arch }}
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
- name: Run tests
uses: protocolbuffers/protobuf-ci/docker@v3
uses: protocolbuffers/protobuf-ci/docker@b7-test
with:
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/emulation:${{ matrix.arch }}-384d5abe83a791c6b1ce04f5d7bc0b1f84a30d38
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/emulation:${{ matrix.bazel-version }}-${{ matrix.arch }}-08714ed7a713068c8418003a2d95f423d4b1eac9
staleness-image: us-docker.pkg.dev/protobuf-build/containers/common/linux/bazel:${{ matrix.bazel-version }}-cf84e92285ca133b9c8104ad7b14d70e953cbb8e
bazel-version: ${{ matrix.bazel-version }}
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
entrypoint: bash
command: >
Expand All @@ -119,6 +124,7 @@ jobs:
strategy:
fail-fast: false # Don't cancel all jobs if one fails.
matrix:
bazel-version: ['6.4.0']
include:
- flags: -Dprotobuf_BUILD_EXAMPLES=ON -DCMAKE_CXX_STANDARD=14
- name: Ninja
Expand Down Expand Up @@ -146,16 +152,22 @@ jobs:
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}

- name: Run tests
uses: protocolbuffers/protobuf-ci/docker@v3
uses: protocolbuffers/protobuf-ci/docker@b7-test
with:
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/cmake:3.13.3-63dd26c0c7a808d92673a3e52e848189d4ab0f17
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/cmake:3.13.3-384d5abe83a791c6b1ce04f5d7bc0b1f84a30d38
staleness-image: us-docker.pkg.dev/protobuf-build/containers/common/linux/bazel:${{ matrix.bazel-version }}-cf84e92285ca133b9c8104ad7b14d70e953cbb8e
bazel-version: ${{ matrix.bazel-version }}
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
command: >-
/test.sh ${{ matrix.flags}} ${{ env.SCCACHE_CMAKE_FLAGS }}
-Dprotobuf_BUILD_TESTS=ON -Dprotobuf_USE_EXTERNAL_GTEST=ON
-Dprotobuf_ABSL_PROVIDER=package
linux-cmake-install:
strategy:
fail-fast: false # Don't cancel all jobs if one fails.
matrix:
bazel-version: ['6.4.0']
name: Linux CMake Install
runs-on: ubuntu-latest
steps:
Expand All @@ -172,9 +184,11 @@ jobs:
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}

- name: Run tests
uses: protocolbuffers/protobuf-ci/docker@v3
uses: protocolbuffers/protobuf-ci/docker@b7-test
with:
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/cmake:3.13.3-63dd26c0c7a808d92673a3e52e848189d4ab0f17
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/cmake:3.13.3-384d5abe83a791c6b1ce04f5d7bc0b1f84a30d38
staleness-image: us-docker.pkg.dev/protobuf-build/containers/common/linux/bazel:${{ matrix.bazel-version }}-cf84e92285ca133b9c8104ad7b14d70e953cbb8e
bazel-version: ${{ matrix.bazel-version }}
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
command: >-
/install.sh -DCMAKE_CXX_STANDARD=14 ${{ env.SCCACHE_CMAKE_FLAGS }}
Expand All @@ -189,6 +203,10 @@ jobs:
-Dprotobuf_USE_EXTERNAL_GTEST=ON -Dprotobuf_ABSL_PROVIDER=package
linux-cmake-examples:
strategy:
fail-fast: false # Don't cancel all jobs if one fails.
matrix:
bazel-version: ['6.4.0']
name: Linux CMake Examples
runs-on: ubuntu-latest
steps:
Expand All @@ -204,9 +222,11 @@ jobs:
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}

- name: Run tests
uses: protocolbuffers/protobuf-ci/docker@v3
uses: protocolbuffers/protobuf-ci/docker@b7-test
with:
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/cmake:3.13.3-63dd26c0c7a808d92673a3e52e848189d4ab0f17
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/cmake:3.13.3-384d5abe83a791c6b1ce04f5d7bc0b1f84a30d38
staleness-image: us-docker.pkg.dev/protobuf-build/containers/common/linux/bazel:${{ matrix.bazel-version }}-cf84e92285ca133b9c8104ad7b14d70e953cbb8e
bazel-version: ${{ matrix.bazel-version }}
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
command: >-
/install.sh -DCMAKE_CXX_STANDARD=14 ${{ env.SCCACHE_CMAKE_FLAGS }}
Expand All @@ -221,6 +241,8 @@ jobs:
strategy:
fail-fast: false # Don't cancel all jobs if one fails.
matrix:
bazel-version: ['6.4.0']
gcc-version: ['12.2']
include:
- name: C++14
flags: -DCMAKE_CXX_STANDARD=14
Expand All @@ -245,9 +267,11 @@ jobs:
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}

- name: Run tests
uses: protocolbuffers/protobuf-ci/docker@v3
uses: protocolbuffers/protobuf-ci/docker@b7-test
with:
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/gcc:12.2-6.3.0-63dd26c0c7a808d92673a3e52e848189d4ab0f17
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/gcc:${{ matrix.bazel-version }}-${{ matrix.gcc-version }}-27cf7b86212020d7e552bc13b1e084abb971da75
staleness-image: us-docker.pkg.dev/protobuf-build/containers/common/linux/bazel:${{ matrix.bazel-version }}-cf84e92285ca133b9c8104ad7b14d70e953cbb8e
bazel-version: ${{ matrix.bazel-version }}
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
entrypoint: bash
command: >-
Expand All @@ -260,6 +284,10 @@ jobs:
sccache -s'
linux-cmake-submodules:
strategy:
fail-fast: false # Don't cancel all jobs if one fails.
matrix:
bazel-version: ['6.4.0']
name: Linux CMake Submodules
runs-on: ubuntu-latest
steps:
Expand All @@ -276,15 +304,21 @@ jobs:
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}

- name: Run tests
uses: protocolbuffers/protobuf-ci/docker@v3
uses: protocolbuffers/protobuf-ci/docker@b7-test
with:
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/cmake:3.13.3-63dd26c0c7a808d92673a3e52e848189d4ab0f17
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/cmake:3.13.3-384d5abe83a791c6b1ce04f5d7bc0b1f84a30d38
staleness-image: us-docker.pkg.dev/protobuf-build/containers/common/linux/bazel:${{ matrix.bazel-version }}-cf84e92285ca133b9c8104ad7b14d70e953cbb8e
bazel-version: ${{ matrix.bazel-version }}
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
command: >-
/test.sh ${{ env.SCCACHE_CMAKE_FLAGS }}
-Dprotobuf_BUILD_CONFORMANCE=ON -Dprotobuf_BUILD_EXAMPLES=ON -DCMAKE_CXX_STANDARD=14
linux-cmake-32-bit:
strategy:
fail-fast: false # Don't cancel all jobs if one fails.
matrix:
bazel-version: ['6.4.0']
name: Linux CMake 32-bit
runs-on: ubuntu-latest
steps:
Expand All @@ -301,9 +335,11 @@ jobs:
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}

- name: Run tests
uses: protocolbuffers/protobuf-ci/docker@v3
uses: protocolbuffers/protobuf-ci/docker@b7-test
with:
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/32bit@sha256:8275360dc5d676f3470872d79087901c0e4153453976bea908a92c82e8d209ea
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/32bit@sha256:429f924aec315704b4233adcbe4b29006116f27769db98acd176b9eb69c31299
staleness-image: us-docker.pkg.dev/protobuf-build/containers/common/linux/bazel:${{ matrix.bazel-version }}-cf84e92285ca133b9c8104ad7b14d70e953cbb8e
bazel-version: ${{ matrix.bazel-version }}
platform: linux/386
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
command: >-
Expand All @@ -322,47 +358,51 @@ jobs:
include:
- name: MacOS Bazel
os: macos-12
cache_key: macos-12
cache_key: macos-12-bazel6
bazel: test //src/... //third_party/utf8_range/...
- name: MacOS Bazel 7
bazel_version: '6.4.0'
- name: MacOS Bazel
os: macos-12
cache_key: macos-12-bazel7
bazel: test //src/... //third_party/utf8_range/...
bazel_version: '7.1.2'
- name: MacOS Apple Silicon (build only) Bazel
os: macos-12
cache_key: macos-12-arm
cache_key: macos-12-arm-bazel6
# Current github runners are all Intel based, so just build/compile
# for Apple Silicon to detect issues there.
bazel: build --cpu=darwin_arm64 //src/... //third_party/utf8_range/...
bazel_version: '6.4.0'
- name: Windows Bazel
os: windows-2022
cache_key: windows-2022
cache_key: windows-2022-bazel6
bazel: test //src/... @com_google_protobuf_examples//... --test_tag_filters=-conformance --build_tag_filters=-conformance
- name: Windows Bazel 7
bazel_version: '6.4.0'
- name: Windows Bazel
os: windows-2022
cache_key: windows-2022-bazel7
bazel: test //src/... @com_google_protobuf_examples//... --test_tag_filters=-conformance --build_tag_filters=-conformance
bazel_version: '7.1.2'
name: ${{ matrix.name }}
name: ${{ matrix.name }} ${{ matrix.bazel_version }}
runs-on: ${{ matrix.os }}
steps:
- name: Checkout pending changes
uses: protocolbuffers/protobuf-ci/checkout@v3
with:
ref: ${{ inputs.safe-checkout }}
- name: Run tests
uses: protocolbuffers/protobuf-ci/bazel@v3
uses: protocolbuffers/protobuf-ci/bazel@b7-test
with:
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
bazel: ${{ matrix.bazel }}
bazel-cache: cpp_${{ matrix.cache_key }}
version: ${{ matrix.bazel_version || '6.3.0' }}
version: ${{ matrix.bazel_version }}

non-linux-cmake:
strategy:
fail-fast: false # Don't cancel all jobs if one fails.
matrix:
bazel-version: ['6.4.0']
include:
# TODO: investigate and fix
# - name: MacOS CMake
Expand Down Expand Up @@ -452,9 +492,10 @@ jobs:
# Install phase.
- name: Configure CMake for install
if: matrix.install-flags
uses: protocolbuffers/protobuf-ci/bash@v3
uses: protocolbuffers/protobuf-ci/bash@b7-test
with:
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
bazel-version: ${{ matrix.bazel-version || '6.4.0' }}
command: cmake . ${{ matrix.install-flags }} ${{ env.SCCACHE_CMAKE_FLAGS }} -Dprotobuf_ALLOW_CCACHE=ON
- name: Build for install
if: matrix.install-flags
Expand All @@ -474,9 +515,10 @@ jobs:
run: cmake --build . --target clean && rm CMakeCache.txt

- name: Configure CMake
uses: protocolbuffers/protobuf-ci/bash@v3
uses: protocolbuffers/protobuf-ci/bash@b7-test
with:
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
bazel-version: ${{ matrix.bazel-version }}
command: cmake . ${{ matrix.flags }} ${{ env.SCCACHE_CMAKE_FLAGS }} -Dprotobuf_ALLOW_CCACHE=ON

- name: Build
Expand Down
Loading

0 comments on commit be9d5d0

Please sign in to comment.