Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(CI): Add unused dependencies check #1741

Merged
merged 25 commits into from
Aug 16, 2024
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
e3f08cb
chore(CI): Add unused dependencies check
DaughterOfMars Aug 9, 2024
5fa0953
comment
DaughterOfMars Aug 12, 2024
a0d8af3
use flags matrix
DaughterOfMars Aug 12, 2024
5f7b244
Add a comment to force workflow run
DaughterOfMars Aug 12, 2024
a7f6a4b
fix duplicate flags and add to external
DaughterOfMars Aug 12, 2024
041295f
remove unused dependencies
DaughterOfMars Aug 12, 2024
0479c04
Remove more unused dependencies
DaughterOfMars Aug 12, 2024
2ddd2e2
Merge branch 'develop' into dev-tools/udeps
thibault-martinez Aug 12, 2024
32c35b7
More ignores
DaughterOfMars Aug 12, 2024
e40a629
Merge branch 'dev-tools/udeps' of https://github.com/iotaledger/iota …
DaughterOfMars Aug 12, 2024
765395c
do external udeps
DaughterOfMars Aug 12, 2024
d81f895
lock file
DaughterOfMars Aug 12, 2024
ce8bf56
fix doc tests
DaughterOfMars Aug 12, 2024
6b6198a
fix mysten-common
DaughterOfMars Aug 12, 2024
c1d4d39
revert doc
thibault-martinez Aug 13, 2024
a991b31
a few more unused deps
DaughterOfMars Aug 13, 2024
5155d2f
Merge branch 'develop' into dev-tools/udeps
DaughterOfMars Aug 14, 2024
d1dce74
external
DaughterOfMars Aug 14, 2024
0bf4410
Merge branch 'develop' into dev-tools/udeps
DaughterOfMars Aug 14, 2024
486af42
Merge branch 'develop' into dev-tools/udeps
DaughterOfMars Aug 14, 2024
cc899ed
merge methods
DaughterOfMars Aug 14, 2024
e14ed1d
review
DaughterOfMars Aug 14, 2024
ad6ea6c
Merge branch 'develop' into dev-tools/udeps
thibault-martinez Aug 15, 2024
372fcbc
Merge branch 'develop' into dev-tools/udeps
thibault-martinez Aug 16, 2024
d852a37
Merge branch 'develop' into dev-tools/udeps
thibault-martinez Aug 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ ci-clippy-external = [
"-Dwarnings",
]
ci-license = "license-template --template .license_template"
ci-udeps = "udeps --all-targets --backend=depinfo"
ci-udeps-external = "udeps --all-targets --manifest-path external-crates/move/Cargo.toml --backend=depinfo"

[build]
rustflags = ["-C", "force-frame-pointers=yes", "-C", "force-unwind-tables=yes"]
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/external.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,21 @@ jobs:
-p ${{matrix.components}}
--profile ci

check-unused-deps:
name: Check Unused Dependencies of ${{ matrix.components }} (${{ matrix.flags }})
strategy:
matrix:
components: ${{ fromJson(needs.changes.outputs.components) }}
flags: ["--all-features", "--no-default-features"]
fail-fast: false
runs-on: [self-hosted]
needs: changes

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # Pin v4.1.1
- name: Run Cargo Udeps
run: cargo +nightly ci-udeps-external -p ${{matrix.components}} ${{ matrix.flags }}

clippy:
needs: diff
if: needs.diff.outputs.isRust == 'true'
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,38 @@ jobs:
# (we have the stardust iota-sdk package as a dependency)
run: cargo nextest run --profile ci -E 'rdeps(iota-sdk)' -p [email protected]

check-unused-deps:
name: Check Unused Dependencies of ${{ matrix.components }} (${{ matrix.flags }})
strategy:
matrix:
components: ${{ fromJson(needs.changes.outputs.components) }}
flags: ["--all-features", "--no-default-features"]
fail-fast: false
runs-on: [self-hosted]
needs: changes

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # Pin v4.1.1
- name: Run Cargo Udeps
run: cargo +nightly ci-udeps -p ${{matrix.components}} ${{ matrix.flags }}

check-unused-deps-iota-sdk:
Thoralf-M marked this conversation as resolved.
Show resolved Hide resolved
name: Check Unused Dependencies of iota-sdk (${{ matrix.flags }})
if: needs.iota-sdk-changes.outputs.iota-sdk == 'true'
runs-on: [self-hosted]
needs: iota-sdk-changes
strategy:
matrix:
flags: ["--all-features", "--no-default-features"]

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # Pin v4.1.1
# iota-sdk version needs to be explicitly defined here due to this bug
# https://github.com/rust-lang/cargo/issues/12891
# (we have the stardust iota-sdk package as a dependency)
- name: Run Cargo Udeps
run: cargo +nightly ci-udeps -p [email protected] ${{ matrix.flags }}

diff:
runs-on: [self-hosted]
outputs:
Expand Down
Loading
Loading