-
Notifications
You must be signed in to change notification settings - Fork 4
chore: Add license and audit checks #124
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
Merged
Changes from 2 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
d21bbd5
chore: Add license and audit checks
raymondk 332e4d1
Update crates/schema-gen/Cargo.toml
raymondk 9045dd2
use the original license
raymondk 49c5a17
use values from the workspace
raymondk 83ecaa6
Merge branch 'main' into license
raymondk ed1be28
bump toolchain
raymondk 0fed904
Revert "bump toolchain"
raymondk 789bc53
make clippy happy
raymondk 2760110
formatting
raymondk 017a0ec
bump toolchain and address clippy
raymondk 4502a77
fmt
raymondk f81f26c
nit
raymondk 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 hidden or 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,36 @@ | ||
| name: Audit | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - master | ||
| pull_request: | ||
| schedule: | ||
| # * is a special character in YAML so you have to quote this string | ||
| - cron: "0 14 * * *" | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| env: | ||
| # When getting Rust dependencies, retry on network error: | ||
| CARGO_NET_RETRY: 10 | ||
| # Use the local .curlrc | ||
| CURL_HOME: . | ||
| # Disable DFX telemetry | ||
| DFX_TELEMETRY: 'off' | ||
| # Use the stable toolchain for the audit | ||
| RUSTUP_TOOLCHAIN: stable | ||
|
|
||
| jobs: | ||
| test: | ||
| name: audit:required | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| issues: write | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions-rust-lang/audit@v1 | ||
This file contains hidden or 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,30 @@ | ||
| name: License Check | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - master | ||
| pull_request: | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| env: | ||
| # When getting Rust dependencies, retry on network error: | ||
| CARGO_NET_RETRY: 10 | ||
| # Use the local .curlrc | ||
| CURL_HOME: . | ||
| # Disable DFX telemetry | ||
| DFX_TELEMETRY: 'off' | ||
|
|
||
| jobs: | ||
| cargo-deny: | ||
| name: license-check:required | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - run: rm rust-toolchain.toml | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why this command?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @adamspofford-dfinity do you know why it is that way in the sdk repo? |
||
| - uses: EmbarkStudios/cargo-deny-action@v2 | ||
| with: | ||
| command: check bans licenses sources # skip advisories, which are handled by audit.yml | ||
This file contains hidden or 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
|
ilbertt marked this conversation as resolved.
|
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,25 @@ | ||
| # adapted from https://github.com/dfinity-lab/common/blob/master/pkgs/overlays/packages/cargo-deny/buildtime.toml | ||
| # for context, see https://github.com/dfinity-lab/common/blob/master/pkgs/overlays/packages/cargo-deny/runtime.toml | ||
| # we allow more licenses in the build-time check. all rust dependencies are statically linked, | ||
| # so copyleft licenses like MPL which allow static linking are A-OK | ||
| [licenses] | ||
| allow = [ | ||
| "Apache-2.0", | ||
| "Apache-2.0 WITH LLVM-exception", | ||
| "BlueOak-1.0.0", | ||
| "BSD-2-Clause", | ||
| "BSD-3-Clause", | ||
| "CC0-1.0", | ||
| "CDLA-Permissive-2.0", | ||
| "ISC", | ||
| "MIT", | ||
| "MPL-2.0", | ||
| "Zlib", | ||
| "Unicode-DFS-2016", | ||
| "Unicode-3.0", | ||
| ] | ||
|
|
||
| unused-allowed-license = "allow" | ||
|
|
||
| [sources] | ||
| allow-git = ["https://github.com/dfinity/agent-rs.git"] |
This file contains hidden or 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,3 +1,3 @@ | ||
| [toolchain] | ||
| channel = "1.86.0" | ||
| channel = "1.88.0" | ||
|
raymondk marked this conversation as resolved.
Outdated
|
||
| components = ["rustfmt", "clippy"] | ||
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.