Skip to content

cbor: limit nesting depth to avoid stack overflows on parse #133

cbor: limit nesting depth to avoid stack overflows on parse

cbor: limit nesting depth to avoid stack overflows on parse #133

Workflow file for this run

name: tests
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
test:
name: Test on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macOS-latest ]
steps:
- uses: actions/checkout@v5
- name: Build
run: cargo build --verbose
- name: Install cargo-hack
run: cargo install cargo-hack
- name: Build individual features
run: cargo hack build --each-feature
- name: Test individual features
run: cargo hack test --each-feature
- name: Test with all features
run: cargo test --all-features
wasm:
name: Test on WASM for ${{ matrix.target }}
runs-on: ubuntu-latest
strategy:
matrix:
target:
- wasm32-unknown-unknown
- wasm32-wasip1
steps:
- uses: actions/checkout@v5
- name: Install wasmtime and wasm-bindgen-cli
run: |
curl https://wasmtime.dev/install.sh -sSf | bash
echo "$HOME/.wasmtime/bin" >> $GITHUB_PATH
- name: Add target
run: rustup target add ${{ matrix.target }}
- name: Fetch dependencies
run: cargo fetch
- name: Install cargo-hack
run: cargo install cargo-hack
- name: Build individual features
run: cargo hack build --each-feature --target ${{ matrix.target }}
- name: Test individual features
if: matrix.target != 'wasm32-unknown-unknown'
env:
CARGO_TARGET_WASM32_WASIP1_RUNNER: wasmtime
RUSTFLAGS: -C link-arg=-zstack-size=8388608
run: cargo hack test --each-feature --target ${{ matrix.target }}
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- run: cargo fmt --all -- --check
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- run: cargo clippy --all-features -- -D warnings
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- run: cargo doc --all-features --no-deps
fuzz:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Install nightly toolchain
run: rustup toolchain install nightly --profile minimal
- name: Install cargo-fuzz
run: cargo install cargo-fuzz
- name: Run fuzzer for 1 minute
run: cargo +nightly fuzz run cbor -- -max_total_time=60
working-directory: fuzz