Skip to content

Add criterion benchmarks for contact manifolds and GJK/EPA (all four crates) #1038

Add criterion benchmarks for contact manifolds and GJK/EPA (all four crates)

Add criterion benchmarks for contact manifolds and GJK/EPA (all four crates) #1038

Workflow file for this run

name: parry CI build
on:
push:
branches: [master, v0.*]
pull_request:
branches: [master, v0.*]
env:
CARGO_TERM_COLOR: always
jobs:
check-fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check formatting
run: cargo fmt -- --check
clippy:
runs-on: ubuntu-latest
env:
RUSTFLAGS: -D warnings
steps:
- uses: actions/checkout@v4
- name: Clippy
run: cargo clippy
build-native:
runs-on: ubuntu-latest
env:
RUSTFLAGS: -D warnings
steps:
- uses: actions/checkout@v4
- run: sudo apt-get install -y cmake libxcb-composite0-dev
- name: Build parry2d
run: cargo build --verbose -p parry2d;
- name: Build parry3d
run: cargo build --verbose -p parry3d;
- name: Build parry3d 8-lanes SIMD
run: cd crates/parry3d; cargo build --verbose --features simd8;
- name: Check serialization
run: cargo check --features bytemuck-serialize,serde-serialize,rkyv;
- name: Check enhanced-determinism
run: cargo check --features enhanced-determinism
publish-dry-run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: sudo apt-get install -y cmake libxcb-composite0-dev
# Builds and verifies each crate in isolation (the same way `cargo publish`
# does), which catches bugs hidden by workspace feature unification.
- name: Publish dry-run
run: bash publish.sh --dry-run
tests:
runs-on: ubuntu-latest
env:
RUSTFLAGS: -D warnings
steps:
- uses: actions/checkout@v4
- run: sudo apt-get install -y cmake libxcb-composite0-dev
# WORKAROUND: zune-core 0.5.2 made its `warn!` macro expand to nothing, which breaks
# zune-jpeg (all 0.5.x), where it is called in expression position. Reached through the
# kiss3d -> gltf/image dev-dependency. Remove once upstream is fixed.
- name: Pin zune-core (0.5.2 breaks zune-jpeg)
run: cargo update -p zune-core@0.5 --precise 0.5.1
- name: Run tests
run: cargo test --features wavefront
- name: Run tests (parallel)
run: cargo test --features parallel
build-wasm:
runs-on: ubuntu-latest
env:
RUSTFLAGS: -D warnings
steps:
- uses: actions/checkout@v4
- run: rustup target add wasm32-unknown-unknown
- name: build parry2d
run: cd crates/parry2d && cargo build --verbose --target wasm32-unknown-unknown;
- name: build parry3d
run: cd crates/parry3d && cargo build --verbose --target wasm32-unknown-unknown;
build-no-std:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install stable Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
targets: "x86_64-unknown-linux-gnu,thumbv7em-none-eabihf"
- name: build x86_64-unknown-linux-gnu
run: cargo build --verbose --no-default-features --features required-features --target=x86_64-unknown-linux-gnu
- name: build thumbv7em-none-eabihf
run: cargo build --verbose --no-default-features --features required-features --target=thumbv7em-none-eabihf
- name: build thumbv7em-none-eabihf with alloc
run: cargo build --verbose --no-default-features --features required-features,alloc --target=thumbv7em-none-eabihf
build-doc:
runs-on: ubuntu-latest
env:
RUSTDOCFLAGS: -D warnings
steps:
- uses: actions/checkout@v4
- name: install stable Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- name: cargo doc
run: cargo doc --workspace --features bytemuck-serialize,serde-serialize,parallel --no-deps --document-private-items # TODO: rkyv
check-benchmarks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install nightly Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
# See the `tests` job: zune-core 0.5.2 breaks zune-jpeg. Remove once upstream is fixed.
- name: Pin zune-core (0.5.2 breaks zune-jpeg)
run: cargo update -p zune-core@0.5 --precise 0.5.1
- name: check benchmarks
run: cargo +nightly check --benches