Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

add cargo-deny job #5347

Merged
merged 3 commits into from
Mar 24, 2020
Merged

add cargo-deny job #5347

merged 3 commits into from
Mar 24, 2020

Conversation

TriplEight
Copy link
Contributor

@TriplEight TriplEight commented Mar 22, 2020

Resolves paritytech/polkadot#922

  • temporarily runs every commit but later will change it to run before the merge and nightly
  • fails when encounters
    • unlicensed workspace members
    • vulnerabilities from advisories
    • uncertain and unlicensed deps
    • parity-util-mem <0.6
  • warns about everything else:
    • unknown git sources
    • duplicate dependencies
    • unmaintained/yanked crates

# https://embarkstudios.github.io/cargo-deny/checks/bans/cfg.html
[bans]
# Lint level for when multiple versions of the same crate are detected
multiple-versions = "deny"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The paritytech/polkadot#922 was only about parity-util-mem (because it was causing issues), I don't think it's possible to get rid of duplicates for every single dependency.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We wanted to introduce those checks (duplicate deps, licenses, advisories and sources) for a long time anyway.
If it's not possible to avoid the dependency duplication, then there's bans.skip list to add them there temporarily.

Copy link

@kirushik kirushik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please figure out how to address multiple versions of the dependency — we currently have a lot of those. Even the build log of the job is more than our Gitlab allows by default!

#"Nokia",
]
# Lint level for licenses considered copyleft
copyleft = "deny"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is rather strange — why deny copyleft, but then explicitly allow GPL-3.0 a few lines above?

@gavofyork gavofyork added the A2-insubstantial Pull request requires no code review (e.g., a sub-repository hash update). label Mar 23, 2020
@TriplEight TriplEight added the A3-in_progress Pull request is in progress. No review needed at this stage. label Mar 23, 2020
@TriplEight TriplEight changed the title add cargo-deny job WIP: add cargo-deny job Mar 23, 2020
Copy link

@kirushik kirushik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine to me; also — nice use of artifacts to cache the full output!

@TriplEight TriplEight changed the title WIP: add cargo-deny job add cargo-deny job Mar 24, 2020
@TriplEight TriplEight removed the A3-in_progress Pull request is in progress. No review needed at this stage. label Mar 24, 2020
@gavofyork gavofyork merged commit e7f974e into master Mar 24, 2020
@gavofyork gavofyork deleted the cargo_deny_for_substrate branch March 24, 2020 17:07
rakanalh pushed a commit to rakanalh/substrate that referenced this pull request Mar 25, 2020
* add cargo-deny job

* feat(ci): add cargo-deny CI job, checks registries, licenses, dependencies dupes and advisories
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A2-insubstantial Pull request requires no code review (e.g., a sub-repository hash update).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ban multiple versions of parity-util-mem
4 participants