File tree Expand file tree Collapse file tree 3 files changed +25
-10
lines changed Expand file tree Collapse file tree 3 files changed +25
-10
lines changed Original file line number Diff line number Diff line change 2020 name : Build SwiftLint with Bazel
2121 env :
2222 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
2339
2440 plugins_linux :
2541 name : SPM plugins, Linux, Swift ${{ matrix.version }}
Original file line number Diff line number Diff line change @@ -225,25 +225,24 @@ filegroup(
225225 ],
226226)
227227
228- # TODO: Use rules_pkg
229228genrule (
230229 name = "release" ,
231230 srcs = [":release_files" ],
232231 outs = [
233232 "bazel.tar.gz" ,
234233 "bazel.tar.gz.sha256" ,
235234 ],
236- cmd = """\
237- set -euo pipefail
235+ cmd = """
236+ set -euo pipefail
238237
239- outs=($(OUTS))
238+ outs=($(OUTS))
240239
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+ export COPYFILE_DISABLE=1
241+ tar -czf "$${outs[0]}" --exclude=bazel-out --exclude=external .
242+
243+ "$(location @bazel_tools//tools/build_defs/hash:sha256)" $${outs[0]} $${outs[1]}
246244 """ ,
245+ tools = ["@bazel_tools//tools/build_defs/hash:sha256" ],
247246)
248247
249248# Analyze
Original file line number Diff line number Diff line change @@ -143,7 +143,7 @@ bazel_test_tsan:
143143 bazel test --test_output=errors --build_tests_only --features=tsan --test_timeout=1000 //Tests/...
144144
145145bazel_release : swiftlint
146- bazel build :release
146+ bazel build :release --verbose_failures
147147 mv -f bazel-bin/bazel.tar.gz bazel-bin/bazel.tar.gz.sha256 .
148148
149149docker_image :
You can’t perform that action at this time.
0 commit comments