Skip to content

Commit

Permalink
feat(ci): add cargo deny to lint dependencies (#213)
Browse files Browse the repository at this point in the history
timonv authored Aug 4, 2024

Verified

This commit was signed with the committer’s verified signature.
marmarek Marek Marczykowski-Górecki
1 parent 72b1ab1 commit 53e662b
Showing 13 changed files with 138 additions and 54 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -33,6 +33,8 @@ jobs:
uses: crate-ci/typos@master
- name: "Rustfmt"
run: cargo fmt --all --check
- name: Lint dependencies
uses: EmbarkStudios/cargo-deny-action@v1

test:
name: Test
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 13 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -6,10 +6,22 @@ members = [
"swiftide-indexing",

"examples",
"benchmarks", "swiftide-test-utils",
"benchmarks",
"swiftide-test-utils",
]
resolver = "2"

[workspace.package]
version = "0.7.0"
edition = "2021"
license = "MIT"
readme = "README.md"
keywords = ["llm", "rag", "ai", "data", "openai"]
description = "Blazing fast, streaming pipeline library for AI applications"
categories = ["asynchronous"]
repository = "https://github.com/bosun-ai/swiftide-rs"
homepage = "https://swiftide.rs"

[profile.dev.package]
insta.opt-level = 3
similar.opt-level = 3
11 changes: 9 additions & 2 deletions benchmarks/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
[package]
name = "benchmarks"
version = "0.0.0"
publish = false
edition = "2021"
version.workspace = true
edition.workspace = true
license.workspace = true
readme.workspace = true
keywords.workspace = true
description.workspace = true
categories.workspace = true
repository.workspace = true
homepage.workspace = true

[dev-dependencies]
tokio = { version = "1.0", features = ["full"] }
39 changes: 39 additions & 0 deletions deny.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
[graph]
all-features = true

[licenses]
confidence-threshold = 0.8
allow = [
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause",
"ISC",
"MIT",
"Unicode-DFS-2016",
"WTFPL",
"MPL-2.0",
]
exceptions = [{ allow = ["OpenSSL"], crate = "ring" }]

[advisories]
yanked = "deny"

[bans]
multiple-versions = "allow"

[sources]
unknown-registry = "deny"
unknown-git = "warn"
allow-registry = ["https://github.com/rust-lang/crates.io-index"]

[[licenses.clarify]]
crate = "ring"
# SPDX considers OpenSSL to encompass both the OpenSSL and SSLeay licenses
# https://spdx.org/licenses/OpenSSL.html
# ISC - Both BoringSSL and ring use this for their new files
# MIT - "Files in third_party/ have their own licenses, as described therein. The MIT
# license, for third_party/fiat, which, unlike other third_party directories, is
# compiled into non-test libraries, is included below."
# OpenSSL - Obviously
expression = "ISC AND MIT AND OpenSSL"
license-files = [{ path = "LICENSE", hash = 0xbd0eed23 }]
11 changes: 9 additions & 2 deletions examples/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
[package]
name = "examples"
version = "0.0.0"
publish = false
edition = "2021"
version.workspace = true
edition.workspace = true
license.workspace = true
readme.workspace = true
keywords.workspace = true
description.workspace = true
categories.workspace = true
repository.workspace = true
homepage.workspace = true

[dependencies]
tokio = { version = "1.0", features = ["full"] }
9 changes: 9 additions & 0 deletions release-plz.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
[workspace]
changelog_path = "./CHANGELOG.md"
changelog_config = "cliff.toml"
git_tag_enable = false
git_release_enable = false

[[package]]
# Only release the main package on github
name = "swiftide"
git_tag_name = "v{{ version }}"
git_tag_enable = true
git_release_enable = true
18 changes: 9 additions & 9 deletions swiftide-core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[package]
name = "swiftide-core"
version = "0.7.0"
edition = "2021"
license = "MIT"
readme = "../README.md"
keywords = ["llm", "rag", "ai", "data", "openai"]
description = "Blazing fast, streaming pipeline library for AI applications"
categories = ["asynchronous"]
repository = "https://github.com/bosun-ai/swiftide-rs"
homepage = "https://swiftide.rs"
version.workspace = true
edition.workspace = true
license.workspace = true
readme.workspace = true
keywords.workspace = true
description.workspace = true
categories.workspace = true
repository.workspace = true
homepage.workspace = true

[dependencies]
anyhow = { workspace = true }
18 changes: 9 additions & 9 deletions swiftide-indexing/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[package]
name = "swiftide-indexing"
version = "0.7.0"
edition = "2021"
license = "MIT"
readme = "../README.md"
keywords = ["llm", "rag", "ai", "data", "openai"]
description = "Blazing fast, streaming pipeline library for AI applications"
categories = ["asynchronous"]
repository = "https://github.com/bosun-ai/swiftide-rs"
homepage = "https://swiftide.rs"
version.workspace = true
edition.workspace = true
license.workspace = true
readme.workspace = true
keywords.workspace = true
description.workspace = true
categories.workspace = true
repository.workspace = true
homepage.workspace = true

[dependencies]
swiftide-core = { path = "../swiftide-core", version = "0.7" }
18 changes: 9 additions & 9 deletions swiftide-integrations/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[package]
name = "swiftide-integrations"
version = "0.7.0"
edition = "2021"
license = "MIT"
readme = "../README.md"
keywords = ["llm", "rag", "ai", "data", "openai"]
description = "Blazing fast, streaming pipeline library for AI applications"
categories = ["asynchronous"]
repository = "https://github.com/bosun-ai/swiftide-rs"
homepage = "https://swiftide.rs"
version.workspace = true
edition.workspace = true
license.workspace = true
readme.workspace = true
keywords.workspace = true
description.workspace = true
categories.workspace = true
repository.workspace = true
homepage.workspace = true

[dependencies]
swiftide-core = { path = "../swiftide-core", version = "0.7" }
18 changes: 9 additions & 9 deletions swiftide-query/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[package]
name = "swiftide-query"
version = "0.7.0"
edition = "2021"
license = "MIT"
readme = "../README.md"
keywords = ["llm", "rag", "ai", "data", "openai"]
description = "Blazing fast, streaming pipeline library for AI applications"
categories = ["asynchronous"]
repository = "https://github.com/bosun-ai/swiftide-rs"
homepage = "https://swiftide.rs"
version.workspace = true
edition.workspace = true
license.workspace = true
readme.workspace = true
keywords.workspace = true
description.workspace = true
categories.workspace = true
repository.workspace = true
homepage.workspace = true

[dependencies]
anyhow = { workspace = true }
10 changes: 9 additions & 1 deletion swiftide-test-utils/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
[package]
name = "swiftide-test-utils"
publish = false
edition = "2021"
version.workspace = true
edition.workspace = true
license.workspace = true
readme.workspace = true
keywords.workspace = true
description.workspace = true
categories.workspace = true
repository.workspace = true
homepage.workspace = true

[dependencies]
swiftide-core = { path = "../swiftide-core", features = ["test-utils"] }
18 changes: 9 additions & 9 deletions swiftide/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[package]
name = "swiftide"
version = "0.7.0"
edition = "2021"
license = "MIT"
readme = "../README.md"
keywords = ["llm", "rag", "ai", "data", "openai"]
description = "Blazing fast, streaming pipeline library for AI applications"
categories = ["asynchronous"]
repository = "https://github.com/bosun-ai/swiftide-rs"
homepage = "https://swiftide.rs"
version.workspace = true
edition.workspace = true
license.workspace = true
readme.workspace = true
keywords.workspace = true
description.workspace = true
categories.workspace = true
repository.workspace = true
homepage.workspace = true

[badges]

0 comments on commit 53e662b

Please sign in to comment.