Skip to content

Commit

Permalink
Upgrade to protobuf v27.2
Browse files Browse the repository at this point in the history
Co-authored-by: Daniele Guarascio <[email protected]>
  • Loading branch information
benesch and Guara92 committed Jul 22, 2024
1 parent 95b1efd commit 4e20544
Show file tree
Hide file tree
Showing 1,030 changed files with 88,538 additions and 24,061 deletions.
2 changes: 2 additions & 0 deletions protobuf-src/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ Versioning].

## [Unreleased] <!-- #release:date -->

* Upgrade to libprotobuf v27.2.

## [2.0.1] - 2024-05-23

* Fix build on systems where CMake prefers to install libraries to a directory
Expand Down
2 changes: 2 additions & 0 deletions protobuf-src/protobuf/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,5 @@ common --noenable_bzlmod
# Important: this flag ensures that we remain compliant with the C++ layering
# check.
build --features=layering_check

common --repo_env=BAZEL_NO_APPLE_CPP_TOOLCHAIN=1
8 changes: 8 additions & 0 deletions protobuf-src/protobuf/.bcr/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Bazel Central Registry

When protobuf is released, we want it to be published to the Bazel Central
Registry automatically: <https://registry.bazel.build>

This folder contains configuration files to automate the publish step. See
<https://github.com/bazel-contrib/publish-to-bcr/blob/main/templates/README.md>
for authoritative documentation about these files.
23 changes: 23 additions & 0 deletions protobuf-src/protobuf/.bcr/metadata.template.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"homepage": "https://github.com/protocolbuffers/protobuf",
"maintainers": [
{
"email": "[email protected]",
"github": "zhangskz",
"name": "Sandy Zhang"
},
{
"email": "[email protected]",
"github": "mkruskal-google",
"name": "Mike Kruskal"
},
{
"email": "[email protected]",
"github": "googleberg",
"name": "Jerry Berg"
}
],
"repository": ["github:protocolbuffers/protobuf"],
"versions": [],
"yanked_versions": {}
}
35 changes: 35 additions & 0 deletions protobuf-src/protobuf/.bcr/presubmit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
matrix:
platform: ["debian10", "macos", "ubuntu2004", "windows"]
bazel: [6.x, 7.x]

tasks:
verify_targets:
name: "Verify build targets"
platform: ${{ platform }}
bazel: ${{ bazel }}
build_flags:
- '--host_cxxopt=-std=c++14'
- '--cxxopt=-std=c++14'
build_targets:
- '@protobuf//:protobuf'
- '@protobuf//:protobuf_lite'
- '@protobuf//:protoc'
- '@protobuf//:test_messages_proto2_cc_proto'
- '@protobuf//:test_messages_proto3_cc_proto'

bcr_test_module:
module_path: "examples"
matrix:

platform: ["debian10", "macos", "ubuntu2004", "windows"]
bazel: [6.x, 7.x]
tasks:
run_test_module:
name: "Run test module"
platform: ${{ platform }}
bazel: ${{ bazel }}
build_flags:
- '--host_cxxopt=-std=c++14'
- '--cxxopt=-std=c++14'
build_targets:
- "//..."
5 changes: 5 additions & 0 deletions protobuf-src/protobuf/.bcr/source.template.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"integrity": "**leave this alone**",
"strip_prefix": "{REPO}-{VERSION}",
"url": "https://github.com/{OWNER}/{REPO}/releases/download/{TAG}/{REPO}-{VERSION}.zip"
}
28 changes: 24 additions & 4 deletions protobuf-src/protobuf/.github/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,38 @@
# When updating, also ensure the "xcode_destination" entries in
# `.github/workflows/test_objectivec.yml` are supported for the given versions
# of Xcode.
xcode_version(
name = "version15_2_15C500b",
aliases = [
"15C500b",
"15.2",
],
default_ios_sdk_version = "17.2",
default_macos_sdk_version = "14.2",
default_tvos_sdk_version = "17.2",
default_watchos_sdk_version = "10.2",
version = "15.2.0.15C500b",
)

xcode_version(
name = "version14_2_14C18",
aliases = ["14C18"],
aliases = [
"14C18",
"14.2",
],
default_ios_sdk_version = "16.2",
default_macos_sdk_version = "13.1",
default_tvos_sdk_version = "16.1",
default_watchos_sdk_version = "9.1",
version = "14.2.14C18",
version = "14.2.0.14C18",
)

xcode_version(
name = "version14_1_0_14B47b",
aliases = ["14B47b"],
aliases = [
"14B47b",
"14.1",
],
default_ios_sdk_version = "16.1",
default_macos_sdk_version = "13.0",
default_tvos_sdk_version = "16.1",
Expand All @@ -26,8 +45,9 @@ xcode_version(

xcode_config(
name = "host_xcodes",
default = ":version14_1_0_14B47b",
default = ":version14_2_14C18",
versions = [
":version15_2_15C500b",
":version14_2_14C18",
":version14_1_0_14B47b",
],
Expand Down
6 changes: 3 additions & 3 deletions protobuf-src/protobuf/.github/workflows/staleness_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ jobs:
strategy:
fail-fast: false
matrix:
branch: [main, 22.x, 23.x, 24.x, 25.x]
branch: [main, 22.x, 23.x, 24.x, 25.x, 26.x]
os: [{ name: Linux, value: ubuntu-latest}]

name: Test staleness ${{ matrix.os.name }} ${{ github.head_ref && 'PR' || matrix.branch }}
runs-on: ${{ matrix.os.value }}
if: ${{ github.event.repository.full_name == 'protocolbuffers/protobuf' }}
steps:
- name: Checkout ${{ github.head_ref && 'PR' || matrix.branch }}
uses: protocolbuffers/protobuf-ci/checkout@v2
uses: protocolbuffers/protobuf-ci/checkout@v3
with:
ref: ${{ inputs.safe-checkout || github.head_ref || matrix.branch }}

Expand All @@ -49,7 +49,7 @@ jobs:
# In branches where automatic updates work as post-submits, we don't want to run staleness
# tests along with user changes. Any stale files will be automatically fixed in a follow-up
# commit.
uses: protocolbuffers/protobuf-ci/bazel@v2
uses: protocolbuffers/protobuf-ci/bazel@v3
with:
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
bazel-cache: staleness
Expand Down
54 changes: 54 additions & 0 deletions protobuf-src/protobuf/.github/workflows/test_bazel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Bazel Tests

on:
workflow_call:
inputs:
safe-checkout:
required: true
description: "The SHA key for the commit we want to run over"
type: string

permissions:
contents: read

jobs:
examples:
strategy:
fail-fast: false
matrix:
runner: [ ubuntu, windows, macos ]
bazelversion: [ '7.1.1' ]
bzlmod: [true, false ]
include:
- runner: ubuntu
bazelversion: '6.4.0'
bzlmod: true
- runner: ubuntu
bazelversion: '6.4.0'
bzlmod: false
runs-on: ${{ matrix.runner }}-latest
name: Examples ${{ matrix.runner }} ${{ matrix.bazelversion }}${{ matrix.bzlmod && ' (bzlmod)' || '' }}
steps:
- name: Checkout pending changes
uses: protocolbuffers/protobuf-ci/checkout@v3
with:
ref: ${{ inputs.safe-checkout }}

- name: Windows startup flags
if: runner.os == 'Windows'
working-directory: examples
shell: bash
run: echo "startup --output_user_root=C:/ --windows_enable_symlinks" >> .bazelrc

- name: Configure Bazel version
working-directory: examples
shell: bash
run: echo "${{ matrix.bazelversion }}" > .bazelversion

- name: Run tests
uses: protocolbuffers/protobuf-ci/bazel@v3
with:
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
bazel-cache: examples
version: ${{ matrix.bazelversion }}
bash: cd examples && bazel build //... $BAZEL_FLAGS --enable_bzlmod=${{ matrix.bzlmod }}
Loading

0 comments on commit 4e20544

Please sign in to comment.