Fix PythonException for Python 3.12 #38
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: "C++ Lint" | |
on: | |
# always run on main branch | |
push: | |
branches: [ main ] | |
paths-ignore: | |
- 'README.md' | |
- 'CONTRIBUTING.md' | |
- 'LICENSE' | |
# run on PR to main branch if relevant files changed | |
pull_request: | |
branches: [ main ] | |
paths: | |
- 'src/**/*.cpp' | |
- 'include/**/*.h' | |
- 'test/**/*.cpp' | |
- 'test/**/*.h' | |
- 'examples/**/*.cpp' | |
- 'examples/**/*.h' | |
- '.github/workflows/cpp-lint.yml' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
lint: | |
name: "clang-tidy" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: jirutka/setup-alpine@v1 | |
with: | |
branch: v3.19 | |
- name: Install dependencies | |
run: | | |
apk update | |
apk add \ | |
cmake \ | |
ninja-build \ | |
g++ \ | |
boost-dev \ | |
boost-filesystem \ | |
boost-python3 \ | |
lua5.2-dev \ | |
python3-dev \ | |
fmt-dev \ | |
gtest-dev \ | |
clang-extra-tools | |
shell: alpine.sh --root {0} | |
- name: Fixup environment | |
run: | | |
ln -s liblua-5.2.so.0 /usr/lib/liblua-5.2.so | |
ln -s /usr/lib/ninja-build/bin/ninja /usr/bin/ninja | |
shell: alpine.sh --root {0} | |
- name: Generate compile_commands.json | |
run: | | |
cmake . -B build -G Ninja \ | |
-DPPPLUGIN_ENABLE_EXAMPLES=ON \ | |
-DPPPLUGIN_ENABLE_TESTS=ON \ | |
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON | |
shell: alpine.sh {0} | |
# Check all source and header C++ files; | |
# ignore files in the build directory or in hidden directories | |
- name: Execute clang-tidy | |
run: find . \( \( -path './build' -o -path '*/.*' \) -prune \) -o | |
\( -type f -a \( -iname '*.cpp' -o -iname '*.h' \) \) | |
-exec echo "Linting '{}'..." \; | |
-exec run-clang-tidy -p build -warnings-as-errors='*' {} + | |
shell: alpine.sh {0} |