File tree Expand file tree Collapse file tree 3 files changed +24
-10
lines changed Expand file tree Collapse file tree 3 files changed +24
-10
lines changed Original file line number Diff line number Diff line change 20
20
name : Build SwiftLint with Bazel
21
21
env :
22
22
CI_BAZELRC_FILE_CONTENT : ${{ secrets.CI_BAZELRC_FILE_CONTENT }}
23
+ - name : Prepare release workspace
24
+ run : |
25
+ cp bazel-bin/swiftlint .
26
+ make bazel_release
27
+ mkdir -p bazel-workspace
28
+ tar -czvf bazel.tar.gz bazel-workspace
29
+ cd bazel-workspace
30
+ sed -i '/-warnings-as-errors/d' bazel/copts.bzl
31
+ - name : Build release archive
32
+ uses : ./.github/actions/bazel-linux-build
33
+ env :
34
+ CI_BAZELRC_FILE_CONTENT : ${{ secrets.CI_BAZELRC_FILE_CONTENT }}
35
+ - name : Run tests for extra rules
36
+ run : |
37
+ bazel run //:swiftlint -- version
38
+ bazel test //Tests/ExtraRulesTests --test_output=errors
23
39
24
40
plugins_linux :
25
41
name : SPM plugins, Linux, Swift ${{ matrix.version }}
Original file line number Diff line number Diff line change @@ -225,25 +225,23 @@ filegroup(
225
225
],
226
226
)
227
227
228
- # TODO: Use rules_pkg
229
228
genrule (
230
229
name = "release" ,
231
230
srcs = [":release_files" ],
232
231
outs = [
233
232
"bazel.tar.gz" ,
234
233
"bazel.tar.gz.sha256" ,
235
234
],
236
- cmd = """\
237
- set -euo pipefail
235
+ cmd = """
236
+ set -euo pipefail
238
237
239
- outs=($(OUTS))
238
+ outs=($(OUTS))
240
239
241
- COPYFILE_DISABLE=1 tar czvfh "$${outs[0]}" \
242
- --exclude ^bazel-out/ \
243
- --exclude ^external/ \
244
- *
245
- shasum -a 256 "$${outs[0]}" > "$${outs[1]}"
240
+ COPYFILE_DISABLE=1 tar -czvfh "$${outs[0]}" --exclude ^bazel-out/ --exclude ^external/ *
241
+
242
+ "$(location @bazel_tools//tools/build_defs/hash:sha256)" $${outs[0]} $${outs[1]}
246
243
""" ,
244
+ tools = ["@bazel_tools//tools/build_defs/hash:sha256" ],
247
245
)
248
246
249
247
# Analyze
Original file line number Diff line number Diff line change @@ -143,7 +143,7 @@ bazel_test_tsan:
143
143
bazel test --test_output=errors --build_tests_only --features=tsan --test_timeout=1000 //Tests/...
144
144
145
145
bazel_release : swiftlint
146
- bazel build :release
146
+ bazel build :release --verbose_failures
147
147
mv -f bazel-bin/bazel.tar.gz bazel-bin/bazel.tar.gz.sha256 .
148
148
149
149
docker_image :
You can’t perform that action at this time.
0 commit comments