Add safety comments #87
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Rust | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
env: | |
CARGO_INCREMENTAL: 0 | |
CARGO_TERM_COLOR: always | |
RUST_BACKTRACE: 1 | |
RUSTFLAGS: -D warnings | |
RUSTDOCFLAGS: -D warnings --cfg docsrs | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
rust: | |
- stable | |
- beta | |
- nightly | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: ${{ matrix.rust }} | |
override: true | |
components: rustfmt, clippy | |
- name: Build | |
run: cargo build --verbose | |
- name: Run tests with all features | |
run: cargo test --all-features --verbose | |
- name: Run tests without features | |
run: cargo test --no-default-features --verbose | |
- name: Package | |
run: cargo package | |
- name: Test package | |
run: cd $(find target/package/ -maxdepth 1 -mindepth 1 -type d) && cargo test | |
- name: Test package without features | |
run: cd $(find target/package/ -maxdepth 1 -mindepth 1 -type d) && cargo test --no-default-features | |
- name: Build docs | |
if: matrix.rust == 'nightly' | |
run: cargo doc --all-features --verbose | |
- name: Check formatting | |
if: matrix.rust == 'stable' | |
run: cargo fmt --all --check | |
- name: Check clippy | |
if: matrix.rust == 'stable' | |
run: cargo clippy --all-features --lib --tests --examples --verbose | |
- name: Check benchmarks with clippy | |
if: matrix.rust == 'nightly' | |
run: cargo clippy --all-features --benches --verbose | |
- name: Check fuzz tests with clippy | |
if: matrix.rust == 'stable' | |
working-directory: fuzz | |
run: cargo clippy --all-features --all-targets --verbose | |
- name: Check fuzz tests formatting | |
if: matrix.rust == 'stable' | |
working-directory: fuzz | |
run: cargo fmt --all --check | |
msrv: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install msrv toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: 1.36 | |
override: true | |
- name: Build | |
run: cargo build --verbose --all-features | |
regen: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Regen | |
run: cd scripts && python3 unicode.py | |
- name: Diff tables | |
run: diff src/tables.rs scripts/tables.rs | |
- name: Diff tests | |
run: diff tests/data/normalization_tests.rs scripts/normalization_tests.rs |