Clean up clippy warnings. #202
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
on: [push, pull_request] | |
name: Tests | |
jobs: | |
check: | |
name: Check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: check | |
args: --all-features | |
check-msrv: | |
name: Check MSRV | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cargo.lock | |
run: cp Cargo.lock.min Cargo.lock | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: 1.49 | |
override: true | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: check | |
args: --all-features | |
test: | |
name: Test | |
strategy: | |
matrix: | |
bits: [16, 32, 64] | |
runs-on: ubuntu-latest | |
env: | |
RUSTFLAGS: -D warnings --cfg force_bits="${{ matrix.bits }}$" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
args: --all-features | |
test-x86: | |
name: Test x86 | |
runs-on: ubuntu-latest | |
env: | |
RUSTFLAGS: -D warnings | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable-i686-unknown-linux-gnu | |
override: true | |
- run: | | |
sudo apt update | |
sudo apt install gcc-multilib | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
args: --all-features | |
test-x86_64: | |
name: Test x86_64 | |
runs-on: ubuntu-latest | |
env: | |
RUSTFLAGS: -D warnings | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable-x86_64-unknown-linux-gnu | |
override: true | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
args: --all-features | |
build-no-std: | |
name: Build no-std | |
runs-on: ubuntu-latest | |
env: | |
RUSTFLAGS: -D warnings | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: --no-default-features --features "rand, num-traits, serde" | |
build-aarch64: | |
name: Build aarch64 | |
runs-on: ubuntu-latest | |
env: | |
RUSTFLAGS: -D warnings | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
target: aarch64-unknown-linux-gnu | |
override: true | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: --target aarch64-unknown-linux-gnu --all-features | |
fmt: | |
name: Rustfmt | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
components: rustfmt | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --all -- --check | |
clippy: | |
name: Clippy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
components: clippy | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: clippy | |
args: --all-features -- -D warnings |