diff --git a/.github/workflows/cpp-linter.yml b/.github/workflows/cpp-linter.yml new file mode 100644 index 0000000..ad8f6fd --- /dev/null +++ b/.github/workflows/cpp-linter.yml @@ -0,0 +1,26 @@ +name: C++ Lint + +on: + workflow_dispatch: + push: + branches: + [master, main] + pull_request: + branches: + [master, main] + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y clang-tidy + + - name: Run clang-tidy + run: | + find . -name '*.cpp' -o -name '*.hh' | xargs clang-tidy --quiet