Skip to content

Commit

Permalink
Update linter
Browse files Browse the repository at this point in the history
  • Loading branch information
nwagner84 committed Sep 24, 2023
1 parent c0d2594 commit c8fabb5
Showing 1 changed file with 139 additions and 171 deletions.
310 changes: 139 additions & 171 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,183 +145,151 @@ jobs:
- run: |
cargo fuzz run --fuzz-dir ${{ matrix.item.fuzz-dir }} --jobs 2 ${{ matrix.item.target }} -- -max_total_time=${{ matrix.item.max-total-time }}
# fmt:
# runs-on: ubuntu-latest
# needs: test
# steps:
# - uses: actions/checkout@v3
# - uses: abbbi/github-actions-tune@v1
# - uses: actions/cache@v2
# with:
# key: ${{ env.CACHE_KEY }}-${{ hashFiles('**/Cargo.toml') }}
# path: |
# ~/.cargo/bin/
# ~/.cargo/git/db/
# ~/.cargo/registry/cache/
# ~/.cargo/registry/index/
# target/
# - uses: actions-rs/toolchain@v1
# with:
# profile: minimal
# toolchain: nightly
# override: true
# components: rustfmt
# - uses: actions-rs/cargo@v1
# with:
# command: fmt
# args: --all -- --check
fmt:
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v4
- uses: abbbi/github-actions-tune@v1
- uses: actions/cache@v3
with:
key: ${{ env.CACHE_KEY }}-${{ hashFiles('**/Cargo.toml') }}
path: |
~/.cargo/bin/
~/.cargo/git/db/
~/.cargo/registry/cache/
~/.cargo/registry/index/
target/
- uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- run: |
cargo fmt --all -- --check
# clippy:
# runs-on: ubuntu-latest
# needs: test
# steps:
# - uses: actions/checkout@v3
# - uses: abbbi/github-actions-tune@v1
# - uses: actions/cache@v2
# with:
# key: ${{ env.CACHE_KEY }}-${{ hashFiles('**/Cargo.toml') }}
# path: |
# ~/.cargo/bin/
# ~/.cargo/git/db/
# ~/.cargo/registry/cache/
# ~/.cargo/registry/index/
# target/
# - uses: actions-rs/toolchain@v1
# with:
# profile: minimal
# toolchain: nightly
# override: true
# components: clippy
# - uses: actions-rs/cargo@v1
# with:
# command: clippy
# args: --workspace -- -D warnings -D rust-2021-compatibility -W unreachable-pub
clippy:
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v4
- uses: abbbi/github-actions-tune@v1
- uses: actions/cache@v3
with:
key: ${{ env.CACHE_KEY }}-${{ hashFiles('**/Cargo.toml') }}
path: |
~/.cargo/bin/
~/.cargo/git/db/
~/.cargo/registry/cache/
~/.cargo/registry/index/
target/
- uses: dtolnay/rust-toolchain@nightly
with:
components: clippy
- run: |
cargo clippy --workspace -- -D warnings -D rust-2021-compatibility -W unreachable-pub
# udeps:
# if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }}
# runs-on: ubuntu-latest
# needs: test
# steps:
# - uses: actions/checkout@v3
# - uses: abbbi/github-actions-tune@v1
# - uses: actions/cache@v2
# with:
# key: ${{ env.CACHE_KEY }}-${{ hashFiles('**/Cargo.toml') }}
# path: |
# ~/.cargo/bin/
# ~/.cargo/git/db/
# ~/.cargo/registry/cache/
# ~/.cargo/registry/index/
# target/
# - uses: actions-rs/toolchain@v1
# with:
# profile: minimal
# toolchain: nightly
# override: true
# - uses: actions-rs/[email protected]
# with:
# crate: cargo-udeps
# version: latest
# - uses: actions-rs/cargo@v1
# with:
# command: udeps
# args: --workspace
udeps:
if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }}
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v4
- uses: abbbi/github-actions-tune@v1
- uses: actions/cache@v3
with:
key: ${{ env.CACHE_KEY }}-${{ hashFiles('**/Cargo.toml') }}
path: |
~/.cargo/bin/
~/.cargo/git/db/
~/.cargo/registry/cache/
~/.cargo/registry/index/
target/
- uses: dtolnay/rust-toolchain@nightly
- name: "Install `cargo-udeps`"
run: |
cargo install -f cargo-udeps
- run: |
cargo udeps --workspace
# audit:
# if: ${{ github.ref == 'refs/heads/main' }}
# runs-on: ubuntu-latest
# needs: test
# steps:
# - uses: actions/checkout@v3
# - uses: abbbi/github-actions-tune@v1
# - uses: actions/cache@v2
# with:
# key: ${{ env.CACHE_KEY }}-${{ hashFiles('**/Cargo.toml') }}
# path: |
# ~/.cargo/bin/
# ~/.cargo/git/db/
# ~/.cargo/registry/cache/
# ~/.cargo/registry/index/
# target/
# - uses: actions-rs/toolchain@v1
# with:
# profile: minimal
# toolchain: nightly
# override: true
# - uses: actions-rs/audit-check@v1
# with:
# token: ${{ secrets.GITHUB_TOKEN }}
audit:
# if: ${{ github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v4
- uses: abbbi/github-actions-tune@v1
- uses: actions/cache@v3
with:
key: ${{ env.CACHE_KEY }}-${{ hashFiles('**/Cargo.toml') }}
path: |
~/.cargo/bin/
~/.cargo/git/db/
~/.cargo/registry/cache/
~/.cargo/registry/index/
target/
- uses: dtolnay/rust-toolchain@nightly
- uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}

# upgrades:
# if: ${{ github.ref == 'refs/heads/main' }}
# runs-on: ubuntu-latest
# needs: test
# steps:
# - uses: actions/checkout@v3
# - uses: abbbi/github-actions-tune@v1
# - uses: actions/cache@v2
# with:
# key: ${{ env.CACHE_KEY }}-${{ hashFiles('**/Cargo.toml') }}
# path: |
# ~/.cargo/bin/
# ~/.cargo/git/db/
# ~/.cargo/registry/cache/
# ~/.cargo/registry/index/
# target/
# - uses: actions-rs/toolchain@v1
# with:
# profile: minimal
# toolchain: nightly
# override: true
# - uses: actions-rs/[email protected]
# with:
# crate: cargo-upgrades
# version: latest
# - run: |
# cargo upgrades
upgrades:
# if: ${{ github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v4
- uses: abbbi/github-actions-tune@v1
- uses: actions/cache@v3
with:
key: ${{ env.CACHE_KEY }}-${{ hashFiles('**/Cargo.toml') }}
path: |
~/.cargo/bin/
~/.cargo/git/db/
~/.cargo/registry/cache/
~/.cargo/registry/index/
target/
- uses: dtolnay/rust-toolchain@nightly
- name: "Install `cargo-upgrades`"
run: |
cargo install -f cargo-upgrades
- run: |
cargo upgrades
# deny:
# runs-on: ubuntu-latest
# needs: test
# steps:
# - uses: actions/checkout@v3
# - uses: abbbi/github-actions-tune@v1
# - uses: actions/cache@v2
# with:
# key: ${{ env.CACHE_KEY }}-${{ hashFiles('**/Cargo.toml') }}
# path: |
# ~/.cargo/bin/
# ~/.cargo/git/db/
# ~/.cargo/registry/cache/
# ~/.cargo/registry/index/
# target/
# - uses: actions-rs/toolchain@v1
# with:
# profile: minimal
# toolchain: nightly
# override: true
# components: clippy
# - uses: EmbarkStudios/cargo-deny-action@v1
# with:
# log-level: warn
# command: check
# arguments: --workspace
deny:
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v4
- uses: abbbi/github-actions-tune@v1
- uses: actions/cache@v3
with:
key: ${{ env.CACHE_KEY }}-${{ hashFiles('**/Cargo.toml') }}
path: |
~/.cargo/bin/
~/.cargo/git/db/
~/.cargo/registry/cache/
~/.cargo/registry/index/
target/
- uses: dtolnay/rust-toolchain@nightly
- uses: EmbarkStudios/cargo-deny-action@v1
with:
log-level: warn
command: check
arguments: --workspace

# miri:
# name: miri
# runs-on: ubuntu-latest
# needs: test
# steps:
# - name: Checkout repository
# uses: actions/checkout@v3
# - name: Install Rust
# uses: dtolnay/rust-toolchain@miri
# - run: cargo miri test --workspace --lib --verbose
# env:
# MIRIFLAGS: -Zmiri-strict-provenance
# - run: cargo miri test --workspace --doc --verbose
# env:
# MIRIFLAGS: -Zmiri-strict-provenance
miri:
name: miri
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@miri
- run: cargo miri test --workspace --lib --verbose
env:
MIRIFLAGS: -Zmiri-strict-provenance
- run: cargo miri test --workspace --doc --verbose
env:
MIRIFLAGS: -Zmiri-strict-provenance

# book:
# if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }}
Expand Down

0 comments on commit c8fabb5

Please sign in to comment.