Skip to content

Commit

Permalink
Remove now-unneeded scale-info dep (#47)
Browse files Browse the repository at this point in the history
* Remove now-unneeded scale-info dep

* add machete check for unused deps

* fix docs and READMEs

* add diff readme check and break readme to test

* fix readme

* remove unused macro dependency

* resolve clippy errors

* fmt
  • Loading branch information
jsdw authored Feb 9, 2024
1 parent 5313be2 commit 16ea765
Show file tree
Hide file tree
Showing 8 changed files with 158 additions and 114 deletions.
51 changes: 43 additions & 8 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ env:
CARGO_TERM_COLOR: always

jobs:
build:
check:
name: Cargo check
runs-on: ubuntu-latest
steps:
Expand All @@ -31,7 +31,7 @@ jobs:
override: true

- name: Rust Cache
uses: Swatinem/rust-cache@a22603398250b864f7190077025cf752307154dc # v2.7.2
uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3

- name: Check all features
uses: actions-rs/cargo@v1.0.3
Expand All @@ -45,6 +45,31 @@ jobs:
command: check
args: --all-targets --no-default-features --workspace

machete:
name: Check unused dependencies
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4

- name: Install Rust stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true

- name: Rust Cache
uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3

- name: Install cargo-machete
run: cargo install cargo-machete

- name: Check unused dependencies
uses: actions-rs/cargo@v1.0.3
with:
command: machete

wasm:
name: Check WASM compatibility
runs-on: ubuntu-latest
Expand All @@ -61,7 +86,7 @@ jobs:
override: true

- name: Rust Cache
uses: Swatinem/rust-cache@a22603398250b864f7190077025cf752307154dc # v2.7.2
uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3

- name: Check all features
uses: actions-rs/cargo@v1.0.3
Expand All @@ -87,7 +112,7 @@ jobs:
override: true

- name: Rust Cache
uses: Swatinem/rust-cache@a22603398250b864f7190077025cf752307154dc # v2.7.2
uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3

- name: Check no_std build
uses: actions-rs/cargo@v1.0.3
Expand All @@ -113,14 +138,24 @@ jobs:
components: rustfmt

- name: Rust Cache
uses: Swatinem/rust-cache@a22603398250b864f7190077025cf752307154dc # v2.7.2
uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3

- name: Cargo fmt
uses: actions-rs/cargo@v1.0.3
with:
command: fmt
args: --all -- --check

diff-readme-files:
name: Check that READMEs are identical
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3

- name: Diff READMEs
run: diff -q README.md scale-decode/README.md

docs:
name: Check documentation
runs-on: ubuntu-latest
Expand All @@ -136,7 +171,7 @@ jobs:
override: true

- name: Rust Cache
uses: Swatinem/rust-cache@a22603398250b864f7190077025cf752307154dc # v2.7.2
uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3

- name: Check internal documentation links
run: RUSTDOCFLAGS="--deny rustdoc::broken_intra_doc_links" cargo doc -vv --workspace --no-deps --document-private-items
Expand All @@ -156,7 +191,7 @@ jobs:
override: true

- name: Rust Cache
uses: Swatinem/rust-cache@a22603398250b864f7190077025cf752307154dc # v2.7.2
uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3

- name: Cargo test
uses: actions-rs/cargo@v1.0.3
Expand Down Expand Up @@ -192,7 +227,7 @@ jobs:
override: true

- name: Rust Cache
uses: Swatinem/rust-cache@a22603398250b864f7190077025cf752307154dc # v2.7.2
uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3

- name: Run clippy
uses: actions-rs/cargo@v1
Expand Down
Loading

0 comments on commit 16ea765

Please sign in to comment.