Define list of clippy warnings in cargo manifest #1589
This file contains hidden or 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: Continuous integration | |
| on: | |
| push: | |
| pull_request: | |
| merge_group: | |
| schedule: | |
| - cron: "0 18 * * *" | |
| jobs: | |
| pre_commit: | |
| timeout-minutes: 5 | |
| name: prek | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| # tools used in pre-commit hooks | |
| - id: cargo-rdme | |
| uses: rusticata/ci-action-rdme@v1 | |
| # /tools | |
| - id: prek | |
| uses: rusticata/ci-action-prek@v1 | |
| check: | |
| name: Check | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| rust: | |
| - stable | |
| - 1.85 | |
| - nightly | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: ${{ matrix.rust }} | |
| - run: RUSTFLAGS="-D warnings" cargo check --locked | |
| check-notlocked: | |
| name: Check (not locked) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - name: Cargo update | |
| run: cargo update | |
| - run: RUSTFLAGS="-D warnings" cargo check | |
| check-all-features: | |
| name: Check All Features | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| rust: | |
| - 1.85 | |
| - nightly | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: ${{ matrix.rust }} | |
| - run: RUSTFLAGS="-D warnings" cargo check --locked --all-targets --all-features | |
| # Also covers `check-all-features` on stable: the powerset includes every | |
| # combination except pairing the two aws-lc-rs backends, and the | |
| # `--all-features` pairing is exercised by the `test_features` job. | |
| feature-powerset: | |
| name: Check feature powerset | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: taiki-e/install-action@cargo-hack | |
| # The two aws-lc-rs backends are never used together outside of | |
| # --all-features builds, so skip those combinations. | |
| - run: RUSTFLAGS="-D warnings" cargo hack check --locked --all-targets --feature-powerset --mutually-exclusive-features verify-aws,verify-aws-fips | |
| test_features: | |
| name: Test suite (with features) | |
| needs: check-all-features | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| features: | |
| - --no-default-features | |
| - --features=default | |
| - --all-features | |
| - --features=verify | |
| - --features=verify-aws | |
| - --features=verify-aws-fips | |
| - --features=validate | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install stable toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - run: cargo test --locked ${{ matrix.features }} | |
| test_fips: | |
| name: verify-aws-fips dependency on FIPS backend only | |
| needs: check-all-features | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install stable toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| # Ensure the non-FIPS aws-lc-sys crate is not part of the dependency tree. | |
| # | |
| # "cargo tree" exits 101 when queried for a crate that's not in the tree. | |
| - run: "if cargo tree --features=verify-aws-fips -i aws-lc-sys; then false; else [ $? -eq 101 ]; fi" | |
| # Ensure the optional FIPS crypto module is depended. | |
| - run: "cargo tree --features=verify-aws-fips -i aws-lc-fips-sys" | |
| fmt: | |
| name: Rustfmt | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt | |
| - run: cargo fmt --all -- --check | |
| clippy: | |
| name: Clippy | |
| needs: check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@nightly | |
| with: | |
| components: clippy | |
| - run: cargo clippy --locked --all-features -- -D warnings | |
| readme: | |
| name: Check if README is up to date | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: dtolnay/rust-toolchain@nightly | |
| - uses: dtolnay/rust-toolchain@stable | |
| - run: | | |
| cargo install cargo-rdme | |
| cargo rdme install-rust-toolchain-for-intralinks | |
| cargo rdme --intralinks-features validate,verify,verify-aws -c | |
| doc: | |
| name: Build documentation | |
| needs: check | |
| runs-on: ubuntu-latest | |
| env: | |
| RUSTDOCFLAGS: --cfg docsrs | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@nightly | |
| - run: cargo doc --workspace --no-deps --all-features | |
| semver: | |
| name: Check semver compatibility | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v4 | |
| - name: Check semver | |
| uses: obi1kenobi/cargo-semver-checks-action@v2 |