Skip to content

Create benchmarking-track-main.yaml to continuously track the perform… #60

Create benchmarking-track-main.yaml to continuously track the perform…

Create benchmarking-track-main.yaml to continuously track the perform… #60

Workflow file for this run

name: cpp-linter
on:
pull_request:
branches: [ "main" ]
workflow_dispatch:
jobs:
cpp-linter:
permissions: write-all
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}}
## horrible little hack to put spdlog include files somewhere that clang-tidy can find them
## it doesn't seem to like headers included by cpm
- name: Move spdlog
run: |
cp -r _deps/spdlog-src/include/spdlog .
cp spdlog/spdlog* .
- 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|spdlog*'
format-review: true
tidy-review: true
files-changed-only: true
thread-comments: true
tidy-checks: 'boost-*,bugprone-*,performance-*,readability-*,portability-*,modernize-*,clang-analyzer-*,cppcoreguidelines-*,-modernize-use-trailing-return-type,-modernize-use-emplace,-readability-redundant-access-specifiers'
- name: Fail fast?!
if: steps.linter.outputs.checks-failed != 0
#run: |
# echo "some linter checks failed. ${{ steps.linter.outputs.checks-failed }}"
# for actual deployment
run: exit 1