CI #5
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: linter | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| jobs: | |
| linter-build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - run: | | |
| sudo apt update | |
| - run: | | |
| sudo apt update && sudo apt install -y \ | |
| clang \ | |
| llvm \ | |
| lldb \ | |
| gcc \ | |
| g++ \ | |
| cppcheck \ | |
| clang-tools \ | |
| libclang-dev \ | |
| clang-format \ | |
| python3-dev | |
| linter-formatter: | |
| needs: linter-build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - run: | | |
| cd src && find . \( -name "*.c" -o -name "*.h" \) -exec clang-format -i {} \; | |
| linter-aggressive_flags: | |
| needs: linter-build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Install dependencies | |
| run: | | |
| wget https://apt.llvm.org/llvm.sh | |
| chmod +x llvm.sh | |
| sudo ./llvm.sh 18 | |
| sudo apt install -y clang-18 python3-dev | |
| - name: Build liburing | |
| run: cd requirements/liburing && make | |
| - run: | | |
| CC=clang-18 CFLAGS="-O0 -g3 \ | |
| -Wall \ | |
| -Wextra \ | |
| -Werror \ | |
| -Wshadow \ | |
| -Wconversion \ | |
| -Wcast-align \ | |
| -Wstrict-prototypes \ | |
| -Wmissing-prototypes \ | |
| -Wpointer-arith \ | |
| -Wformat=2 \ | |
| -Wundef \ | |
| -Wwrite-strings \ | |
| -Wswitch-enum \ | |
| -Wunreachable-code \ | |
| -Wdouble-promotion \ | |
| -Wfloat-equal \ | |
| -fstack-protector-strong \ | |
| -fno-omit-frame-pointer \ | |
| -isystem requirements/liburing/include \ | |
| -isystem requirements/liburing/src/include \ | |
| -isystem requirements/liburing/src \ | |
| -isystem requirements/liburing" \ | |
| python3 setup.py build_ext --inplace | |
| linter-cppcheck: | |
| needs: linter-build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - run: sudo apt update && sudo apt install -y cppcheck | |
| - run: | | |
| mkdir -p cpp-check-results | |
| cppcheck \ | |
| --cppcheck-build-dir=cpp-check-results \ | |
| --enable=all \ | |
| --inconclusive \ | |
| --force \ | |
| --inline-suppr \ | |
| --check-level=exhaustive \ | |
| --suppress=missingIncludeSystem \ | |
| --suppress=missingInclude \ | |
| -I ./src ./src |