Skip to content

Commit 2f5e353

Browse files
committed
Update to allow clazy-standalone runs too
Signed-off-by: Geoff Hutchison <[email protected]>
1 parent d231082 commit 2f5e353

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

.github/workflows/clang-tidy.yml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Clang-Tidy Static Analysis
22

3-
on:
4-
workflow_dispatch:
3+
on:
4+
[pull_request, workflow_dispatch]
55

66
env:
77
FEATURES: -DUSE_VTK=ON -DBUILD_GPL_PLUGINS=ON -DWITH_COORDGEN=OFF -DUSE_YAEHMOP=ON
@@ -29,10 +29,11 @@ jobs:
2929
- name: Install Dependencies (Linux)
3030
if: runner.os == 'Linux'
3131
run: |
32+
sudo add-apt-repository -y universe
3233
sudo apt-get -qq update
33-
sudo apt-get -qq install ninja-build bear libeigen3-dev libboost-all-dev libglew-dev libxml2-dev
34+
sudo apt-get -qq install ninja-build bear libeigen3-dev libboost-all-dev libglew-dev libxml2-dev
3435
sudo apt-get -qq install qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools libqt5x11extras5-dev libqt5svg5-dev
35-
sudo apt-get -qq install clang-tidy
36+
sudo apt-get -qq install clang-tidy clazy
3637
3738
- name: Install Qt
3839
uses: jurplel/install-qt-action@v3
@@ -82,11 +83,15 @@ jobs:
8283
bear -- ninja
8384
shell: bash
8485
working-directory: ${{ runner.workspace }}/build
85-
86+
8687
- name: Create results directory
8788
run: |
8889
mkdir ${{ runner.workspace }}/clang-tidy-result
89-
90+
91+
# let's try manually running clazy
92+
- name: Setup tmate session
93+
uses: mxschmitt/action-tmate@v3
94+
9095
- name: Analyze
9196
run: |
9297
# generate the fixes and we'll make a diff
@@ -96,7 +101,7 @@ jobs:
96101
echo "Generating diff"
97102
git diff >${{ runner.workspace }}/clang-tidy-result/tidy.patch
98103
working-directory: ${{ runner.workspace }}/avogadrolibs
99-
104+
100105
- name: Save PR metadata
101106
run: |
102107
echo ${{ github.event.number }} > ${{ runner.workspace }}/clang-tidy-result/pr-id.txt
@@ -107,7 +112,3 @@ jobs:
107112
with:
108113
name: clang-tidy-result
109114
path: ${{ runner.workspace }}/clang-tidy-result/
110-
111-
- name: Setup tmate session
112-
if: ${{ failure() }}
113-
uses: mxschmitt/action-tmate@v3

0 commit comments

Comments
 (0)