name: ci
on:
push:
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- uses: Swatinem/rust-cache@v2
- name: Format
run: cargo fmt --all -- --check
- name: Docs (warnings denied)
run: RUSTDOCFLAGS="-D warnings" cargo doc --no-deps
- name: Codec-only build (no image io)
run: cargo build -p manifold-codec --no-default-features
- name: Package dry-run
run: cargo package -p manifold-codec --no-verify --allow-dirty && echo packaged
- name: C-API tests
run: cargo test -p manifold-codec-capi
- name: Examples
run: cargo run --example roundtrip
- name: External consumer install (published crate)
run: |
cargo new --lib /tmp/manifold-consumer-ci
(cd /tmp/manifold-consumer-ci && cargo add manifold-codec && cargo check)
- name: Clippy
run: cargo clippy --all-targets -- -D warnings
- name: Unit + conformance tests
run: cargo test
- name: Release build
run: cargo build --release
- name: CLI roundtrip + fuzz (bounded)
run: |
cargo run --release -- encode testdata/screenshot_640x400.png -o /tmp/s.mnf5
cargo run --release -- verify testdata/screenshot_640x400.png /tmp/s.mnf5
cargo run --release -- encode testdata/screenshot_640x400.png -o /tmp/g.mnf5 --geom
cargo run --release -- verify testdata/screenshot_640x400.png /tmp/g.mnf5
python3 scripts/fuzz.py --trials 300
semver:
runs-on: ubuntu-latest
needs: test
continue-on-error: true
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: obi1kenobi/cargo-semver-checks-action@v2
with:
crate-name: manifold-codec