diff --git a/.bazeliskrc b/.bazeliskrc new file mode 100644 index 000000000..ebffda85f --- /dev/null +++ b/.bazeliskrc @@ -0,0 +1,3 @@ +# See https://github.com/bazelbuild/bazelisk +# Should match https://github.com/googleapis/googleapis/blob/master/.bazeliskrc +USE_BAZEL_VERSION=6.3.0 diff --git a/.bazelrc b/.bazelrc index 3d90ce524..001e7b730 100644 --- a/.bazelrc +++ b/.bazelrc @@ -3,3 +3,7 @@ build --protocopt=--include_source_info # Required because showcase protos include proto3_optional fields build --protocopt=--experimental_allow_proto3_optional + +# New boringssl requires C++14 +# Copied from googleapis. +build --repo_env=BAZEL_CXXOPTS="-std=c++14" diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index eba6f1dad..c0095dd4a 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -105,11 +105,6 @@ jobs: run: go test ./... - name: Run server coverage run: go test ./server/... -coverprofile=coverage.txt -covermode=atomic - # Disabled indefinitely. - # - uses: codecov/codecov-action@v1 - # with: - # files: ./coverage.txt - # flags: unittests probes: needs: regenerate runs-on: ubuntu-latest @@ -217,3 +212,16 @@ jobs: repo: context.repo.repo, labels: ['automerge'] }) + bazel_build_protos: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: bazel-contrib/setup-bazel@0.8.1 + with: + # Avoid downloading Bazel every time. + bazelisk-cache: true + # Store build cache per workflow. + disk-cache: ${{ github.workflow }} + # Share repository cache between workflows. + repository-cache: true + - run: bazelisk build //schema/google/showcase/v1beta1:showcase_proto diff --git a/WORKSPACE.bazel b/WORKSPACE.bazel index e58956088..e3f1789d2 100644 --- a/WORKSPACE.bazel +++ b/WORKSPACE.bazel @@ -42,18 +42,28 @@ http_archive( load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps") protobuf_deps() +http_archive( + name = "bazel_features", + sha256 = "06f02b97b6badb3227df2141a4b4622272cdcd2951526f40a888ab5f43897f14", + strip_prefix = "bazel_features-1.9.0", + url = "https://github.com/bazel-contrib/bazel_features/releases/download/v1.9.0/bazel_features-v1.9.0.tar.gz", +) +load("@bazel_features//:deps.bzl", "bazel_features_deps") +bazel_features_deps() + ## # rules_proto for the proto_library rule # http_archive( - name = "rules_proto", - sha256 = "6a0b76595cb8bb97cec085c6b45c24337d30615d636f4941225c05f017690b6f", - strip_prefix = "rules_proto-25c8af9d56980df7732b2f8639c5d43ef878a6f7", - urls = [ - "https://mirror.bazel.build/github.com/bazelbuild/rules_proto/archive/25c8af9d56980df7732b2f8639c5d43ef878a6f7.tar.gz", - "https://github.com/bazelbuild/rules_proto/archive/25c8af9d56980df7732b2f8639c5d43ef878a6f7.tar.gz", - ], + name = "rules_proto", + sha256 = "71fdbed00a0709521ad212058c60d13997b922a5d01dbfd997f0d57d689e7b67", + # Using a release candidate because the latest stable release is too old for + # our needs, and we want to stay closer to the latest without pinning to a + # specific commit. + strip_prefix = "rules_proto-6.0.0-rc2", + url = "https://github.com/bazelbuild/rules_proto/releases/download/6.0.0-rc2/rules_proto-6.0.0-rc2.tar.gz", ) -load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains") + +load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies","rules_proto_toolchains") rules_proto_dependencies() rules_proto_toolchains() diff --git a/schema/google/showcase/v1beta1/BUILD.bazel b/schema/google/showcase/v1beta1/BUILD.bazel index 72365caf1..6d9127f4f 100644 --- a/schema/google/showcase/v1beta1/BUILD.bazel +++ b/schema/google/showcase/v1beta1/BUILD.bazel @@ -39,6 +39,7 @@ proto_library( "@com_google_googleapis//google/longrunning:operations_proto", "@com_google_googleapis//google/rpc:status_proto", "@com_google_googleapis//google/rpc:error_details_proto", + "@com_google_protobuf//:any_proto", "@com_google_protobuf//:duration_proto", "@com_google_protobuf//:empty_proto", "@com_google_protobuf//:field_mask_proto",