Enable C++ tests for Bazel 7 on mac

PiperOrigin-RevId: 610573579
pull/15938/head
Mike Kruskal 9 months ago committed by Copybara-Service
parent f66d876a10
commit 396e26b475
  1. 2
      .bazelrc
  2. 4
      .github/BUILD.bazel
  3. 11
      .github/workflows/test_cpp.yml
  4. 8
      WORKSPACE
  5. 1
      ci/macOS.bazelrc
  6. 11
      protobuf_deps.bzl

@ -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

@ -11,7 +11,7 @@ xcode_version(
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(
@ -26,7 +26,7 @@ xcode_version(
xcode_config(
name = "host_xcodes",
default = ":version14_1_0_14B47b",
default = ":version14_2_14C18",
versions = [
":version14_2_14C18",
":version14_1_0_14B47b",

@ -320,12 +320,11 @@ jobs:
os: macos-12
cache_key: macos-12
bazel: test //src/... //third_party/utf8_range/...
# TODO Enable these once mac setup is working for Bazel 7
#- name: MacOS Bazel 7
# os: macos-12
# cache_key: macos-12-bazel7
# bazel: test //src/... //third_party/utf8_range/...
# bazel_version: '7.0.0'
- name: MacOS Bazel 7
os: macos-12
cache_key: macos-12-bazel7
bazel: test //src/... //third_party/utf8_range/...
bazel_version: '7.0.0'
- name: MacOS Apple Silicon (build only) Bazel
os: macos-12
cache_key: macos-12-arm

@ -82,6 +82,14 @@ load("@build_bazel_rules_apple//apple:repositories.bzl", "apple_rules_dependenci
apple_rules_dependencies()
load("@build_bazel_apple_support//lib:repositories.bzl", "apple_support_dependencies")
apple_support_dependencies()
load("@rules_cc//cc:repositories.bzl", "rules_cc_dependencies")
rules_cc_dependencies()
# For `kt_jvm_library`
load("@io_bazel_rules_kotlin//kotlin:repositories.bzl", "kotlin_repositories")

@ -1,3 +1,4 @@
import common.bazelrc
build --cxxopt=-std=c++14 --host_cxxopt=-std=c++14
common --repo_env=BAZEL_NO_APPLE_CPP_TOOLCHAIN=1

@ -122,8 +122,15 @@ def protobuf_deps():
if not native.existing_rule("build_bazel_rules_apple"):
http_archive(
name = "build_bazel_rules_apple",
sha256 = "34c41bfb59cdaea29ac2df5a2fa79e5add609c71bb303b2ebb10985f93fa20e7",
url = "https://github.com/bazelbuild/rules_apple/releases/download/3.1.1/rules_apple.3.1.1.tar.gz",
sha256 = "9c4f1e1ec4fdfeac5bddb07fa0e872c398e3d8eb0ac596af9c463f9123ace292",
url = "https://github.com/bazelbuild/rules_apple/releases/download/3.2.1/rules_apple.3.2.1.tar.gz",
)
if not native.existing_rule("build_bazel_apple_support"):
http_archive(
name = "build_bazel_apple_support",
sha256 = "100d12617a84ebc7ee7a10ecf3b3e2fdadaebc167ad93a21f820a6cb60158ead",
url = "https://github.com/bazelbuild/apple_support/releases/download/1.12.0/apple_support.1.12.0.tar.gz",
)
if not native.existing_rule("io_bazel_rules_kotlin"):

Loading…
Cancel
Save