Skip to content

Safety

Safety #11

Workflow file for this run

name: Safety
on:
pull_request:
branches: [main]
workflow_dispatch:
schedule:
- cron: "23 4 * * 1"
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full
jobs:
miri:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- name: Set up nightly Rust with Miri
uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c
with:
toolchain: nightly
components: miri
- name: Prepare Miri
run: cargo miri setup
- name: Check core invariants
run: cargo miri test --lib --no-default-features
- name: Check public text constructors
run: cargo miri test --test basic --no-default-features
- name: Check byte interoperability
run: cargo miri test --test bytes --features bytes
fuzz-build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- name: Set up nightly Rust
uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c
with:
toolchain: nightly
- name: Install cargo-fuzz
run: cargo install cargo-fuzz --version 0.13.2 --locked
- name: Compile all libFuzzer and AddressSanitizer targets
run: cargo fuzz build