From 039a9d4a37770e20658e002c7e69111890ad0bf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D1=80=D1=82=D1=91=D0=BC=20=D0=9F=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=BE=D0=B2=20=5BArtyom=20Pavlov=5D?= Date: Wed, 12 Jun 2024 15:25:02 +0400 Subject: [PATCH] Move Clippy job --- .github/workflows/tests.yml | 82 --------------------------------- .github/workflows/workspace.yml | 81 ++++++++++++++++++++++++++++++++ 2 files changed, 81 insertions(+), 82 deletions(-) create mode 100644 .github/workflows/workspace.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0a2296bf..e29c3ff1 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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 }} @@ -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 diff --git a/.github/workflows/workspace.yml b/.github/workflows/workspace.yml new file mode 100644 index 00000000..65d8a2ee --- /dev/null +++ b/.github/workflows/workspace.yml @@ -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