bd17f50f9b
Agents: - cmake-expert: fix stale CMake version (4.1 -> 3.22), add OpenSSL/xxHash deps - integrator: fix stale test.py references to tests/integration/, update CI docs - test-writer: update integration test patterns for modular test structure - reviewer: new comprehensive PR reviewer (code, build, CI, docs, quality) Bug fixes: - delta.c: set instructions[i].type = DELTA_INSTR_LITERAL in deserialize - scanner.c: free ArrayList when directory_scanner_next returns NULL CI: - Add sanitizer job (ASan + UBSan) with LSAN suppressions for pre-existing leaks - Add clang-tidy job with proper warning/error detection - Remove || true masking (fixes now make sanitizer useful) Cleanup: - gitignore build-asan/ - .lsan-suppressions.txt for known CLI config leaks
83 lines
2.3 KiB
YAML
83 lines
2.3 KiB
YAML
name: CI
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
container: gitea.tap-tap.win/taptap/fastsync-ci:v7
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: clang-format check
|
|
run: find src/ tests/ -name '*.c' -o -name '*.h' | xargs clang-format --dry-run --Werror
|
|
|
|
- name: cppcheck
|
|
run: cppcheck --enable=warning,style,performance,portability --suppress=missingIncludeSystem --error-exitcode=1 --inline-suppr src/ tests/
|
|
|
|
build-and-test:
|
|
runs-on: ubuntu-latest
|
|
container: gitea.tap-tap.win/taptap/fastsync-ci:v7
|
|
needs: lint
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Configure
|
|
run: cmake -B build -S . -DSTRICT_WARNINGS=ON
|
|
|
|
- name: Build
|
|
run: cmake --build build -j$(nproc)
|
|
|
|
- name: Unit Tests
|
|
run: ./build/tests
|
|
|
|
- name: Integration Tests
|
|
run: python3 -m pytest tests/ -v --tb=short
|
|
|
|
sanitizers:
|
|
runs-on: ubuntu-latest
|
|
container: gitea.tap-tap.win/taptap/fastsync-ci:v7
|
|
needs: lint
|
|
strategy:
|
|
matrix:
|
|
sanitizer: [address]
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Configure
|
|
run: cmake -B build-${{ matrix.sanitizer }} -S . -DSANITIZER=${{ matrix.sanitizer }}
|
|
|
|
- name: Build
|
|
run: cmake --build build-${{ matrix.sanitizer }} -j$(nproc)
|
|
|
|
- name: Unit Tests
|
|
run: ./build-${{ matrix.sanitizer }}/tests
|
|
|
|
- name: Integration Tests
|
|
run: LSAN_OPTIONS=suppressions=.lsan-suppressions.txt python3 -m pytest tests/ -v --tb=short
|
|
|
|
clang-tidy:
|
|
runs-on: ubuntu-latest
|
|
container: gitea.tap-tap.win/taptap/fastsync-ci:v7
|
|
needs: lint
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Configure (generate compile_commands.json)
|
|
run: cmake -B build -S .
|
|
|
|
- name: Run clang-tidy (informational, non-blocking)
|
|
run: |
|
|
find src/ -name '*.c' | xargs clang-tidy -p build \
|
|
--checks='-*,bugprone-*,clang-analyzer-*,misc-*,-misc-no-recursion' \
|
|
2>&1 | tee clang-tidy-output.txt
|
|
if grep -q -E " error:| warning:" clang-tidy-output.txt; then
|
|
echo "::warning::clang-tidy found issues — review the output above"
|
|
else
|
|
echo "clang-tidy: no issues found"
|
|
fi
|