feat: add zeroize
feature
#49
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: CI | |
on: | |
push: | |
branches: [main] | |
tags: ['**'] | |
pull_request: | |
branches: [main] | |
permissions: | |
contents: read | |
env: | |
RUST_TOOLCHAIN: '1.77.1' | |
RUST_TOOLCHAIN_RUSTFMT: nightly | |
CARGO_TERM_COLOR: always | |
jobs: | |
rustfmt: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Rust | |
run: | | |
rustup set profile minimal | |
rustup toolchain install "$RUST_TOOLCHAIN_RUSTFMT" --component rustfmt | |
rustup override set "$RUST_TOOLCHAIN_RUSTFMT" | |
- name: cargo fmt | |
run: cargo fmt --all -- --check | |
check: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Rust | |
run: | | |
rustup set profile minimal | |
rustup toolchain install "$RUST_TOOLCHAIN" | |
rustup override set "$RUST_TOOLCHAIN" | |
- uses: Swatinem/rust-cache@v2 | |
- name: Install cargo-hack | |
uses: taiki-e/install-action@v2 | |
with: | |
tool: cargo-hack | |
- name: cargo check | |
run: cargo hack check --feature-powerset --no-dev-deps | |
check-msrv: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Rust | |
run: | | |
export RUST_TOOLCHAIN_MSRV=$(cargo read-manifest | jq -r '.rust_version') | |
rustup set profile minimal | |
rustup toolchain install "$RUST_TOOLCHAIN_MSRV" | |
rustup override set "$RUST_TOOLCHAIN_MSRV" | |
- uses: Swatinem/rust-cache@v2 | |
- name: Install cargo-hack | |
uses: taiki-e/install-action@v2 | |
with: | |
tool: cargo-hack | |
- name: cargo check | |
run: cargo hack check --feature-powerset --no-dev-deps | |
clippy: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Rust | |
run: | | |
rustup set profile minimal | |
rustup toolchain install "$RUST_TOOLCHAIN" --component clippy | |
rustup override set "$RUST_TOOLCHAIN" | |
- uses: Swatinem/rust-cache@v2 | |
- name: cargo clippy | |
run: cargo clippy --all-targets --all-features -- -D warnings | |
test: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Rust | |
run: | | |
rustup set profile minimal | |
rustup toolchain install "$RUST_TOOLCHAIN" | |
rustup override set "$RUST_TOOLCHAIN" | |
- uses: Swatinem/rust-cache@v2 | |
- name: cargo test | |
run: cargo test --no-fail-fast --workspace --all-features | |
test-msrv: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Rust | |
run: | | |
export RUST_TOOLCHAIN_MSRV=$(cargo read-manifest | jq -r '.rust_version') | |
rustup set profile minimal | |
rustup toolchain install "$RUST_TOOLCHAIN_MSRV" | |
rustup override set "$RUST_TOOLCHAIN_MSRV" | |
- uses: Swatinem/rust-cache@v2 | |
- name: cargo test | |
run: cargo test --no-fail-fast --workspace --all-features | |
doc: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Rust | |
run: | | |
rustup set profile minimal | |
rustup toolchain install "$RUST_TOOLCHAIN" | |
rustup override set "$RUST_TOOLCHAIN" | |
- name: cargo doc | |
run: cargo doc --no-deps --document-private-items --all-features | |
- name: Upload documentation | |
uses: actions/upload-artifact@v4 | |
with: | |
name: documentation | |
path: target/doc | |
lockfile: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Rust | |
run: | | |
rustup set profile minimal | |
rustup toolchain install "$RUST_TOOLCHAIN" | |
rustup override set "$RUST_TOOLCHAIN" | |
- name: Check if Cargo.lock is up-to-date | |
run: cargo tree --depth 1 --no-dedupe --all-features --locked | |
readme: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: cargo-bins/cargo-binstall@main | |
- name: Install cargo-readme | |
run: cargo binstall --version 3.3.1 --no-confirm cargo-readme | |
- run: cargo readme > README.md | |
- name: Check if README.md is up-to-date | |
run: git diff --exit-code README.md | |
release: | |
if: startsWith(github.ref, 'refs/tags/') | |
needs: | |
- rustfmt | |
- check | |
- check-msrv | |
- clippy | |
- test | |
- test-msrv | |
- doc | |
- lockfile | |
- readme | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Rust | |
run: | | |
rustup set profile minimal | |
rustup toolchain install "$RUST_TOOLCHAIN" | |
rustup override set "$RUST_TOOLCHAIN" | |
- uses: Swatinem/rust-cache@v2 | |
- run: cargo publish | |
env: | |
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} |