Skip to content

Build(deps): Bump docker/build-push-action from 4 to 5 #4

Build(deps): Bump docker/build-push-action from 4 to 5

Build(deps): Bump docker/build-push-action from 4 to 5 #4

Workflow file for this run

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@v3
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