Skip to content

Commit 84f9da7

Browse files
committed
build on windows/linux/msrv/stable matrix test
1 parent ab9620d commit 84f9da7

File tree

1 file changed

+33
-23
lines changed

1 file changed

+33
-23
lines changed

.github/workflows/build.yml

Lines changed: 33 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ jobs:
3434
SAMBA_GLOBAL_CONFIG_smb_SPACE_encrypt: "auto"
3535
options: --name samba --privileged --cap-add NET_ADMIN
3636

37+
env:
38+
SMB_RUST_TESTS_SERVER: samba
39+
RUST_LOG: debug
40+
3741
steps:
3842
- uses: actions/checkout@v4
3943
- name: Prepare async tests
@@ -52,43 +56,49 @@ jobs:
5256
cargo clippy --verbose --no-default-features --features "${{ matrix.compile_features }},${COMMON_FEATURES}" -- -Dclippy::all
5357
- name: Tests/${{ matrix.compile_features }}
5458
run: |
55-
export SMB_RUST_TESTS_SERVER=samba
56-
export RUST_LOG=debug
57-
cargo test --verbose --no-default-features --features "${{ matrix.compile_features }},${COMMON_FEATURES}" -- --nocapture
59+
cargo test --no-default-features --features "${{ matrix.compile_features }},${COMMON_FEATURES}" -- --nocapture
5860
# Test without encryption and compression
59-
cargo test --verbose --no-default-features --features "${{ matrix.compile_features }},sign" -- --nocapture
61+
cargo test --no-default-features --features "${{ matrix.compile_features }},sign" -- --nocapture
6062
# Test signing with specific algorithms
61-
cargo test --verbose --no-default-features --features "${{ matrix.compile_features }},sign_cmac" -- --nocapture
62-
cargo test --verbose --no-default-features --features "${{ matrix.compile_features }},sign_gmac" -- --nocapture
63-
cargo test --verbose --no-default-features --features "${{ matrix.compile_features }},sign_hmac" -- --nocapture
63+
cargo test --no-default-features --features "${{ matrix.compile_features }},sign_cmac" -- --nocapture
64+
cargo test --no-default-features --features "${{ matrix.compile_features }},sign_gmac" -- --nocapture
65+
cargo test --no-default-features --features "${{ matrix.compile_features }},sign_hmac" -- --nocapture
6466
- name: Build/${{ matrix.compile_features }}
65-
run: cargo build --verbose --no-default-features --features "${{ matrix.compile_features }},${COMMON_FEATURES}"
67+
run: |
68+
cargo build --no-default-features --features "${{ matrix.compile_features }},${COMMON_FEATURES}"
69+
cargo doc --no-default-features --features "${{ matrix.compile_features }},${COMMON_FEATURES}"
6670
67-
build-msrv:
68-
runs-on: ubuntu-latest
69-
container:
70-
image: rust:1.85
71+
build:
72+
strategy:
73+
matrix:
74+
os: [ubuntu-latest, windows-latest]
75+
rust: [1.85, stable]
7176

77+
runs-on: ${{ matrix.os }}
7278
steps:
7379
- uses: actions/checkout@v4
74-
- name: Build
80+
- name: Setting up Rust
81+
uses: actions-rs/toolchain@v1
82+
with:
83+
toolchain: ${{ matrix.rust }}
84+
override: true
85+
- name: Build and Doc (Async)
7586
run: |
76-
for td_model in async multi_threaded single_threaded; do
77-
echo "Compiling with features: $td_model, ${COMMON_FEATURES}"
78-
cargo build --verbose --no-default-features --features "$td_model,${COMMON_FEATURES}"
79-
done
80-
- name: Doc
87+
cargo build --no-default-features --features "async,${COMMON_FEATURES}"
88+
89+
- name: Build and Doc (Multi-threaded)
8190
run: |
82-
for td_model in async multi_threaded single_threaded; do
83-
echo "Generating documentation with features: $td_model, ${COMMON_FEATURES}"
84-
cargo doc --verbose --no-default-features --features "$td_model,${COMMON_FEATURES}"
85-
done
91+
cargo build --no-default-features --features "multi_threaded,${COMMON_FEATURES}"
92+
93+
- name: Build and Doc (Single-threaded)
94+
run: |
95+
cargo build --no-default-features --features "single_threaded,${COMMON_FEATURES}"
8696
8797
publish:
8898
runs-on: ubuntu-latest
8999
container:
90100
image: rust:1.85
91-
needs: [test, build-msrv]
101+
needs: [test, build]
92102
environment: production
93103
if: startsWith(github.ref, 'refs/tags/v')
94104
steps:

0 commit comments

Comments
 (0)