ci: remove trailing whitespace check, fix cppcheck to exit clean #35
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
| # Validate that the project builds on Ubuntu and macOS (no model download). | |
| name: CI Build | |
| on: | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Build (Ubuntu) | |
| if: matrix.os == 'ubuntu-latest' | |
| run: | | |
| sudo apt-get update -qq | |
| sudo apt-get install -y -qq cmake build-essential pkg-config libopenblas-dev | |
| mkdir build && cd build | |
| cmake .. -DGGML_BLAS=ON | |
| cmake --build . --config Release -j$(nproc) | |
| - name: Build (macOS) | |
| if: matrix.os == 'macos-latest' | |
| run: | | |
| mkdir build && cd build | |
| cmake .. | |
| cmake --build . --config Release -j$(sysctl -n hw.ncpu) | |
| - name: Smoke test | |
| run: | | |
| ./build/ace-qwen3 --help 2>&1 | head -5 | |
| ./build/dit-vae --help 2>&1 | head -5 | |
| ./build/quantize --help 2>&1 | head -3 | |
| lint: | |
| name: Lint & Static Analysis | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'pull_request' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install lint tools | |
| run: | | |
| sudo apt-get update -qq | |
| sudo apt-get install -y -qq clang-format clang-tidy cppcheck | |
| - name: Run clang-format (check mode) | |
| run: | | |
| find . \ | |
| \( -path './.git' -o -path './ggml' -o -path './build' -o -path './vendor' -o -path './mp3' \) -prune -o \ | |
| -type f \( -name '*.c' -o -name '*.h' -o -name '*.cc' -o -name '*.cpp' -o -name '*.hpp' \) \ | |
| -print0 | xargs -0 clang-format --dry-run --Werror | |
| - name: Run cppcheck | |
| run: | | |
| cppcheck --enable=all --error-exitcode=1 --inline-suppr \ | |
| --suppress=missingIncludeSystem \ | |
| --suppress=missingInclude \ | |
| --suppress=cstyleCast \ | |
| --suppress=constVariable \ | |
| --suppress=constVariablePointer \ | |
| --suppress=constParameterPointer \ | |
| --suppress=variableScope \ | |
| --suppress=uselessCallsSubstr \ | |
| --suppress=useStlAlgorithm \ | |
| --suppress=shiftNegativeLHS \ | |
| -i ggml -i build -i .git -i mp3 \ | |
| . |