Skip to content

Commit d3fb254

Browse files
author
Paolo Tranquilli
committed
Swift: try out new builds
1 parent 524686c commit d3fb254

File tree

24 files changed

+147
-169
lines changed

24 files changed

+147
-169
lines changed

.gitattributes

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,4 +86,5 @@
8686
/misc/ripunzip/ripunzip-* filter=lfs diff=lfs merge=lfs -text
8787

8888
# swift prebuilt resources
89-
/swift/third_party/resource-dir/*.zip filter=lfs diff=lfs merge=lfs -text
89+
/swift/third_party/resources/*.zip filter=lfs diff=lfs merge=lfs -text
90+
/swift/third_party/resources/*.tar.zst filter=lfs diff=lfs merge=lfs -text

.github/workflows/swift.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,3 +109,9 @@ jobs:
109109
- uses: actions/checkout@v4
110110
- uses: ./.github/actions/fetch-codeql
111111
- uses: ./swift/actions/database-upgrade-scripts
112+
check-no-override:
113+
if : ${{ github.event_name == 'pull_request' }}
114+
runs-on: ubuntu-latest
115+
steps:
116+
- shell: bash
117+
run: bazel test //swift/... --test_tag_filters=override --test_output=errors

MODULE.bazel

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ bazel_dep(name = "gazelle", version = "0.38.0")
2828
bazel_dep(name = "rules_dotnet", version = "0.15.1")
2929
bazel_dep(name = "googletest", version = "1.14.0.bcr.1")
3030
bazel_dep(name = "rules_rust", version = "0.50.0")
31+
bazel_dep(name = "zstd", version = "1.5.5.bcr.1")
3132

3233
bazel_dep(name = "buildifier_prebuilt", version = "6.4.0", dev_dependency = True)
3334

@@ -91,10 +92,10 @@ use_repo(
9192
swift_deps,
9293
"binlog",
9394
"picosha2",
94-
"swift_prebuilt_darwin_x86_64",
95-
"swift_prebuilt_linux",
96-
"swift_toolchain_linux",
97-
"swift_toolchain_macos",
95+
"swift-prebuilt-linux",
96+
"swift-prebuilt-macos",
97+
"swift-resource-dir-linux",
98+
"swift-resource-dir-macos",
9899
)
99100

100101
node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node")
@@ -186,16 +187,6 @@ lfs_files(
186187
executable = True,
187188
)
188189

189-
lfs_files(
190-
name = "swift-resource-dir-linux",
191-
srcs = ["//swift/third_party/resource-dir:resource-dir-linux.zip"],
192-
)
193-
194-
lfs_files(
195-
name = "swift-resource-dir-macos",
196-
srcs = ["//swift/third_party/resource-dir:resource-dir-macos.zip"],
197-
)
198-
199190
register_toolchains(
200191
"@nodejs_toolchains//:all",
201192
)

misc/bazel/lfs.bzl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,12 @@ def _download_lfs(repository_ctx):
7777
)
7878
repository_ctx.file("BUILD.bazel", build)
7979

80+
# this is for drop-in compatibility with `http_file`
81+
repository_ctx.file(
82+
"file/BUILD.bazel",
83+
'alias(name = "file", actual = "//:%s", visibility = ["//visibility:public"])\n' % name,
84+
)
85+
8086
lfs_archive = repository_rule(
8187
doc = "Export the contents from an on-demand LFS archive. The corresponding path should be added to be ignored " +
8288
"in `.lfsconfig`.",

swift/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ codeql_pack(
8181
zips = select({
8282
"@platforms//os:windows": {},
8383
"//conditions:default": {
84-
"//swift/third_party/resource-dir": "resource-dir/{CODEQL_PLATFORM}",
84+
"//swift/third_party/resources:dir": "resource-dir/{CODEQL_PLATFORM}",
8585
},
8686
}),
8787
)

swift/actions/build-and-test/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ runs:
5858
if: ${{ github.event_name == 'pull_request' }}
5959
shell: bash
6060
run: |
61-
bazel test //swift/...
61+
bazel test //swift/... --test_tag_filters=-override --test_output=errors
6262
- name: Evict bazel cache
6363
if: ${{ github.event_name != 'pull_request' }}
6464
shell: bash

swift/extractor/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ swift_cc_binary(
1818
"//swift/extractor/invocation",
1919
"//swift/extractor/remapping",
2020
"//swift/extractor/translators",
21-
"//swift/third_party/swift-llvm-support",
21+
"//swift/third_party/resources:prebuilt",
2222
"@absl//absl/strings",
2323
],
2424
)

swift/extractor/infra/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ swift_cc_library(
1010
"//swift/extractor/infra/file",
1111
"//swift/extractor/trap",
1212
"//swift/logging",
13-
"//swift/third_party/swift-llvm-support",
13+
"//swift/third_party/resources:prebuilt",
1414
"@picosha2",
1515
],
1616
)

swift/extractor/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include "swift/extractor/trap/TrapDomain.h"
2121
#include "swift/extractor/infra/file/Path.h"
2222
#include "swift/logging/SwiftAssert.h"
23+
#include "swift/Threading/Errors.h"
2324

2425
using namespace std::string_literals;
2526
using namespace codeql::main_logger;

swift/extractor/mangler/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ swift_cc_library(
88
deps = [
99
"//swift/extractor/infra",
1010
"//swift/extractor/trap",
11-
"//swift/third_party/swift-llvm-support",
11+
"//swift/third_party/resources:prebuilt",
1212
],
1313
)

0 commit comments

Comments
 (0)