Skip to content

Commit

Permalink
Merge pull request #31 from ewanwm/workflow_fix_clang_tidy
Browse files Browse the repository at this point in the history
Workflow fix clang tidy
  • Loading branch information
ewanwm authored Jul 25, 2024
2 parents b356bfe + 0fbd05c commit 28e9b71
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/cpp-linter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,31 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set Flags
run: export USE_CUDA=0

- name: Install Protobuf
run: sudo apt install protobuf-compiler

- name: Install Python dependencies
uses: py-actions/py-dependency-install@v4
with:
path: "PyTorch_requirements.txt"

- name: Configure CMake
# Configure CMake so we can get a compile_commands.json so that clang-tidy won't be angry about missing headers any more
run: cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_PREFIX_PATH=`python3 -c 'import torch;print(torch.utils.cmake_prefix_path)'` -B ${{github.workspace}} -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}


- uses: cpp-linter/cpp-linter-action@main
id: linter
continue-on-error: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
style: "Microsoft"
ignore: '.github|_deps|CMakeFiles'
format-review: true
tidy-review: true
files-changed-only: false
Expand Down

0 comments on commit 28e9b71

Please sign in to comment.