Raw-rs: Remove from workspace (#2066)

* Remove raw-rs from workspace

* Add feature blocking to reqwest

* Use release build to run the tests

* Split Raw-rs CI into a seperate workflow

* Fix cargo-deny check for Raw-rs

* Only run the CI if Raw-rs changes

* Enable clippy check for Raw-rs

* Add newline in clippy check

* Fixups

* Use ubuntu-latest

* Remove mold

* Install sccache

* Attempt 2

* Attempt 3

* Add emoji for consistency

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
Elbert Ronnie 2024-10-26 03:14:45 +05:30 committed by GitHub
parent 36fe9bf31b
commit 9d13a8f73b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 2237 additions and 87 deletions

View file

@ -108,12 +108,24 @@ jobs:
- name: 📥 Clone and checkout repository
uses: actions/checkout@v3
- name: 🔒 Check crate security advisories
- name: 🔒 Check crate security advisories for root workspace
uses: EmbarkStudios/cargo-deny-action@v1
with:
command: check advisories
- name: 📜 Check crate license compatibility
- name: 🔒 Check crate security advisories for /libraries/raw-rs
uses: EmbarkStudios/cargo-deny-action@v1
with:
command: check advisories
manifest-path: libraries/raw-rs/Cargo.toml
- name: 📜 Check crate license compatibility for root workspace
uses: EmbarkStudios/cargo-deny-action@v1
with:
command: check bans licenses sources
- name: 📜 Check crate license compatibility for /libraries/raw-rs
uses: EmbarkStudios/cargo-deny-action@v1
with:
command: check bans licenses sources
manifest-path: libraries/raw-rs/Cargo.toml

View file

@ -32,8 +32,15 @@ jobs:
- name: Run Clippy
id: clippy
run: |
# Run Clippy and filter output
# Run Clippy and filter output for the root workspace
CLIPPY_OUTPUT=$(cargo clippy --all-targets --all-features -- -W clippy::all 2>&1 | grep -vE "^(\s*Updating|\s*Download|\s*Compiling|\s*Checking|Finished)")
# Run Clippy and filter output for /libraries/raw-rs
cd libraries/raw-rs
CLIPPY_OUTPUT+=$'\n\n'
CLIPPY_OUTPUT+=$(cargo clippy --all-targets --all-features -- -W clippy::all 2>&1 | grep -vE "^(\s*Updating|\s*Download|\s*Compiling|\s*Checking|Finished)")
cd ../..
# Escape special characters for JSON
ESCAPED_OUTPUT=$(echo "$CLIPPY_OUTPUT" | jq -sR .)
echo "CLIPPY_OUTPUT=$ESCAPED_OUTPUT" >> $GITHUB_OUTPUT

61
.github/workflows/library-raw-rs.yml vendored Normal file
View file

@ -0,0 +1,61 @@
name: "Library: Raw-rs"
on:
push:
branches:
- master
paths:
- "libraries/raw-rs/**"
pull_request:
branches:
- master
paths:
- "libraries/raw-rs/**"
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
env:
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
CARGO_INCREMENTAL: 0
SCCACHE_DIR: /var/lib/github-actions/.cache
steps:
- name: 📥 Clone and checkout repository
uses: actions/checkout@v3
- name: 🦀 Install the latest Rust
run: |
echo "Initial system version:"
rustc --version
rustup update stable
echo "Latest updated version:"
rustc --version
- name: 📦 Run sccache-cache
uses: mozilla-actions/sccache-action@v0.0.6
- name: 🔬 Check Rust formatting
run: |
cd libraries/raw-rs
cargo fmt --all -- --check
- name: 🦀 Build Rust code
run: |
cd libraries/raw-rs
cargo build --release --all-features
- name: 🧪 Run Rust tests
run: |
cd libraries/raw-rs
cargo test --release --all-features
- name: 📈 Run sccache stat for check
shell: bash
run: sccache --show-stats

70
Cargo.lock generated
View file

@ -595,12 +595,6 @@ dependencies = [
"serde",
]
[[package]]
name = "bitstream-io"
version = "2.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b81e1519b0d82120d2fd469d5bfb2919a9361c48b02d82d04befc1cdd2002452"
[[package]]
name = "block"
version = "0.1.6"
@ -688,16 +682,6 @@ dependencies = [
"serde",
]
[[package]]
name = "build-camera-data"
version = "0.0.1"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.79",
"toml 0.8.19",
]
[[package]]
name = "bumpalo"
version = "3.16.0"
@ -1821,17 +1805,6 @@ dependencies = [
"percent-encoding",
]
[[package]]
name = "fortuples"
version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "87630a8087e9cac4b7edfb6ee5e250ddca9112b57b6b17d8f5107375a3a8eace"
dependencies = [
"proc-macro2",
"quote",
"syn 1.0.109",
]
[[package]]
name = "futf"
version = "0.1.5"
@ -3433,25 +3406,6 @@ version = "0.2.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058"
[[package]]
name = "libraw-rs"
version = "0.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "24ec60aab878560c299c6e70a0c6dc2278a2159ac6fe09650917266b8985387f"
dependencies = [
"libraw-rs-sys",
]
[[package]]
name = "libraw-rs-sys"
version = "0.0.4+libraw-0.20.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ba094a3b8b04cc42fdeafaff06f81d3b13a7d01cc7a8eae55b943dae1b65c3cc"
dependencies = [
"cc",
"libc",
]
[[package]]
name = "libredox"
version = "0.0.2"
@ -4921,22 +4875,6 @@ version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9c8a99fddc9f0ba0a85884b8d14e3592853e787d581ca1816c91349b10e4eeab"
[[package]]
name = "raw-rs"
version = "0.0.1"
dependencies = [
"bitstream-io",
"build-camera-data",
"fortuples",
"image 0.25.2",
"libraw-rs",
"num_enum 0.7.3",
"rayon",
"reqwest 0.12.8",
"tag-derive",
"thiserror",
]
[[package]]
name = "raw-window-handle"
version = "0.5.2"
@ -6086,14 +6024,6 @@ dependencies = [
"version-compare 0.2.0",
]
[[package]]
name = "tag-derive"
version = "0.0.1"
dependencies = [
"quote",
"syn 2.0.79",
]
[[package]]
name = "tao"
version = "0.16.10"

View file

@ -18,9 +18,6 @@ members = [
"libraries/dyn-any",
"libraries/path-bool",
"libraries/bezier-rs",
"libraries/raw-rs",
"libraries/raw-rs/tag-derive",
"libraries/raw-rs/build-camera-data",
"website/other/bezier-rs-demos/wasm",
]
exclude = ["node-graph/gpu-compiler"]

2139
libraries/raw-rs/Cargo.lock generated Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,3 +1,11 @@
[workspace]
members = ["tag-derive", "build-camera-data"]
resolver = "2"
[workspace.dependencies]
quote = "1.0.37"
syn = "2.0.79"
[package]
name = "raw-rs"
version = "0.0.1"
@ -20,18 +28,14 @@ raw-rs-tests = ["dep:image", "dep:libraw-rs", "dep:reqwest", "dep:rayon"]
tag-derive = { path = "tag-derive" }
build-camera-data = { path = "build-camera-data" }
# Workspace dependencies
thiserror = { workspace = true }
# Required dependencies
bitstream-io = "2.3.0"
num_enum = "0.7.2"
bitstream-io = "2.5.3"
num_enum = "0.7.3"
fortuples = "0.9.1"
# Optional workspace dependencies
image = { workspace = true, optional = true }
reqwest = { workspace = true, optional = true }
thiserror = "1.0.64"
# Optional dependencies (should be dev dependencies, but Cargo currently doesn't allow optional dev dependencies)
image = { version = "0.25.3", optional = true }
reqwest = { version = "0.12.8", optional = true, features = ["blocking"] }
libraw-rs = { version = "0.0.4", optional = true }
rayon = { version = "1.10.0", optional = true }

View file

@ -15,7 +15,7 @@ proc-macro = true
# Workspace dependencies
quote = { workspace = true }
syn = { workspace = true }
proc-macro2 = { workspace = true }
# Required dependencies
toml = "0.8.15"
proc-macro2 = "1.0.88"

View file

@ -41,7 +41,7 @@ impl From<Value> for CustomValue {
Value::Float(x) => CustomValue::Float(x),
Value::Boolean(x) => CustomValue::Boolean(x),
Value::Array(x) => CustomValue::Array(x.into_iter().map(|x| x.into()).collect()),
_ => panic!("Unsuported data type"),
_ => panic!("Unsupported data type"),
}
}
}