mirror of
https://github.com/protocolbuffers/protobuf
synced 2026-08-26 02:23:14 -04:00
parent
9f182da9a4
commit
4dc164884c
9 changed files with 52 additions and 40 deletions
2
.github/workflows/test_bazel.yml
vendored
2
.github/workflows/test_bazel.yml
vendored
|
|
@ -17,7 +17,7 @@ jobs:
|
|||
fail-fast: false
|
||||
matrix:
|
||||
runner: [ ubuntu, windows, macos ]
|
||||
bazelversion: [ '7.1.2' ]
|
||||
bazelversion: [ '7.1.1' ]
|
||||
bzlmod: [true, false ]
|
||||
include:
|
||||
- runner: ubuntu
|
||||
|
|
|
|||
14
.github/workflows/test_cpp.yml
vendored
14
.github/workflows/test_cpp.yml
vendored
|
|
@ -26,19 +26,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@sha256:04cd765285bc52cbbf51d66c8c66d8603579cf0f19cc42df26b09d2c270541fb
|
||||
- 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:7.1.1-75f2a85ece6526cc3d54087018c0f1097d78d42b"
|
||||
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@sha256:bd39119d74b8a3fad4ae335d4cf5294e70384676331b7e19949459fc7a8d8328"
|
||||
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:aarch64-63dd26c0c7a808d92673a3e52e848189d4ab0f17"
|
||||
name: Linux ${{ matrix.config.name }}
|
||||
runs-on: ${{ matrix.config.runner || 'ubuntu-latest' }}
|
||||
steps:
|
||||
|
|
@ -102,7 +102,7 @@ jobs:
|
|||
- name: Run tests
|
||||
uses: protocolbuffers/protobuf-ci/docker@v3
|
||||
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.arch }}-63dd26c0c7a808d92673a3e52e848189d4ab0f17
|
||||
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
|
||||
entrypoint: bash
|
||||
command: >
|
||||
|
|
@ -328,7 +328,7 @@ jobs:
|
|||
os: macos-12
|
||||
cache_key: macos-12-bazel7
|
||||
bazel: test //src/... //third_party/utf8_range/...
|
||||
bazel_version: '7.1.2'
|
||||
bazel_version: '7.1.1'
|
||||
- name: MacOS Apple Silicon (build only) Bazel
|
||||
os: macos-12
|
||||
cache_key: macos-12-arm
|
||||
|
|
@ -343,7 +343,7 @@ jobs:
|
|||
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'
|
||||
bazel_version: '7.1.1'
|
||||
name: ${{ matrix.name }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
|
|
|
|||
4
.github/workflows/test_upb.yml
vendored
4
.github/workflows/test_upb.yml
vendored
|
|
@ -123,7 +123,7 @@ jobs:
|
|||
- name: Run tests
|
||||
uses: protocolbuffers/protobuf-ci/bazel-docker@v3
|
||||
with:
|
||||
image: us-docker.pkg.dev/protobuf-build/containers/common/linux/bazel:6.3.0-8ae66c8e49db9a3db7ed62424524e63bab7a96e5
|
||||
image: us-docker.pkg.dev/protobuf-build/containers/common/linux/bazel:6.3.0-91a0ac83e968068672bc6001a4d474cfd9a50f1d
|
||||
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
|
||||
bazel-cache: "upb-bazel-no-python"
|
||||
bash: >-
|
||||
|
|
@ -144,7 +144,7 @@ jobs:
|
|||
- name: Build Wheels
|
||||
uses: protocolbuffers/protobuf-ci/bazel-docker@v3
|
||||
with:
|
||||
image: us-docker.pkg.dev/protobuf-build/release-containers/linux/apple:6.3.0-53225851b051e66f8543e972c143f35be757a181
|
||||
image: us-docker.pkg.dev/protobuf-build/release-containers/linux/apple@sha256:b3dc9b75d8e599b0e95ed245d89f44b5a4231112f975da89dd02006a484a58df
|
||||
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
|
||||
bazel-cache: upb-bazel-python
|
||||
bazel: build --crosstool_top=//toolchain:clang_suite --//toolchain:release=true --symlink_prefix=/ -c dbg //python/dist //python/dist:test_wheel //python/dist:source_wheel
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ conda:
|
|||
environment: python/docs/environment.yml
|
||||
|
||||
python:
|
||||
version: 3.8
|
||||
version: 3.7
|
||||
install:
|
||||
- method: setuptools
|
||||
path: python
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ bazel_dep(name = "rules_fuzzing", version = "0.5.2")
|
|||
bazel_dep(name = "rules_java", version = "5.3.5")
|
||||
bazel_dep(name = "rules_jvm_external", version = "5.1")
|
||||
bazel_dep(name = "rules_pkg", version = "0.7.0")
|
||||
bazel_dep(name = "rules_python", version = "0.28.0")
|
||||
bazel_dep(name = "rules_python", version = "0.10.2")
|
||||
bazel_dep(name = "platforms", version = "0.0.8")
|
||||
bazel_dep(name = "zlib", version = "1.2.11")
|
||||
|
||||
|
|
|
|||
10
WORKSPACE
10
WORKSPACE
|
|
@ -25,10 +25,6 @@ load("@rules_python//python:repositories.bzl", "py_repositories")
|
|||
|
||||
py_repositories()
|
||||
|
||||
load("@rules_python//python/pip_install:repositories.bzl", "pip_install_dependencies")
|
||||
|
||||
pip_install_dependencies()
|
||||
|
||||
# Bazel platform rules.
|
||||
http_archive(
|
||||
name = "platforms",
|
||||
|
|
@ -181,9 +177,9 @@ install_deps()
|
|||
|
||||
http_archive(
|
||||
name = "rules_fuzzing",
|
||||
sha256 = "77206c54b71f4dd5335123a6ff2a8ea688eca5378d34b4838114dff71652cf26",
|
||||
strip_prefix = "rules_fuzzing-0.5.1",
|
||||
urls = ["https://github.com/bazelbuild/rules_fuzzing/releases/download/v0.5.1/rules_fuzzing-0.5.1.zip"],
|
||||
sha256 = "ff52ef4845ab00e95d29c02a9e32e9eff4e0a4c9c8a6bcf8407a2f19eb3f9190",
|
||||
strip_prefix = "rules_fuzzing-0.4.1",
|
||||
urls = ["https://github.com/bazelbuild/rules_fuzzing/releases/download/v0.4.1/rules_fuzzing-0.4.1.zip"],
|
||||
patches = ["//third_party:rules_fuzzing.patch"],
|
||||
patch_args = ["-p1"],
|
||||
)
|
||||
|
|
|
|||
|
|
@ -100,15 +100,15 @@ def protobuf_deps():
|
|||
if not native.existing_rule("rules_python"):
|
||||
http_archive(
|
||||
name = "rules_python",
|
||||
sha256 = "d70cd72a7a4880f0000a6346253414825c19cdd40a28289bdf67b8e6480edff8",
|
||||
strip_prefix = "rules_python-0.28.0",
|
||||
url = "https://github.com/bazelbuild/rules_python/releases/download/0.28.0/rules_python-0.28.0.tar.gz",
|
||||
sha256 = "9d04041ac92a0985e344235f5d946f71ac543f1b1565f2cdbc9a2aaee8adf55b",
|
||||
strip_prefix = "rules_python-0.26.0",
|
||||
url = "https://github.com/bazelbuild/rules_python/releases/download/0.26.0/rules_python-0.26.0.tar.gz",
|
||||
)
|
||||
|
||||
if not native.existing_rule("system_python"):
|
||||
system_python(
|
||||
name = "system_python",
|
||||
minimum_python_version = "3.8",
|
||||
minimum_python_version = "3.7",
|
||||
)
|
||||
|
||||
if not native.existing_rule("rules_jvm_external"):
|
||||
|
|
|
|||
12
python/dist/system_python.bzl
vendored
12
python/dist/system_python.bzl
vendored
|
|
@ -36,7 +36,7 @@ pip_parse = pip_install
|
|||
|
||||
# Alias rules_python's pip.bzl for cases where a system python is found.
|
||||
_alias_pip = """
|
||||
load("@rules_python//python:pip.bzl", _pip_parse = "pip_parse")
|
||||
load("@rules_python//python:pip.bzl", _pip_install = "pip_install", _pip_parse = "pip_parse")
|
||||
|
||||
def _get_requirements(requirements, requirements_overrides):
|
||||
for version, override in requirements_overrides.items():
|
||||
|
|
@ -45,14 +45,18 @@ def _get_requirements(requirements, requirements_overrides):
|
|||
break
|
||||
return requirements
|
||||
|
||||
def pip_install(requirements, requirements_overrides={{}}, **kwargs):
|
||||
_pip_install(
|
||||
python_interpreter_target = "@{repo}//:interpreter",
|
||||
requirements = _get_requirements(requirements, requirements_overrides),
|
||||
**kwargs,
|
||||
)
|
||||
def pip_parse(requirements, requirements_overrides={{}}, **kwargs):
|
||||
_pip_parse(
|
||||
python_interpreter_target = "@{repo}//:interpreter",
|
||||
requirements_lock = _get_requirements(requirements, requirements_overrides),
|
||||
requirements = _get_requirements(requirements, requirements_overrides),
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
pip_install = pip_parse
|
||||
"""
|
||||
|
||||
_mock_fuzzing_py = """
|
||||
|
|
|
|||
38
third_party/rules_fuzzing.patch
vendored
38
third_party/rules_fuzzing.patch
vendored
|
|
@ -1,13 +1,25 @@
|
|||
diff --git a/fuzzing/private/binary.bzl b/fuzzing/private/binary.bzl
|
||||
index 4c85aed..8ff9723 100644
|
||||
--- a/fuzzing/private/binary.bzl
|
||||
+++ b/fuzzing/private/binary.bzl
|
||||
@@ -114,7 +114,7 @@ def _fuzzing_binary_impl(ctx):
|
||||
else:
|
||||
default_info = ctx.attr.binary[DefaultInfo]
|
||||
binary_runfiles = default_info.default_runfiles
|
||||
- binary_repo_mapping_manifest = getattr(default_info.files_to_run, "repo_mapping_manifest")
|
||||
+ binary_repo_mapping_manifest = getattr(default_info.files_to_run, "repo_mapping_manifest", None)
|
||||
other_runfiles = []
|
||||
if ctx.file.corpus:
|
||||
other_runfiles.append(ctx.file.corpus)
|
||||
diff --git a/fuzzing/tools/validate_dict.py b/fuzzing/tools/validate_dict.py
|
||||
index d561e68..52cbcb8 100644
|
||||
--- a/fuzzing/tools/validate_dict.py
|
||||
+++ b/fuzzing/tools/validate_dict.py
|
||||
@@ -19,7 +19,7 @@ Validates and merges a set of fuzzing dictionary files into a single output.
|
||||
|
||||
from absl import app
|
||||
from absl import flags
|
||||
-from dict_validation import validate_line
|
||||
+from fuzzing.tools.dict_validation import validate_line
|
||||
from sys import stderr
|
||||
|
||||
FLAGS = flags.FLAGS
|
||||
diff --git a/fuzzing/requirements.txt b/fuzzing/requirements.txt
|
||||
index 01482d4..4b36f4f 100644
|
||||
--- a/fuzzing/requirements.txt
|
||||
+++ b/fuzzing/requirements.txt
|
||||
@@ -1,5 +1,5 @@
|
||||
# Python requirements for the tools supporting the fuzzing rules. These are
|
||||
# installed automatically through the WORKSPACE configuration.
|
||||
|
||||
-absl-py==0.11.0 --hash=sha256:b3d9eb5119ff6e0a0125f6dabf2f9fae02f8acae7be70576002fac27235611c5
|
||||
-six==1.15.0 --hash=sha256:8b74bedcbbbaca38ff6d7491d76f2b06b3592611af620f8426e82dddb04a5ced
|
||||
+absl-py==2.0.0 --hash=sha256:9a28abb62774ae4e8edbe2dd4c49ffcd45a6a848952a5eccc6a49f3f0fc1e2f3
|
||||
+six==1.16.0 --hash=sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue