fix wrong string compare on python device repr #6
Workflow file for this run
This file contains hidden or 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: Clang-Tidy CI | |
| on: | |
| push: | |
| branches: ['**'] | |
| pull_request: | |
| branches: ['**'] | |
| jobs: | |
| clang-tidy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4 | |
| - name: Install clang tidy dependencies | |
| run: | | |
| sudo apt update | |
| sudo apt install -y clang clang-tidy cmake g++ ninja-build | |
| - name: Install SDK dependencies | |
| run: | | |
| sudo apt update | |
| sudo apt-get install -qq build-essential xorg-dev libgl1-mesa-dev libglu1-mesa-dev libglew-dev libglm-dev; | |
| sudo apt-get install -qq libusb-1.0-0-dev; | |
| sudo apt-get install -qq libgtk-3-dev; | |
| sudo apt-get install libglfw3-dev libglfw3; | |
| - name: Configure project with CMake | |
| run: | | |
| cmake -S . -B build \ | |
| -DCMAKE_CXX_COMPILER=clang++ \ | |
| -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ | |
| -DCHECK_FOR_UPDATES=OFF \ | |
| -DCMAKE_BUILD_TYPE=Release | |
| - name: Build project | |
| run: cmake --build build -j$(nproc) | |
| # 👇 This stage writes the .clang-tidy file | |
| - name: Create .clang-tidy config | |
| run: | | |
| cat <<'EOF' > .clang-tidy | |
| Checks: > | |
| -*, | |
| readability-string-compare, | |
| bugprone-suspicious-string-compare, | |
| bugprone-*, | |
| readability-implicit-bool-conversion, | |
| performance-inefficient-string-concatenation, | |
| modernize-use-nullptr, | |
| modernize-use-override, | |
| modernize-use-auto, | |
| misc-unused-parameters | |
| WarningsAsErrors: '*' | |
| HeaderFilterRegex: 'src/.*' | |
| FormatStyle: none | |
| CheckOptions: | |
| - key: readability-implicit-bool-conversion.AllowIntegerConditions | |
| value: 'false' | |
| EOF | |
| - name: Run clang-tidy | |
| run: | | |
| echo "Running clang-tidy..." | |
| cp build/compile_commands.json . | |
| clang-tidy -p . $(find src -name '*.cpp') 2>&1 | tee clang-tidy.log | |
| if grep -E "warning:|error:" clang-tidy.log; then | |
| echo "❌ Clang-Tidy found issues." | |
| exit 1 | |
| else | |
| echo "✅ Clang-Tidy passed cleanly." | |
| fi |