-
Notifications
You must be signed in to change notification settings - Fork 15.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into add-return-typehint
- Loading branch information
Showing
1,524 changed files
with
130,052 additions
and
73,643 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
# These are fetched as external repositories. | ||
third_party/abseil-cpp | ||
third_party/googletest | ||
_build/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,11 @@ | ||
{ | ||
"homepage": "https://github.com/protocolbuffers/protobuf", | ||
"maintainers": [ | ||
{ | ||
"email": "[email protected]", | ||
"github": "protobuf-team-bot", | ||
"name": "Protobuf Team" | ||
}, | ||
{ | ||
"email": "[email protected]", | ||
"github": "zhangskz", | ||
|
@@ -15,6 +20,78 @@ | |
"email": "[email protected]", | ||
"github": "googleberg", | ||
"name": "Jerry Berg" | ||
}, | ||
{ | ||
"email": "[email protected]", | ||
"github": "acozzette", | ||
"name": "Adam Cozzette", | ||
"do_not_notify": true | ||
}, | ||
{ | ||
"email": "[email protected]", | ||
"github": "deannagarcia", | ||
"name": "Deanna Garcia", | ||
"do_not_notify": true | ||
}, | ||
{ | ||
"email": "[email protected]", | ||
"github": "esrauchg", | ||
"name": "Em Rauch", | ||
"do_not_notify": true | ||
}, | ||
{ | ||
"email": "[email protected]", | ||
"github": "haberman", | ||
"name": "Josh Haberman", | ||
"do_not_notify": true | ||
}, | ||
{ | ||
"email": "[email protected]", | ||
"github": "honglooker", | ||
"name": "Hong Shin", | ||
"do_not_notify": true | ||
}, | ||
{ | ||
"email": "[email protected]", | ||
"github": "JasonLunn", | ||
"name": "Jason Lunn", | ||
"do_not_notify": true | ||
}, | ||
{ | ||
"email": "[email protected]", | ||
"github": "anandolee", | ||
"name": "Jie Luo", | ||
"do_not_notify": true | ||
}, | ||
{ | ||
"email": "[email protected]", | ||
"github": "salo", | ||
"name": "Eric Salo", | ||
"do_not_notify": true | ||
}, | ||
{ | ||
"email": "[email protected]", | ||
"github": "sbenza", | ||
"name": "Samuel Benzaquen", | ||
"do_not_notify": true | ||
}, | ||
{ | ||
"email": "[email protected]", | ||
"github": "shaod2", | ||
"name": "Dennis Shao", | ||
"do_not_notify": true | ||
}, | ||
{ | ||
"email": "[email protected]", | ||
"github": "theodorerose", | ||
"name": "Theodore Rose", | ||
"do_not_notify": true | ||
}, | ||
{ | ||
"email": "[email protected]", | ||
"github": "tonyliaoss", | ||
"name": "Tony Liao", | ||
"do_not_notify": true | ||
} | ||
], | ||
"repository": ["github:protocolbuffers/protobuf"], | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,36 @@ | ||
matrix: | ||
platform: ["debian10", "macos", "ubuntu2004", "windows"] | ||
bazel: [7.x] | ||
|
||
tasks: | ||
verify_targets: | ||
name: "Verify build targets" | ||
platform: ${{ platform }} | ||
bazel: ${{ bazel }} | ||
build_flags: | ||
- '--host_cxxopt=-std=c++17' | ||
- '--cxxopt=-std=c++17' | ||
build_targets: | ||
- '@protobuf//:protobuf' | ||
- '@protobuf//:protobuf_lite' | ||
- '@protobuf//:protobuf_python' | ||
- '@protobuf//:protobuf_java' | ||
- '@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: [7.x] | ||
tasks: | ||
run_test_module: | ||
name: "Run test module" | ||
platform: ${{ platform }} | ||
bazel: ${{ bazel }} | ||
build_flags: | ||
- '--host_cxxopt=-std=c++17' | ||
- '--cxxopt=-std=c++17' | ||
build_targets: | ||
- "//..." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
"""Validate the YAML files for GitHub Actions workflows. | ||
TODO: b/359303016 - convert to use unittest | ||
""" | ||
|
||
import os | ||
import re | ||
|
||
import yaml | ||
|
||
# Ensure every job is in the list of blocking jobs. | ||
with open( | ||
os.path.join(os.path.dirname(__file__), '../workflows/test_runner.yml'), 'r' | ||
) as f: | ||
data = yaml.safe_load(f) | ||
|
||
# List of all YAML files that are used by jobs in the test_runner.yml file. | ||
yaml_files = [] | ||
|
||
# Get a list of all jobs in the test_runner, except for the blocking job and | ||
# the tag removal job, which is not always run. | ||
all_jobs = list(data['jobs'].keys()) | ||
all_jobs.remove('all-blocking-tests') | ||
all_jobs.remove('remove-tag') | ||
|
||
passed = True | ||
blocking_jobs = data['jobs']['all-blocking-tests']['needs'] | ||
|
||
for job in all_jobs: | ||
if 'uses' in data['jobs'][job]: | ||
yaml_files.append( | ||
os.path.join( | ||
os.path.dirname(__file__), | ||
'../workflows', | ||
os.path.basename(data['jobs'][job]['uses']), | ||
) | ||
) | ||
if job not in blocking_jobs: | ||
passed = False | ||
raise ValueError('Job %s is not in the list of blocking jobs.' % job) | ||
|
||
print('PASSED: All jobs are in the list of blocking jobs.') | ||
|
||
# Ensure every job with a continuous prefix conditions every step on whether we | ||
# are in a continuous run. | ||
for file in yaml_files: | ||
with open(file, 'r') as f: | ||
data = yaml.safe_load(f) | ||
jobs = data['jobs'] | ||
for job in jobs: | ||
if 'steps' not in jobs[job]: | ||
continue | ||
continuous_condition = 'inputs.continuous-prefix' in jobs[job]['name'] | ||
steps = jobs[job]['steps'] | ||
for step in steps: | ||
if 'name' in step: | ||
name = step['name'] | ||
elif 'with' in step and 'name' in step['with']: | ||
name = step['with']['name'] | ||
else: | ||
raise ValueError( | ||
'Step in job %s from file %s does not have a name.' % (job, file) | ||
) | ||
if continuous_condition and 'continuous-run' not in step.get('if', ''): | ||
raise ValueError( | ||
'Step %s in job %s from file %s does not check the continuous-run' | ||
' condition' % (name, job, file) | ||
) | ||
if not continuous_condition and 'continuous-run' in step.get('if', ''): | ||
raise ValueError( | ||
'Step %s in job %s from file %s checks the continuous-run' | ||
' condition but the job does not contain the continuous-prefix' | ||
% (name, job, file) | ||
) | ||
print('PASSED: All steps in all jobs check the continuous-run condition.') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
|
||
source googletest.sh || exit 1 | ||
|
||
script=${TEST_SRCDIR}/google3/third_party/protobuf/github/validate_yaml | ||
|
||
$script || die "Failed to execute $script" | ||
|
||
echo "PASS" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.