-
Notifications
You must be signed in to change notification settings - Fork 491
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
ci/Check dependencies #895
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
10b62bf
ci: Add dependencies checks
Luni-4 393d32d
Fix
Luni-4 62a8981
Fix
Luni-4 94cc461
Check only bans and sources
Luni-4 7e40025
REMOVE THIS COMMIT
Luni-4 6815a0a
burn-import: Remove unused deps
Luni-4 63ca9ab
burn-tensor-testgen: Remove unused deps
Luni-4 d7c8b52
examples: Remove unused deps
Luni-4 54bc831
Ignore deps
Luni-4 c956894
[skip ci] ci: Match on any Cargo.toml and Cargo.lock file
Luni-4 9f1e0dc
ci: Add deny configuration
Luni-4 e4f2eed
Update text-classification
Luni-4 246bab4
Update burn-wgpu
Luni-4 6ce1e46
Improve deny.toml
Luni-4 7f94c63
Use warn for duplicated crates
Luni-4 44d59ea
Remove unused dependencies
Luni-4 8605db6
Fix unused deps and imports
Luni-4 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: dependencies | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- '**/Cargo.lock' | ||
- '**/Cargo.toml' | ||
pull_request: | ||
types: [opened, synchronize] | ||
paths: | ||
- '**/Cargo.lock' | ||
- '**/Cargo.toml' | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
dependencies: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
||
- name: checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Audit Rust dependencies | ||
uses: actions-rust-lang/audit@v1 | ||
|
||
- name: Detect multiple versions of the same crate | ||
uses: EmbarkStudios/cargo-deny-action@v1 | ||
with: | ||
command: check bans licenses sources | ||
|
||
- name: Install Rust nightly | ||
uses: dtolnay/rust-toolchain@nightly | ||
with: | ||
toolchain: nightly | ||
components: rustfmt | ||
|
||
- name: Install cargo-udeps | ||
env: | ||
UDEPS_LINK: https://github.com/est31/cargo-udeps/releases/download | ||
UDEPS_VERSION: v0.1.43 | ||
run: | | ||
curl -L "$UDEPS_LINK/$UDEPS_VERSION/cargo-udeps-$UDEPS_VERSION-x86_64-unknown-linux-gnu.tar.gz" | | ||
tar xz -C $HOME/.cargo/bin --strip-components 2 | ||
|
||
- name: Run cargo-udeps | ||
run: | | ||
cargo +nightly udeps --all-targets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,4 +10,3 @@ pub(crate) mod maxmin; | |
|
||
pub use backward::*; | ||
pub use base::*; | ||
pub use int_tensor::*; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,5 +10,4 @@ pub use base::*; | |
pub use constant::*; | ||
pub use id::*; | ||
pub use running::*; | ||
pub use tensor::*; | ||
pub use visitor::*; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
mod autoregressive; | ||
mod base; | ||
|
||
pub use autoregressive::*; | ||
pub use base::*; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,6 @@ mod key; | |
mod mean_dim; | ||
mod sum_dim; | ||
|
||
pub use base::*; | ||
pub use key::*; | ||
pub use mean_dim::*; | ||
pub use sum_dim::*; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
# If 1 or more target triples (and optionally, target_features) are specified, | ||
# only the specified targets will be checked when running `cargo deny check`. | ||
# This means, if a particular package is only ever used as a target specific | ||
# dependency, such as, for example, the `nix` crate only being used via the | ||
# `target_family = "unix"` configuration, that only having windows targets in | ||
# this list would mean the nix crate, as well as any of its exclusive | ||
# dependencies not shared by any other crates, would be ignored, as the target | ||
# list here is effectively saying which targets you are building for. | ||
targets = [ | ||
{ triple = "x86_64-unknown-linux-gnu" }, | ||
{ triple = "aarch64-unknown-linux-gnu" }, | ||
{ triple = "x86_64-unknown-linux-musl" }, | ||
{ triple = "aarch64-apple-darwin" }, | ||
{ triple = "x86_64-apple-darwin" }, | ||
{ triple = "x86_64-pc-windows-msvc" }, | ||
] | ||
|
||
[advisories] | ||
# The lint level for security vulnerabilities | ||
vulnerability = "deny" | ||
# The lint level for unmaintained crates | ||
unmaintained = "deny" | ||
# The lint level for crates that have been yanked from their source registry | ||
yanked = "deny" | ||
# The lint level for crates with security notices. | ||
notice = "deny" | ||
# A list of advisory IDs to ignore. Note that ignored advisories will still | ||
# output a note when they are encountered. | ||
ignore = [ | ||
#"RUSTSEC-0000-0000", | ||
] | ||
|
||
[bans] | ||
# Lint level for when multiple versions of the same crate are detected | ||
multiple-versions = "warn" | ||
# Lint level for when a crate version requirement is `*` | ||
wildcards = "allow" | ||
# The graph highlighting used when creating dotgraphs for crates | ||
# with multiple versions | ||
# * lowest-version - The path to the lowest versioned duplicate is highlighted | ||
# * simplest-path - The path to the version with the fewest edges is highlighted | ||
# * all - Both lowest-version and simplest-path are used | ||
highlight = "all" | ||
# The default lint level for `default` features for crates that are members of | ||
# the workspace that is being checked. This can be overridden by allowing/denying | ||
# `default` on a crate-by-crate basis if desired. | ||
workspace-default-features = "allow" | ||
# The default lint level for `default` features for external crates that are not | ||
# members of the workspace. This can be overridden by allowing/denying `default` | ||
# on a crate-by-crate basis if desired. | ||
external-default-features = "allow" | ||
# Certain crates/versions that will be skipped when doing duplicate detection. | ||
skip = [ | ||
#{ name = "crate", version = "=0.1.0" }, | ||
] | ||
# Similarly to `skip` allows you to skip certain crates during duplicate | ||
# detection. Unlike skip, it also includes the entire tree of transitive | ||
# dependencies starting at the specified crate, up to a certain depth, which is | ||
# by default infinite. | ||
skip-tree = [ | ||
#{ name = "crate", version = "=0.1.0", depth = 20 }, | ||
] | ||
|
||
[sources] | ||
# Lint level for what to happen when a crate from a crate registry that is not | ||
# in the allow list is encountered | ||
unknown-registry = "deny" | ||
# Lint level for what to happen when a crate from a git repository that is not | ||
# in the allow list is encountered | ||
unknown-git = "deny" | ||
|
||
[licenses] | ||
# The lint level for crates which do not have a detectable license | ||
unlicensed = "deny" | ||
# Lint level for licenses considered copyleft | ||
copyleft = "deny" | ||
# The confidence threshold for detecting a license from license text. | ||
# The higher the value, the more closely the license text must be to the | ||
# canonical license text of a valid SPDX license file. | ||
# [possible values: any between 0.0 and 1.0]. | ||
confidence-threshold = 0.60 | ||
# List of explicitly allowed licenses | ||
# See https://spdx.org/licenses/ for list of possible licenses | ||
# [possible values: any SPDX 3.11 short identifier (+ optional exception)]. | ||
allow = [ | ||
"Apache-2.0 WITH LLVM-exception", | ||
"Apache-2.0", | ||
"BSD-3-Clause", | ||
"CC0-1.0", | ||
"ISC", | ||
"MIT", | ||
"MPL-2.0", | ||
"OpenSSL", | ||
"Unicode-DFS-2016", | ||
"Unlicense", | ||
"Zlib", | ||
] | ||
# Allow 1 or more licenses on a per-crate basis, so that particular licenses | ||
# aren't accepted for every possible crate as with the normal allow list | ||
exceptions = [ | ||
# Each entry is the crate and version constraint, and its specific allow | ||
# list | ||
#{ allow = ["license_name"], name = "crate", version = "*" }, | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason not to use the following:
cargo install cargo-udeps --locked
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To install faster the binary, reducing the CI time.