Skip to content

Commit 1955c22

Browse files
committed
Use workspace dependencies for smb-* crates too.
Move smb-cli outside of crates/ Make the CI shorter
1 parent d507f9a commit 1955c22

File tree

20 files changed

+46
-36
lines changed

20 files changed

+46
-36
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -59,22 +59,18 @@ jobs:
5959
run: |
6060
rustup component add clippy
6161
cargo clippy --verbose --no-default-features --features "${{ matrix.compile_features }},${COMMON_FEATURES}" -- -Dclippy::all
62+
- name: Build/${{ matrix.compile_features }}
63+
run: |
64+
cargo build --no-default-features --features "${{ matrix.compile_features }},${COMMON_FEATURES}"
6265
- name: Tests/${{ matrix.compile_features }}
6366
run: |
64-
cargo test -p smb-msg --features client --no-default-features -- --nocapture
6567
cargo test -p smb-msg --features server --no-default-features -- --nocapture
6668
cargo test -p smb-msg --features both --no-default-features -- --nocapture
6769
70+
# Full client tests with all features
6871
cargo test --no-default-features --features "${{ matrix.compile_features }},${COMMON_FEATURES}" -- --nocapture
69-
# Test without encryption and compression
70-
cargo test --no-default-features --features "${{ matrix.compile_features }},sign" -- --nocapture
71-
# Test signing with specific algorithms
72-
cargo test --no-default-features --features "${{ matrix.compile_features }},sign_cmac" -- --nocapture
73-
cargo test --no-default-features --features "${{ matrix.compile_features }},sign_gmac" -- --nocapture
74-
cargo test --no-default-features --features "${{ matrix.compile_features }},sign_hmac" -- --nocapture
75-
- name: Build/${{ matrix.compile_features }}
72+
- name: Doc/${{ matrix.compile_features }}
7673
run: |
77-
cargo build --no-default-features --features "${{ matrix.compile_features }},${COMMON_FEATURES}"
7874
cargo doc --no-default-features --features "${{ matrix.compile_features }},${COMMON_FEATURES}"
7975
8076
build:

Cargo.toml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[workspace]
2-
members = ["crates/*"]
2+
members = ["crates/*", "smb-cli"]
33
resolver = "2"
44

55
[workspace.package]
@@ -16,6 +16,19 @@ readme = "README.md"
1616
version = "0.10.4"
1717

1818
[workspace.dependencies]
19+
# Crates in this workspace
20+
smb = { path = "crates/smb", version = "0.10.4" }
21+
smb-tests = { path = "crates/smb-tests", version = "0.10.4" }
22+
smb-msg = { path = "crates/smb-msg", version = "0.10.4", default-features = false, features = [
23+
"client",
24+
] }
25+
smb-msg-derive = { path = "crates/smb-msg-derive", version = "0.10.4" }
26+
smb-dtyp = { path = "crates/smb-dtyp", version = "0.10.4" }
27+
smb-dtyp-derive = { path = "crates/smb-dtyp-derive", version = "0.10.4" }
28+
smb-rpc = { path = "crates/smb-rpc", version = "0.10.4" }
29+
smb-fscc = { path = "crates/smb-fscc", version = "0.10.4" }
30+
smb-transport = { path = "crates/smb-transport", version = "0.10.4", default-features = false }
31+
1932
# Binary encoding/decoding
2033
binrw = "0.15.0"
2134
modular-bitfield = "0.11.2"

crates/smb-dtyp/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ modular-bitfield = { workspace = true }
1717
time = { workspace = true }
1818
pastey = { workspace = true }
1919
rand = { workspace = true }
20-
smb-dtyp-derive = { path = "../smb-dtyp-derive", version = "0.10.3" }
20+
smb-dtyp-derive = { workspace = true }
2121

2222
[dev-dependencies]
23-
smb-tests = { path = "../smb-tests", version = "0.10.4" }
23+
smb-tests = { workspace = true }

crates/smb-fscc/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ keywords.workspace = true
1212
categories.workspace = true
1313

1414
[dependencies]
15-
smb-dtyp = { path = "../smb-dtyp", version = "0.10.4" }
15+
smb-dtyp = { workspace = true }
1616

1717
binrw = { workspace = true }
1818
modular-bitfield = { workspace = true }
@@ -21,5 +21,5 @@ pastey = { workspace = true }
2121
thiserror = { workspace = true }
2222

2323
[dev-dependencies]
24-
smb-tests = { path = "../smb-tests", version = "0.10.4" }
24+
smb-tests = { workspace = true }
2525
const_format = { workspace = true }

crates/smb-msg/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ server = []
2121
both = ["client", "server"]
2222

2323
[dependencies]
24-
smb-dtyp = { path = "../smb-dtyp", version = "0.10.4" }
25-
smb-fscc = { path = "../smb-fscc", version = "0.10.4" }
26-
smb-msg-derive = { path = "../smb-msg-derive", version = "0.10.4" }
24+
smb-dtyp = { workspace = true }
25+
smb-fscc = { workspace = true }
26+
smb-msg-derive = { workspace = true }
2727

2828
binrw = { workspace = true }
2929
modular-bitfield = { workspace = true }
@@ -32,5 +32,5 @@ pastey = { workspace = true }
3232
thiserror = { workspace = true }
3333

3434
[dev-dependencies]
35-
smb-tests = { path = "../smb-tests", version = "0.10.4" }
35+
smb-tests = { workspace = true }
3636
const_format = { workspace = true }

crates/smb-rpc/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ keywords.workspace = true
1212
categories.workspace = true
1313

1414
[dependencies]
15-
smb-dtyp = { path = "../smb-dtyp", version = "0.10.4" }
15+
smb-dtyp = { workspace = true }
1616

1717
binrw = { workspace = true }
1818
modular-bitfield = { workspace = true }
@@ -22,7 +22,7 @@ maybe-async = { workspace = true }
2222
thiserror = { workspace = true }
2323

2424
[dev-dependencies]
25-
smb-tests = { path = "../smb-tests", version = "0.10.4" }
25+
smb-tests = { workspace = true }
2626

2727
[features]
2828
default = []

crates/smb-transport/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ keywords.workspace = true
1212
categories.workspace = true
1313

1414
[dependencies]
15-
smb-dtyp = { path = "../smb-dtyp", version = "0.10.4" }
16-
smb-msg = { path = "../smb-msg", version = "0.10.4", optional = true }
15+
smb-dtyp = { workspace = true }
16+
smb-msg = { workspace = true, optional = true }
1717

1818
log = { workspace = true }
1919
tokio = { workspace = true, features = [
@@ -45,7 +45,7 @@ maybe-async = { workspace = true }
4545
thiserror = { workspace = true }
4646

4747
[dev-dependencies]
48-
smb-tests = { path = "../smb-tests", version = "0.10.4" }
48+
smb-tests = { workspace = true }
4949

5050
[features]
5151
default = ["async", "netbios-transport"]

crates/smb/Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ categories.workspace = true
1212
readme.workspace = true
1313

1414
[dependencies]
15-
smb-msg = { path = "../smb-msg", version = "0.10.4", default-features = false, features = ["client"]}
16-
smb-dtyp = { path = "../smb-dtyp", version = "0.10.4" }
17-
smb-rpc = { path = "../smb-rpc", version = "0.10.4" }
18-
smb-fscc = { path = "../smb-fscc", version = "0.10.4" }
19-
smb-transport = { path = "../smb-transport", version = "0.10.4", default-features = false }
15+
smb-msg = { workspace = true }
16+
smb-dtyp = { workspace = true }
17+
smb-rpc = { workspace = true }
18+
smb-fscc = { workspace = true }
19+
smb-transport = { workspace = true }
2020

2121
# Encoding/Decoding
2222
binrw = { workspace = true }

crates/smb/tests/dialects.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![cfg(all(feature = "sign", feature = "encrypt"))]
2-
31
use common::{TestConstants, make_server_connection};
42
#[cfg(feature = "async")]
53
use futures_util::StreamExt;
@@ -36,7 +34,12 @@ macro_rules! basic_test {
3634

3735
}
3836

37+
// Encryption tests, adapt to current features
38+
#[cfg(feature = "__encrypt_core")]
3939
basic_test!([Smb030, Smb0302, Smb0311], [Disabled, Required]);
40+
#[cfg(not(feature = "__encrypt_core"))]
41+
basic_test!([Smb030, Smb0302, Smb0311], [Disabled]);
42+
4043
basic_test!([Smb0202, Smb021], [Disabled]);
4144

4245
#[maybe_async::maybe_async]

crates/smb/tests/long_dir.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![cfg(all(feature = "sign", feature = "encrypt"))]
2-
31
use serial_test::serial;
42
use smb::{ConnectionConfig, Directory, connection::EncryptionMode, sync_helpers::*, tree::Tree};
53
use smb_fscc::*;

0 commit comments

Comments
 (0)