From 9bb2d28ce2a2df5ebf827e3b494db0c078a7452b Mon Sep 17 00:00:00 2001 From: Erich Gubler Date: Wed, 30 Nov 2022 14:46:58 -0700 Subject: [PATCH] Add `cargo-deny` to CI (#3185) --- .deny.toml | 37 +++++++++++++++++++++++++++++++++++++ .github/workflows/ci.yml | 28 ++++++++++++++++++++++++++++ Cargo.lock | 2 +- Cargo.toml | 2 +- run-wasm/Cargo.toml | 1 + wgpu-info/Cargo.toml | 1 + 6 files changed, 69 insertions(+), 2 deletions(-) create mode 100644 .deny.toml diff --git a/.deny.toml b/.deny.toml new file mode 100644 index 0000000000..5613b6ac26 --- /dev/null +++ b/.deny.toml @@ -0,0 +1,37 @@ +[bans] +multiple-versions = "deny" +skip-tree = [ + { name = "cts_runner" }, + { name = "dummy" }, + { name = "player" }, + { name = "run-wasm" }, + { name = "wgpu-info" }, +] +wildcards = "deny" + +[licenses] +allow = [ + "Apache-2.0", + "Apache-2.0 WITH LLVM-exception", + "BSD-2-Clause", + "BSD-3-Clause", + "CC0-1.0", + "ISC", + "MIT", + "MPL-2.0", + "Unicode-DFS-2016", + "Zlib", +] + +[sources] +allow-git = [ + "https://github.com/grovesNL/glow", +] +unknown-registry = "deny" +unknown-git = "deny" +required-git-spec = "rev" + +[sources.allow-org] +github = [ + "gfx-rs" +] diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1ef5164276..6c287b927c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -356,3 +356,31 @@ jobs: - name: build Deno run: | cargo clippy --manifest-path cts_runner/Cargo.toml + + cargo-deny-check-advisories: + name: "Run `cargo deny check advisories`" + runs-on: ubuntu-latest + steps: + - name: checkout repo + uses: actions/checkout@v3 + + - name: Run `cargo deny check` + uses: EmbarkStudios/cargo-deny-action@v1 + with: + command: check advisories + arguments: --all-features --workspace + rust-version: ${{ env.RUST_VERSION }} + + cargo-deny-check-rest: + name: "Run `cargo deny check`" + runs-on: ubuntu-latest + steps: + - name: checkout repo + uses: actions/checkout@v3 + + - name: Run `cargo deny check` + uses: EmbarkStudios/cargo-deny-action@v1 + with: + command: check bans licenses sources + arguments: --all-features --workspace + rust-version: ${{ env.RUST_VERSION }} diff --git a/Cargo.lock b/Cargo.lock index 0b0361fe8f..021fdf6d78 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1003,7 +1003,7 @@ checksum = "518faa5064866338b013ff9b2350dc318e14cc4fcd6cb8206d7e7c9886c98815" [[package]] name = "glow" version = "0.11.2" -source = "git+https://github.com/grovesNL/glow/?rev=c8a011fcd57a5c68cc917ed394baa484bdefc909#c8a011fcd57a5c68cc917ed394baa484bdefc909" +source = "git+https://github.com/grovesNL/glow?rev=c8a011fcd57a5c68cc917ed394baa484bdefc909#c8a011fcd57a5c68cc917ed394baa484bdefc909" dependencies = [ "js-sys", "slotmap", diff --git a/Cargo.toml b/Cargo.toml index 50fd3c2d51..0a3262a7e5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -103,7 +103,7 @@ winapi = "0.3" egl = { package = "khronos-egl", version = "4.1" } # glow = { version = "0.11.2", optional = true } # TODO: New glow release -glow = { git = "https://github.com/grovesNL/glow/", rev = "c8a011fcd57a5c68cc917ed394baa484bdefc909" } +glow = { git = "https://github.com/grovesNL/glow", rev = "c8a011fcd57a5c68cc917ed394baa484bdefc909" } glutin = "0.29.1" # wasm32 dependencies diff --git a/run-wasm/Cargo.toml b/run-wasm/Cargo.toml index 817c687a04..773782457e 100644 --- a/run-wasm/Cargo.toml +++ b/run-wasm/Cargo.toml @@ -3,6 +3,7 @@ name = "run-wasm" version.workspace = true authors.workspace = true edition.workspace = true +license.workspace = true # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/wgpu-info/Cargo.toml b/wgpu-info/Cargo.toml index 1f9f466e3c..073461b8df 100644 --- a/wgpu-info/Cargo.toml +++ b/wgpu-info/Cargo.toml @@ -8,6 +8,7 @@ homepage.workspace = true repository.workspace = true keywords.workspace = true license.workspace = true +publish = false [dependencies] env_logger.workspace = true