Skip to content

Commit 1d8780f

Browse files
publish-to-bcr-bot[bot]brentleyjoneskeith
authored
Release: https://github.com/bazelbuild/rules_swift/releases/tag/3.3.0 _Automated by [Publish to BCR](https://github.com/apps/publish-to-bcr)_ --------- Co-authored-by: Brentley Jones <[email protected]> Co-authored-by: Keith Smiley <[email protected]>
1 parent a1f270d commit 1d8780f

File tree

5 files changed

+133
-1
lines changed

5 files changed

+133
-1
lines changed
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
"""rules_swift MODULE.bazel file"""
2+
3+
module(
4+
name = "rules_swift",
5+
version = "3.3.0",
6+
bazel_compatibility = [">=7.0.0"],
7+
compatibility_level = 3,
8+
repo_name = "build_bazel_rules_swift",
9+
)
10+
11+
bazel_dep(name = "bazel_features", version = "1.30.0")
12+
bazel_dep(name = "bazel_skylib", version = "1.7.1")
13+
bazel_dep(name = "apple_support", version = "1.24.2", repo_name = "build_bazel_apple_support")
14+
bazel_dep(name = "rules_cc", version = "0.2.14")
15+
bazel_dep(name = "rules_shell", version = "0.3.0")
16+
bazel_dep(name = "platforms", version = "0.0.11")
17+
bazel_dep(name = "protobuf", version = "29.0", repo_name = "com_google_protobuf")
18+
bazel_dep(name = "nlohmann_json", version = "3.12.0", repo_name = "com_github_nlohmann_json")
19+
bazel_dep(
20+
name = "swift_argument_parser",
21+
version = "1.3.1.2",
22+
repo_name = "com_github_apple_swift_argument_parser",
23+
)
24+
25+
non_module_deps = use_extension("//swift:extensions.bzl", "non_module_deps")
26+
use_repo(
27+
non_module_deps,
28+
"build_bazel_rules_swift_index_import_5_8",
29+
"build_bazel_rules_swift_index_import_6_1",
30+
"build_bazel_rules_swift_local_config",
31+
"com_github_apple_swift_docc_symbolkit",
32+
"com_github_apple_swift_log",
33+
"com_github_apple_swift_nio",
34+
"com_github_apple_swift_nio_extras",
35+
"com_github_apple_swift_nio_http2",
36+
"com_github_apple_swift_nio_transport_services",
37+
"com_github_apple_swift_protobuf",
38+
"com_github_grpc_grpc_swift",
39+
)
40+
41+
apple_cc_configure = use_extension("@build_bazel_apple_support//crosstool:setup.bzl", "apple_cc_configure_extension")
42+
use_repo(apple_cc_configure, "local_config_apple_cc")
43+
44+
register_toolchains("@build_bazel_rules_swift_local_config//:all")
45+
46+
# Dev dependencies
47+
bazel_dep(name = "bazel_skylib_gazelle_plugin", version = "1.5.0", dev_dependency = True)
48+
bazel_dep(name = "gazelle", version = "0.46.0", dev_dependency = True, repo_name = "bazel_gazelle")
49+
bazel_dep(name = "rules_go", version = "0.58.3", dev_dependency = True) # TODO: Remove when transitives update past this version
50+
bazel_dep(name = "stardoc", version = "0.7.1", dev_dependency = True, repo_name = "io_bazel_stardoc")
51+
52+
http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
53+
54+
http_archive(
55+
name = "SwiftSyntax",
56+
dev_dependency = True,
57+
sha256 = "527a5c6d19987acbb5019efa067b0fbd127e06187a0689c3f1098fd22c1a7d43",
58+
strip_prefix = "swift-syntax-01fc3e3ed4d26121c06790abf8fe5ddaa22a4cc5",
59+
url = "https://github.com/apple/swift-syntax/archive/01fc3e3ed4d26121c06790abf8fe5ddaa22a4cc5.tar.gz",
60+
)
61+
62+
# TODO: In stardoc 0.7.1+, the `load` statements added to the docs are relative to the `alias` targets which is incorrect.
63+
# To keep the docs without confusing load statements we patch a partial revert of: https://github.com/bazelbuild/stardoc/pull/216
64+
single_version_override(
65+
module_name = "stardoc",
66+
patch_strip = 1,
67+
patches = ["//third_party/patches:stardoc-revert-load-statements-in-docs.patch"],
68+
)
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
===================================================================
2+
--- a/MODULE.bazel
3+
+++ b/MODULE.bazel
4+
@@ -1,9 +1,9 @@
5+
"""rules_swift MODULE.bazel file"""
6+
7+
module(
8+
name = "rules_swift",
9+
- version = "0",
10+
+ version = "3.3.0",
11+
bazel_compatibility = [">=7.0.0"],
12+
compatibility_level = 3,
13+
repo_name = "build_bazel_rules_swift",
14+
)
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
shell_commands: &shell_commands
2+
- "echo --- Downloading and extracting Swift $SWIFT_VERSION to $SWIFT_HOME"
3+
- "mkdir $SWIFT_HOME"
4+
- "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"
5+
6+
matrix:
7+
bazel:
8+
- 7.x
9+
# TODO: Uncomment once Bazel 8 is released
10+
- 8.x
11+
# TODO: Uncomment once we support HEAD again
12+
- rolling
13+
platform:
14+
- ubuntu2004
15+
tasks:
16+
verify_targets:
17+
name: Verify build targets
18+
bazel: ${{ bazel }}
19+
platform: ${{ platform }}
20+
environment:
21+
CC: "clang"
22+
SWIFT_VERSION: "6.0.3"
23+
SWIFT_HOME: "$HOME/swift-$SWIFT_VERSION"
24+
PATH: "$PATH:$SWIFT_HOME/usr/bin"
25+
shell_commands: *shell_commands
26+
build_flags:
27+
- "--action_env=PATH"
28+
build_targets:
29+
- "@rules_swift//examples/xplatform/..."
30+
- "-@rules_swift//examples/xplatform/macros/..." # Has a dev dependency
31+
- "-@rules_swift//examples/xplatform/grpc/..." # TODO: Fix grpc on Linux
32+
- "-@rules_swift//examples/xplatform/proto_library_group/..." # TODO: Fix grpc on Linux
33+
verify_targets_macos:
34+
name: Verify build targets
35+
bazel: ${{ bazel }}
36+
platform: macos
37+
build_targets:
38+
- "@rules_swift//examples/apple/..."
39+
build_flags:
40+
- "--repo_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1"
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"integrity": "sha256-lBNu3xzNx7m7aP+F4Ab+aY6hYaAvvuVbof60znFSLPs=",
3+
"strip_prefix": "",
4+
"url": "https://github.com/bazelbuild/rules_swift/releases/download/3.3.0/rules_swift.3.3.0.tar.gz",
5+
"patches": {
6+
"module_dot_bazel_version.patch": "sha256-XCLbSbW0Xj4cF7VU6Kj5BXtQsNzt7q2hsEHJYbpFqtY="
7+
},
8+
"patch_strip": 1
9+
}

modules/rules_swift/metadata.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@
8080
"3.1.0",
8181
"3.1.1",
8282
"3.1.2",
83-
"3.2.0"
83+
"3.2.0",
84+
"3.3.0"
8485
],
8586
"yanked_versions": {
8687
"3.0.0": "Using wrong compatibility_level of 2 when should be 3. Fixed in 3.0.2."

0 commit comments

Comments
 (0)