Skip to content

readme: validation section — book invariants on three days, a message… #17

readme: validation section — book invariants on three days, a message…

readme: validation section — book invariants on three days, a message… #17

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
jobs:
gcc:
name: GCC
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
- run: cmake --build build
- run: ctest --test-dir build --output-on-failure
clang:
name: Clang
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: sudo apt-get update && sudo apt-get install -y libc++-dev libc++abi-dev
- run: >
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=clang++
-DCMAKE_CXX_FLAGS="-stdlib=libc++"
- run: cmake --build build
- run: ctest --test-dir build --output-on-failure
sanitizers:
name: ASan + UBSan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: >
cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug
-DCMAKE_CXX_FLAGS="-fsanitize=address,undefined -fno-sanitize-recover=all -O1 -g"
- run: cmake --build build
- run: ctest --test-dir build --output-on-failure
python:
name: Python (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
id: build-py
with:
python-version: "3.12"
- uses: actions/setup-python@v5
id: test-py
with:
python-version: "3.13"
- if: runner.os == 'Windows'
run: |
echo "CMAKE_GENERATOR=Ninja" >> "$GITHUB_ENV"
echo "CMAKE_ARGS=-DCMAKE_CXX_COMPILER=clang-cl" >> "$GITHUB_ENV"
- run: '"${{ steps.build-py.outputs.python-path }}" -m pip install ninja'
- run: '"${{ steps.build-py.outputs.python-path }}" -m pip wheel . -w dist --no-deps -v'
- run: '"${{ steps.test-py.outputs.python-path }}" -m pip install abi3audit pytest polars pyarrow'
- run: '"${{ steps.test-py.outputs.python-path }}" -m abi3audit --strict --report dist/*.whl'
- run: '"${{ steps.test-py.outputs.python-path }}" -m pip install --only-binary=:all: --find-links dist itch-book'
- run: '"${{ steps.test-py.outputs.python-path }}" -m pytest -q'
fuzz:
name: Fuzz (libFuzzer)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: wget -qO- https://apt.llvm.org/llvm.sh | sudo bash -s -- 19
- run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
- run: cmake --build build --target gen-synthetic
- run: >
clang++-19 -std=c++23 -O1 -g -fsanitize=fuzzer,address,undefined
-Iinclude -Ibuild/_deps/fixed_decimal-src/cpp/include
fuzz/fuzz_parse.cpp -o fuzz_parse
- run: |
mkdir corpus
./build/gen-synthetic corpus/seed.itch 2000 10 7
- run: ./fuzz_parse -max_total_time=60 -max_len=65536 corpus/