Skip to content

Commit

Permalink
chore: fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
alon-dotan-starkware committed Jul 17, 2024
1 parent 43441c8 commit 6b545af
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 40 deletions.
23 changes: 22 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,30 @@ jobs:
# Keep the name 'udeps' to match original action name, so we don't need to define specific branch
# rules on Github for specific version branches.
udeps:
machete:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run Machete (detect unused dependencies)
uses: bnjbvr/cargo-machete@main


udeps:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
name: "Rust Toolchain Setup"
with:
toolchain: nightly-2024-01-12
- uses: Swatinem/rust-cache@v2
- uses: Noelware/[email protected]
with:
version: ${{env.PROTOC_VERSION}}

- name: "Download and run cargo-udeps"
run: |
wget -O - -c https://github.com/est31/cargo-udeps/releases/download/v0.1.35/cargo-udeps-v0.1.35-x86_64-unknown-linux-gnu.tar.gz | tar -xz
cargo-udeps-*/cargo-udeps udeps
env:
RUSTUP_TOOLCHAIN: nightly-2024-01-12
38 changes: 0 additions & 38 deletions .github/workflows/papyrus_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,44 +125,6 @@ jobs:

- run: cargo +nightly-2024-01-12 fmt --all -- --check

udeps:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
name: "Rust Toolchain Setup"
with:
toolchain: nightly-2024-01-12
- uses: Swatinem/rust-cache@v2
- uses: Noelware/[email protected]
with:
version: ${{env.PROTOC_VERSION}}

- name: "Download and run cargo-udeps"
run: |
wget -O - -c https://github.com/est31/cargo-udeps/releases/download/v0.1.35/cargo-udeps-v0.1.35-x86_64-unknown-linux-gnu.tar.gz | tar -xz
cargo-udeps-*/cargo-udeps udeps
env:
RUSTUP_TOOLCHAIN: nightly-2024-01-12

clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- uses: Swatinem/rust-cache@v2
- uses: Noelware/[email protected]
with:
version: ${{env.PROTOC_VERSION}}

- run: echo "Skipping clippy for now"
- run: >
cargo clippy --workspace --all-targets --all-features -- -D warnings
-D future-incompatible -D nonstandard-style -D rust-2018-idioms -D unused
-D clippy::unwrap_used -A clippy::blocks_in_conditions # This is because of a bug in tracing: https://github.com/tokio-rs/tracing/issues/2876
doc:
runs-on: ubuntu-latest
env:
Expand Down
9 changes: 8 additions & 1 deletion scripts/clippy.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
#!/bin/bash

cargo clippy "$@" --all-targets --all-features
# TODO: Revert clippy::unwrap_used to -D after fixing all the unwraps.
cargo clippy --workspace --all-targets --all-features -- \
-D future-incompatible \
-D nonstandard-style \
-D rust-2018-idioms \
-D unused \
-A clippy::unwrap_used \
-A clippy::blocks_in_conditions # This is because of a bug in tracing: https://github.com/tokio-rs/tracing/issues/2876

0 comments on commit 6b545af

Please sign in to comment.