Skip to content

Commit

Permalink
Move Clippy job
Browse files Browse the repository at this point in the history
  • Loading branch information
newpavlov committed Jun 12, 2024
1 parent 67403c8 commit 039a9d4
Show file tree
Hide file tree
Showing 2 changed files with 81 additions and 82 deletions.
82 changes: 0 additions & 82 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,74 +16,6 @@ env:
RUSTFLAGS: "-Dwarnings"

jobs:
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2024-06-11
components: clippy,rust-src
- name: Linux (linux_android_with_fallback.rs)
run: cargo clippy --target x86_64-unknown-linux-gnu
- name: Linux (linux_android.rs)
run: cargo clippy --target x86_64-unknown-linux-gnu --features linux_disable_fallback
- name: macOS (getentropy.rs)
run: cargo clippy -Zbuild-std --target x86_64-apple-darwin
- name: Redox (use_file.rs)
run: cargo clippy -Zbuild-std --target x86_64-unknown-redox
- name: FreeBSD (getrandom.rs)
run: cargo clippy -Zbuild-std --target x86_64-unknown-freebsd
- name: Solaris (solaris.rs)
run: cargo clippy -Zbuild-std --target x86_64-pc-solaris
- name: NetBSD (netbsd.rs)
run: cargo clippy -Zbuild-std --target x86_64-unknown-netbsd
- name: Fuchsia (fuchsia.rs)
run: cargo clippy -Zbuild-std --target x86_64-unknown-fuchsia
- name: iOS (apple-other.rs)
run: cargo clippy -Zbuild-std --target x86_64-apple-ios
- name: WASI (wasi.rs)
run: cargo clippy -Zbuild-std --target wasm32-wasip2
- name: Hermit (hermit.rs)
run: cargo clippy -Zbuild-std --target x86_64-unknown-hermit
# - name: VxWorks (vxworks.rs)
# run: cargo clippy -Zbuild-std --target x86_64-wrs-vxworks
- name: SOLID (solid.rs)
run: cargo clippy -Zbuild-std --target aarch64-kmc-solid_asp3
- name: ESP-IDF (espidf.rs)
run: cargo clippy -Zbuild-std --target riscv32imc-esp-espidf
- name: Windows 7 (windows7.rs)
run: cargo clippy -Zbuild-std --target x86_64-win7-windows-msvc
- name: Windows (windows.rs)
run: cargo clippy -Zbuild-std --target x86_64-pc-windows-msvc
- name: Fortranix SGX (rdrand.rs)
run: cargo clippy -Zbuild-std --target x86_64-fortanix-unknown-sgx
- name: Web WASM (js.rs)
run: cargo clippy --target wasm32-unknown-unknown --feature js

check-doc:
name: Docs, deadlinks, minimal dependencies
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@nightly # Needed for -Z minimal-versions and doc_cfg
- name: Install precompiled cargo-deadlinks
run: |
VERSION=0.8.1
URL="https://github.com/deadlinks/cargo-deadlinks/releases/download/${VERSION}/cargo-deadlinks-linux"
wget -O ~/.cargo/bin/cargo-deadlinks $URL
chmod +x ~/.cargo/bin/cargo-deadlinks
cargo deadlinks --version
- uses: Swatinem/rust-cache@v2
- name: Generate Docs
env:
RUSTDOCFLAGS: --cfg docsrs
run: cargo deadlinks -- --features=custom,std
- run: |
cargo generate-lockfile -Z minimal-versions
cargo test --features=custom,std
main-tests:
name: Tier 1 Test
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -431,17 +363,3 @@ jobs:
targets: riscv32i-unknown-none-elf
- uses: Swatinem/rust-cache@v2
- run: cargo build --features custom --target riscv32i-unknown-none-elf

clippy-fmt:
name: Clippy + rustfmt
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v1
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- name: clippy
run: cargo clippy --all --features=custom,std
- name: fmt
run: cargo fmt --all -- --check
81 changes: 81 additions & 0 deletions .github/workflows/workspace.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: Workspace

on:
push:
branches: master
pull_request:
branches: master

permissions:
contents: read

jobs:
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2024-06-11
components: clippy,rust-src
- name: Linux (linux_android_with_fallback.rs)
run: cargo clippy --target x86_64-unknown-linux-gnu
- name: Linux (linux_android.rs)
run: cargo clippy --target x86_64-unknown-linux-gnu --features linux_disable_fallback
- name: macOS (getentropy.rs)
run: cargo clippy -Zbuild-std --target x86_64-apple-darwin
- name: Redox (use_file.rs)
run: cargo clippy -Zbuild-std --target x86_64-unknown-redox
- name: FreeBSD (getrandom.rs)
run: cargo clippy -Zbuild-std --target x86_64-unknown-freebsd
- name: Solaris (solaris.rs)
run: cargo clippy -Zbuild-std --target x86_64-pc-solaris
- name: NetBSD (netbsd.rs)
run: cargo clippy -Zbuild-std --target x86_64-unknown-netbsd
- name: Fuchsia (fuchsia.rs)
run: cargo clippy -Zbuild-std --target x86_64-unknown-fuchsia
- name: iOS (apple-other.rs)
run: cargo clippy -Zbuild-std --target x86_64-apple-ios
- name: WASI (wasi.rs)
run: cargo clippy -Zbuild-std --target wasm32-wasip2
- name: Hermit (hermit.rs)
run: cargo clippy -Zbuild-std --target x86_64-unknown-hermit
# - name: VxWorks (vxworks.rs)
# run: cargo clippy -Zbuild-std --target x86_64-wrs-vxworks
- name: SOLID (solid.rs)
run: cargo clippy -Zbuild-std --target aarch64-kmc-solid_asp3
- name: ESP-IDF (espidf.rs)
run: cargo clippy -Zbuild-std --target riscv32imc-esp-espidf
- name: Windows 7 (windows7.rs)
run: cargo clippy -Zbuild-std --target x86_64-win7-windows-msvc
- name: Windows (windows.rs)
run: cargo clippy -Zbuild-std --target x86_64-pc-windows-msvc
- name: Fortranix SGX (rdrand.rs)
run: cargo clippy -Zbuild-std --target x86_64-fortanix-unknown-sgx
- name: Web WASM (js.rs)
run: cargo clippy --target wasm32-unknown-unknown --features js

fmt:
name: rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- uses: Swatinem/rust-cache@v2
- name: fmt
run: cargo fmt --all -- --check

check-doc:
name: rustdoc + deadlinks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@nightly # Needed for doc_auto_cfg
- uses: Swatinem/rust-cache@v2
- name: Generate Docs
env:
RUSTDOCFLAGS: "-Dwarnings --cfg docsrs"
run: cargo doc --all-features --no-deps

0 comments on commit 039a9d4

Please sign in to comment.