docs: clarify anime release date semantics #69
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: ci | |
| # Two guard legs, run in parallel: MSVC /analyze lifetime gate (compile-time) and | |
| # AddressSanitizer over the logic tests (runtime). Both fail the build on a dangling | |
| # view / use-after-free — the two catch different classes (see the ASan job note). | |
| on: | |
| push: | |
| branches: [nightly, master, main] | |
| pull_request: | |
| branches: [nightly, master, main] | |
| workflow_dispatch: | |
| jobs: | |
| # ---- Compile-time: /analyze lifetime rules promoted to errors (ANIPARSE_ANALYZE). | |
| analyze: | |
| runs-on: windows-latest | |
| env: | |
| VCPKG_DEFAULT_BINARY_CACHE: ${{ github.workspace }}/vcpkg_cache | |
| steps: | |
| - name: Checkout (with submodules) | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| fetch-depth: 0 | |
| - name: Set up MSVC (x64) | |
| uses: ilammy/msvc-dev-cmd@v1 | |
| with: | |
| arch: x64 | |
| # CMake 4.x dropped compatibility with cmake_minimum_required(< 3.5), which | |
| # vendored curlpp/c-ares still declare. Pin a 3.x line, matching coverage.yml. | |
| - name: Pin CMake (< 4) | |
| uses: jwlawson/actions-setup-cmake@v2 | |
| with: | |
| cmake-version: '3.31.6' | |
| - name: Export VCPKG_ROOT and prepare binary cache dir | |
| shell: pwsh | |
| run: | | |
| echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" >> $env:GITHUB_ENV | |
| New-Item -ItemType Directory -Force -Path "$env:VCPKG_DEFAULT_BINARY_CACHE" | Out-Null | |
| - name: Cache vcpkg binaries | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.VCPKG_DEFAULT_BINARY_CACHE }} | |
| key: vcpkg-${{ runner.os }}-${{ hashFiles('vcpkg.json', 'libasyncnet/vcpkg.json') }} | |
| restore-keys: | | |
| vcpkg-${{ runner.os }}- | |
| - name: Configure (x64-debug + /analyze gate) | |
| shell: pwsh | |
| run: cmake --preset x64-debug -D ANIPARSE_ANALYZE=ON | |
| # /analyze is PRIVATE to `aniparse`; build just that target to run the gate. | |
| - name: Build library under /analyze | |
| shell: pwsh | |
| run: cmake --build out/build/x64-debug --target aniparse | |
| # ---- Runtime: AddressSanitizer over the backend-agnostic logic tests. The only | |
| # layer that catches a temporary laundered through a borrow. Curl backend off so | |
| # only our own code is instrumented (leaner; vendored transport need not be). | |
| asan: | |
| runs-on: windows-latest | |
| env: | |
| VCPKG_DEFAULT_BINARY_CACHE: ${{ github.workspace }}/vcpkg_cache | |
| # /EHsc /DWIN32 /D_WINDOWS replicate CMake's default CXX flags (we replace, not | |
| # append, the cache var) — without /EHsc boost treats exceptions as disabled and | |
| # leaves boost::throw_exception unresolved at link. String/vector annotations are | |
| # disabled to avoid false positives against the non-instrumented vcpkg boost. | |
| ASAN_CXX_FLAGS: "/EHsc /DWIN32 /D_WINDOWS /fsanitize=address /Zi /D_DISABLE_STRING_ANNOTATION /D_DISABLE_VECTOR_ANNOTATION" | |
| steps: | |
| - name: Checkout (with submodules) | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| fetch-depth: 0 | |
| - name: Set up MSVC (x64) | |
| uses: ilammy/msvc-dev-cmd@v1 | |
| with: | |
| arch: x64 | |
| - name: Pin CMake (< 4) | |
| uses: jwlawson/actions-setup-cmake@v2 | |
| with: | |
| cmake-version: '3.31.6' | |
| - name: Export VCPKG_ROOT and prepare binary cache dir | |
| shell: pwsh | |
| run: | | |
| echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" >> $env:GITHUB_ENV | |
| New-Item -ItemType Directory -Force -Path "$env:VCPKG_DEFAULT_BINARY_CACHE" | Out-Null | |
| - name: Cache vcpkg binaries | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.VCPKG_DEFAULT_BINARY_CACHE }} | |
| key: vcpkg-asan-${{ runner.os }}-${{ hashFiles('vcpkg.json', 'libasyncnet/vcpkg.json') }} | |
| restore-keys: | | |
| vcpkg-asan-${{ runner.os }}- | |
| - name: Configure (x64-debug + ASan, curl backend off) | |
| shell: pwsh | |
| run: > | |
| cmake --preset x64-debug | |
| -D "CMAKE_CXX_FLAGS=$env:ASAN_CXX_FLAGS" | |
| -D ANIPARSE_CURL_BACKEND=OFF | |
| -D ANIPARSE_BUILD_TESTS=ON | |
| - name: Build logic tests under ASan | |
| shell: pwsh | |
| run: cmake --build out/build/x64-debug --target aniparse-tests | |
| # msvc-dev-cmd put the MSVC toolchain bin (with the ASan runtime DLL) on PATH, | |
| # so the instrumented exe resolves clang_rt.asan_dynamic at launch. abort_on_error | |
| # makes any report a nonzero exit that fails the job. | |
| - name: Run tests under ASan | |
| shell: pwsh | |
| env: | |
| ASAN_OPTIONS: abort_on_error=1 | |
| run: out\build\x64-debug\tests\aniparse-tests.exe |