From 3e8d7d63423295c0f293bba299a35791f4c3845d Mon Sep 17 00:00:00 2001 From: grencez Date: Mon, 3 Jun 2024 15:10:59 -0700 Subject: [PATCH] update(grpc): 1.62.1.bcr.1 with Bazel 7 --- .github/workflows/test_bazel.yaml | 10 ++++++++-- MODULE.bazel | 9 ++++----- test/scenario/BUILD.bazel | 33 ++++++++++++++++++++----------- test/scenario/scenario.bzl | 21 -------------------- 4 files changed, 34 insertions(+), 39 deletions(-) delete mode 100644 test/scenario/scenario.bzl diff --git a/.github/workflows/test_bazel.yaml b/.github/workflows/test_bazel.yaml index 6f3cb0b..af31bf4 100644 --- a/.github/workflows/test_bazel.yaml +++ b/.github/workflows/test_bazel.yaml @@ -23,7 +23,13 @@ jobs: uses: actions/checkout@v4 - name: Build - run: bazel build //... + run: > + bazel build + --disk_cache=~/.cache/bazel + //... - name: Test - run: bazel test //... + run: > + bazel test + --disk_cache=~/.cache/bazel + //... diff --git a/MODULE.bazel b/MODULE.bazel index c0da446..fb78451 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -3,9 +3,8 @@ module( version = "0.0.0", ) -bazel_dep(name = "bazel_skylib", version = "1.6.1") bazel_dep(name = "rules_license", version = "0.0.8") -bazel_dep(name = "rules_proto", version = "6.0.0") +bazel_dep(name = "rules_proto", version = "6.0.0.bcr.1") bazel_dep( name = "abseil-cpp", @@ -13,7 +12,7 @@ bazel_dep( repo_name = "com_google_absl") bazel_dep( name = "grpc", - version = "1.48.1.bcr.3", + version = "1.62.1.bcr.1", repo_name = "com_github_grpc_grpc") bazel_dep( @@ -23,7 +22,7 @@ bazel_dep( git_override( module_name = "fildesh", remote = "https://github.com/fildesh/fildesh.git", - commit="29ef2da4a4c4aeda9c0af917b95fc2c493d4f96d", + commit="11ff65ed78103bc1b1caefb1deb8fa42110eea08", ) bazel_dep( name = "rules_sxproto", @@ -32,5 +31,5 @@ bazel_dep( git_override( module_name = "rules_sxproto", remote = "https://github.com/rendezqueue/rules_sxproto.git", - commit="70827d3da93c4aefaeee3627a9d091a975d1377b", + commit="c720229ebe571b470efc6b34fda182308e56c1c8", ) diff --git a/test/scenario/BUILD.bazel b/test/scenario/BUILD.bazel index d1c15c1..a196c89 100644 --- a/test/scenario/BUILD.bazel +++ b/test/scenario/BUILD.bazel @@ -1,27 +1,23 @@ -load("@bazel_skylib//:bzl_library.bzl", "bzl_library") +load("@fildesh//tool/bazel:fildesh_test.bzl", "fildesh_test") load("@rules_proto//proto:defs.bzl", "proto_library") -load("scenario.bzl", "rendezqueue_scenario_test") - -bzl_library( - name = "scenario_bzl", - srcs = ["scenario.bzl"], -) +load("@rules_sxproto//sxproto:defs.bzl", "sxproto_data") proto_library( name = "scenario_proto", + testonly = 1, srcs = ["scenario.proto"], deps = ["//proto:rendezqueue_proto"], - testonly = 1, ) cc_proto_library( name = "scenario_cc_proto", - deps = [":scenario_proto"], testonly = 1, + deps = [":scenario_proto"], ) cc_binary( name = "ccgrpc_expect", + testonly = 1, srcs = [ "ccgrpc_expect.cc", ], @@ -29,8 +25,23 @@ cc_binary( ":scenario_cc_proto", "//src/ccgrpc:rendezqueue_protobuf_impl_cc", ], - testonly = 1, ) -rendezqueue_scenario_test(name = "basic") +sxproto_data( + name = "basic_binpb", + testonly = 1, + src = "basic.sxpb", + proto_deps = [":scenario_proto"], + proto_message = "rendezqueue.TrySwapScenario", +) +fildesh_test( + name = "basic_ccgrpc_expect_test", + srcs = ["//test/scenario:ccgrpc_expect.fildesh"], + input_by_option = { + "scenario_data": ":basic_binpb", + }, + tool_by_alias = { + "expect_test": "//test/scenario:ccgrpc_expect", + }, +) diff --git a/test/scenario/scenario.bzl b/test/scenario/scenario.bzl deleted file mode 100644 index 67f1742..0000000 --- a/test/scenario/scenario.bzl +++ /dev/null @@ -1,21 +0,0 @@ -load("@fildesh//tool/bazel:fildesh_test.bzl", "fildesh_test") -load("@rules_sxproto//sxproto:defs.bzl", "sxproto_data") - -def rendezqueue_scenario_test(name): - sxproto_data( - name = name, - src = name + ".sxpb", - proto_message = "rendezqueue.TrySwapScenario", - proto_deps = [":scenario_proto"], - testonly = 1, - ) - fildesh_test( - name = name + "_ccgrpc_expect_test", - srcs = ["//test/scenario:ccgrpc_expect.fildesh"], - tool_by_alias = { - "expect_test": "//test/scenario:ccgrpc_expect", - }, - input_by_option = { - "scenario_data": ":" + name, - } - )