Skip to content

Commit

Permalink
Move clang-tidy steps into build_and_test.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
NikitaNikolaenko committed Jul 19, 2022
1 parent e5f643c commit 3cfbb05
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 123 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ jobs:
bazel-command: "dazel"
bazel-config: "--config=asan"
output-user_root: ""
eventuals-tidy-regex: |
"eventuals[\\\/]eventuals[\\\/]eventuals[\\\/][^.]+.(cc|h)" \
"eventuals[\\\/]eventuals[\\\/]test[\\\/][^.]+.(cc|h)"
- os: windows-2019
sudo-command: "" # The Windows runner already runs as root.
# Explicitly not using `dazel` here as we don't want to
Expand All @@ -51,6 +54,9 @@ jobs:
bazel-config: ""
# Fixes issue #248.
output-user_root: "--output_user_root=C:/bzl"
eventuals-tidy-regex: |
"eventuals[\\\/]eventuals[\\\/]eventuals[\\\/][^.]+.(cc|h)" \
"eventuals[\\\/]eventuals[\\\/]test[\\\/][^.]+.(cc|h)"
# Don't fail all workflows if one fails as we're still getting
# to a stable build right now and when one fails it doesn't mean
# they all will fail.
Expand Down Expand Up @@ -136,6 +142,24 @@ jobs:
--test_arg=--gtest_shuffle \
--test_arg=--gtest_repeat=100
- name: Extract Compile Commands
run: |
${{ matrix.bazel-command }} \
run \
refresh_cc_github_actions \
-- \
${{ matrix.output-user_root }} \
${{ matrix.bazel-config }} \
${{ env.BAZEL_REMOTE_CACHE }} \
--verbose_failures \
--compilation_mode=dbg \
--strip="never"
- name: Run clang-tidy
run: |
run-clang-tidy \
${{ matrix.eventuals-tidy-regex }}
- name: Debug using tmate (if failure)
uses: mxschmitt/action-tmate@v3
# Optionally enable tmate debugging if the workflow was manually-triggered
Expand Down
122 changes: 0 additions & 122 deletions .github/workflows/clang_tidy_check.yml

This file was deleted.

2 changes: 1 addition & 1 deletion BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ refresh_compile_commands(
refresh_compile_commands(
name = "refresh_cc_github_actions",
targets = {
"//test:eventuals": "",
"//...": "",
},
)

Expand Down

0 comments on commit 3cfbb05

Please sign in to comment.