Skip to content

Commit 903eaee

Browse files
committed
Use common lint-tidier workflow
1 parent f09aab2 commit 903eaee

File tree

1 file changed

+1
-48
lines changed

1 file changed

+1
-48
lines changed

.github/workflows/lint-tidier.yml

Lines changed: 1 addition & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -11,52 +11,5 @@ on:
1111
jobs:
1212
lint-tidier-job:
1313
name: Auto-apply clang-tidy
14-
15-
runs-on: ubuntu-latest
16-
steps:
1714
# FIXME: use main once merged
18-
- name: Setup the build environment
19-
uses: ultimaker/cura-workflows/.github/actions/setup-build-environment@CURA-11622_conan_v2
20-
21-
- uses: greguintow/get-diff-action@v7
22-
with:
23-
PATTERNS: |
24-
include/**/*.h*
25-
src/**/*.c*
26-
27-
- name: Install dependencies
28-
run: conan install . -c tools.build:skip_test=False -s *:build_type=Release --build=missing --update
29-
30-
- name: Build CuraEngine and tests
31-
run: |
32-
source build/Release/generators/conanbuild.sh
33-
cmake --preset release
34-
cmake --build --preset release
35-
36-
- name: Create results directory
37-
run: mkdir linter-result
38-
39-
- name: Diagnose file(s)
40-
if: env.GIT_DIFF && !env.MATCHED_FILES
41-
continue-on-error: true
42-
run: |
43-
clang-tidy -p ./build/Release/ --config-file=.clang-tidy ${{ env.GIT_DIFF_FILTERED }} --export-fixes=linter-result/fixes.yml
44-
45-
- name: Save PR metadata
46-
run: |
47-
echo ${{ github.event.number }} > linter-result/pr-id.txt
48-
echo ${{ github.event.pull_request.head.repo.full_name }} > linter-result/pr-head-repo.txt
49-
echo ${{ github.event.pull_request.head.sha }} > linter-result/pr-head-sha.txt
50-
51-
- uses: actions/upload-artifact@v4
52-
with:
53-
name: linter-result
54-
path: linter-result/
55-
56-
- name: Run clang-tidy-pr-comments action
57-
uses: platisd/[email protected]
58-
with:
59-
github_token: ${{ secrets.GITHUB_TOKEN }}
60-
clang_tidy_fixes: linter-result/fixes.yml
61-
request_changes: true
62-
suggestions_per_comment: 30
15+
uses: ultimaker/cura-workflows/.github/workflows/lint-tidier.yml@CURA-11622_conan_v2

0 commit comments

Comments
 (0)