Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix warnings in GitHub Actions #565

Merged
merged 2 commits into from Nov 14, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
49 changes: 22 additions & 27 deletions .github/workflows/build.yml
Expand Up @@ -11,7 +11,7 @@ jobs:
os:
- ubuntu-latest
- macOS-latest
rust:
toolchain:
- "1.62.0" # Current MSRV
- stable
- beta
Expand All @@ -25,11 +25,12 @@ jobs:
env:
RUST_BACKTRACE: 1
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
override: true
toolchain: ${{ matrix.toolchain }}
- uses: Swatinem/rust-cache@v2

- name: Build
run: cargo build --all --verbose
env:
Expand All @@ -40,38 +41,29 @@ jobs:
env:
TARGET: ${{ matrix.target }}
continue-on-error: ${{ matrix.allow_failure }}
fmt:
formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: rustfmt
override: true
- uses: Swatinem/rust-cache@v2

- name: Run fmt check
run: cargo fmt --all -- --check
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: clippy
override: true
- name: Run clippy check
run: cargo clippy
run: cargo clippy --all-features -- -D warnings

check-examples:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: clippy
override: true
- uses: Swatinem/rust-cache@v2

- name: Check examples
working-directory: examples
shell: bash
Expand All @@ -84,9 +76,12 @@ jobs:
runs-on: ubuntu-latest
needs: [build]
steps:
- name: Set up Rust
uses: hecrj/setup-rust-action@v1
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- uses: Swatinem/rust-cache@v2

- name: Generate Docs
run: |
cargo doc --no-deps
Expand Down