Skip to content

Commit

Permalink
tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
john-h-kastner-aws committed Jan 10, 2024
1 parent b8daa61 commit 14eea06
Showing 1 changed file with 43 additions and 7 deletions.
50 changes: 43 additions & 7 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,60 @@ jobs:
matrix:
toolchain:
- stable

# Set `RUSTFLAGS` once for all cargo commands so that changing these flags
# doesn't trigger a fresh build.
env:
RUSTFLAGS:'-D warnings -F unsafe-code'

steps:
- uses: actions/checkout@v3
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
- run: ./panic_safety.sh
- run: cargo fmt --all --check
- run: RUSTFLAGS="-D warnings -F unsafe-code" cargo build --all-features --verbose
- run: cargo doc --all-features --no-deps
# Clippy is configured by `.cargo/config.toml` to deny on lints like
# `unwrap_used`. They aren't detected by `panic_safety.sh` which only
# looks for comments where we've added an `allow` directive for clippy.
- run: cargo clippy --all-features

# All targets are run with the same `RUSTFLAGS
- run: cargo build --verbose
- run: cargo test --verbose
- run: cargo test --verbose -- --ignored
- run: cargo bench --no-run --profile=dev
- run: cargo test --verbose --features "experimental"
- run: cargo test --verbose --no-default-features
- run: cargo build --verbose --features "experimental"
- run: cargo test --verbose --features "experimental"
- run: cargo audit --deny warnings # For some reason this hangs if you don't cargo build first

# Clippy in its own job so that the `RUSTFLAGS` set for `build_and_test`
# don't effect it. As a side effect, this will run in parallel, saving some
# time.
clippy:
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
- stable

steps:
- uses: actions/checkout@v3
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
# Clippy is configured by `.cargo/config.toml` to deny on lints like
# `unwrap_used`. They aren't detected by `panic_safety.sh` which only
# looks for comments where we've added an `allow` directive for clippy.
- run: cargo clippy --all-features

# Run `cargo fmt` independently so that tests are executed even if you forgot
# to format before pushing.
format:
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
- stable

steps:
- uses: actions/checkout@v3
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
- run: cargo fmt --all --check

cargo-deny:
name: cargo deny
runs-on: ubuntu-22.04
Expand Down

0 comments on commit 14eea06

Please sign in to comment.