From 12f6cf12dbc691a71f1461cdcb6ebef1443944e8 Mon Sep 17 00:00:00 2001 From: "publish-to-bcr-bot[bot]" <112732530+publish-to-bcr-bot[bot]@users.noreply.github.com> Date: Tue, 6 Feb 2024 08:31:41 -0600 Subject: [PATCH] Publish bazelbuild/rules_swift@1.16.0 (#1442) Signed-off-by: Brentley Jones Co-authored-by: Patrick Balestra --- modules/rules_swift/1.16.0/MODULE.bazel | 38 +++++++++++++++++++ .../patches/module_dot_bazel_version.patch | 12 ++++++ modules/rules_swift/1.16.0/presubmit.yml | 35 +++++++++++++++++ modules/rules_swift/1.16.0/source.json | 9 +++++ modules/rules_swift/metadata.json | 5 ++- 5 files changed, 97 insertions(+), 2 deletions(-) create mode 100644 modules/rules_swift/1.16.0/MODULE.bazel create mode 100644 modules/rules_swift/1.16.0/patches/module_dot_bazel_version.patch create mode 100644 modules/rules_swift/1.16.0/presubmit.yml create mode 100644 modules/rules_swift/1.16.0/source.json diff --git a/modules/rules_swift/1.16.0/MODULE.bazel b/modules/rules_swift/1.16.0/MODULE.bazel new file mode 100644 index 00000000000..1b9941c09d3 --- /dev/null +++ b/modules/rules_swift/1.16.0/MODULE.bazel @@ -0,0 +1,38 @@ +module( + name = "rules_swift", + version = "1.16.0", + bazel_compatibility = [">=6.0.0"], + compatibility_level = 1, + repo_name = "build_bazel_rules_swift", +) + +bazel_dep(name = "bazel_features", version = "1.3.0") +bazel_dep(name = "bazel_skylib", version = "1.3.0") +bazel_dep(name = "apple_support", version = "1.11.1", repo_name = "build_bazel_apple_support") +bazel_dep(name = "rules_cc", version = "0.0.2") +bazel_dep(name = "platforms", version = "0.0.7") +bazel_dep(name = "protobuf", version = "21.7", repo_name = "com_google_protobuf") +bazel_dep(name = "rules_proto", version = "5.3.0-21.7") +bazel_dep(name = "nlohmann_json", version = "3.6.1", repo_name = "com_github_nlohmann_json") + +non_module_deps = use_extension("//swift:extensions.bzl", "non_module_deps") +use_repo( + non_module_deps, + "build_bazel_rules_swift_index_import", + "build_bazel_rules_swift_local_config", + "com_github_apple_swift_log", + "com_github_apple_swift_nio", + "com_github_apple_swift_nio_extras", + "com_github_apple_swift_nio_http2", + "com_github_apple_swift_nio_transport_services", + "com_github_apple_swift_protobuf", + "com_github_grpc_grpc_swift", +) + +apple_cc_configure = use_extension("@build_bazel_apple_support//crosstool:setup.bzl", "apple_cc_configure_extension") +use_repo(apple_cc_configure, "local_config_apple_cc") + +# Dev dependencies +bazel_dep(name = "bazel_skylib_gazelle_plugin", version = "1.5.0", dev_dependency = True) +bazel_dep(name = "gazelle", version = "0.33.0", dev_dependency = True, repo_name = "bazel_gazelle") +bazel_dep(name = "stardoc", version = "0.6.2", dev_dependency = True, repo_name = "io_bazel_stardoc") diff --git a/modules/rules_swift/1.16.0/patches/module_dot_bazel_version.patch b/modules/rules_swift/1.16.0/patches/module_dot_bazel_version.patch new file mode 100644 index 00000000000..84c3376e414 --- /dev/null +++ b/modules/rules_swift/1.16.0/patches/module_dot_bazel_version.patch @@ -0,0 +1,12 @@ +=================================================================== +--- a/MODULE.bazel ++++ b/MODULE.bazel +@@ -1,7 +1,7 @@ + module( + name = "rules_swift", +- version = "0", ++ version = "1.16.0", + bazel_compatibility = [">=6.0.0"], + compatibility_level = 1, + repo_name = "build_bazel_rules_swift", + ) diff --git a/modules/rules_swift/1.16.0/presubmit.yml b/modules/rules_swift/1.16.0/presubmit.yml new file mode 100644 index 00000000000..1e22498b8d4 --- /dev/null +++ b/modules/rules_swift/1.16.0/presubmit.yml @@ -0,0 +1,35 @@ +shell_commands: &shell_commands +- "echo --- Downloading and extracting Swift $SWIFT_VERSION to $SWIFT_HOME" +- "mkdir $SWIFT_HOME" +- "curl https://download.swift.org/swift-${SWIFT_VERSION}-release/ubuntu2004/swift-${SWIFT_VERSION}-RELEASE/swift-${SWIFT_VERSION}-RELEASE-ubuntu20.04.tar.gz | tar xvz --strip-components=1 -C $SWIFT_HOME" + +matrix: + bazel: + - 7.x + - last_green + platform: + - ubuntu2004 +tasks: + verify_targets: + name: Verify build targets + bazel: ${{ bazel }} + platform: ${{ platform }} + environment: + CC: "clang" + SWIFT_VERSION: "5.5.3" + SWIFT_HOME: "$HOME/swift-$SWIFT_VERSION" + PATH: "$PATH:$SWIFT_HOME/usr/bin" + shell_commands: *shell_commands + build_flags: + - "--action_env=PATH" + build_targets: + - "@rules_swift//examples/xplatform/..." + - "-@rules_swift//examples/xplatform/grpc/..." # TODO: Fix grpc on Linux + verify_targets_macos: + name: Verify build targets + bazel: ${{ bazel }} + platform: macos + build_targets: + - "@rules_swift//examples/apple/..." + build_flags: + - "--repo_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1" diff --git a/modules/rules_swift/1.16.0/source.json b/modules/rules_swift/1.16.0/source.json new file mode 100644 index 00000000000..d572fbeb81c --- /dev/null +++ b/modules/rules_swift/1.16.0/source.json @@ -0,0 +1,9 @@ +{ + "integrity": "sha256-eqvju++NLgfJ7gess4bwole9L3bqjiEAVoi1BtyNpns=", + "strip_prefix": "", + "url": "https://github.com/bazelbuild/rules_swift/releases/download/1.16.0/rules_swift.1.16.0.tar.gz", + "patches": { + "module_dot_bazel_version.patch": "sha256-66B/4JaIUXEe4yUstQpgvRbYzXLR9nJ+Z7AlzEkxLE4=" + }, + "patch_strip": 1 +} diff --git a/modules/rules_swift/metadata.json b/modules/rules_swift/metadata.json index 979b7c6a09c..1451985ccf8 100644 --- a/modules/rules_swift/metadata.json +++ b/modules/rules_swift/metadata.json @@ -14,7 +14,7 @@ { "email": "github@brentleyjones.com", "github": "brentleyjones", - "name": "Jones Brentley" + "name": "Brentley Jones" }, { "email": "t@thi.im", @@ -42,7 +42,8 @@ "1.13.0", "1.14.0", "1.15.0", - "1.15.1" + "1.15.1", + "1.16.0" ], "yanked_versions": {} }