|
11 | 11 | jobs: |
12 | 12 | lint-tidier-job: |
13 | 13 | name: Auto-apply clang-tidy |
14 | | - |
15 | | - runs-on: ubuntu-latest |
16 | | - steps: |
17 | 14 | # 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 | | - |
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