Build(deps): Bump actions/checkout from 3 to 4 #231
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Static Analysis | |
on: | |
pull_request_target: | |
paths-ignore: | |
- 'docs/**' | |
jobs: | |
clang-tidy: | |
runs-on: ubuntu-latest | |
container: ghcr.io/deepmodeling/abacus-gnu | |
steps: | |
- name: Checkout Pull Request | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
- name: Setup clang-tidy | |
run: | | |
apt-get update && apt-get install -y --no-install-recommends clang-format clang-tidy | |
- name: Generate Build Commands | |
run: | | |
cmake -B build -DCMAKE_EXPORT_COMPILE_COMMANDS=1 | |
- name: Run clang-tidy | |
run: | | |
git config --global --add safe.directory /__w/abacus-develop/abacus-develop | |
git diff -U0 HEAD^ | clang-tidy-diff -p1 -path build -export-fixes fixes.yml | |
- name: Pull request comments from clang-tidy reports | |
uses: platisd/clang-tidy-pr-comments@master | |
with: | |
# The GitHub token (or a personal access token) | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
# The path to the clang-tidy fixes generated previously | |
clang_tidy_fixes: fixes.yml | |
# Optionally set to true if you want the Action to request | |
# changes in case warnings are found | |
request_changes: false | |
# Optionally set the number of comments per review | |
# to avoid GitHub API timeouts for heavily loaded | |
# pull requests | |
suggestions_per_comment: 10 | |
repo_path_prefix: /__w |