Skip to content

Commit

Permalink
Merge pull request #55 from rust-vsock/jalil/verify-minimum-dependencies
Browse files Browse the repository at this point in the history
feat: add nightly minimum dependencies test
  • Loading branch information
Tim-Zhang authored Dec 20, 2024
2 parents 42901f2 + 5fb60b9 commit f68b72c
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 4 deletions.
29 changes: 28 additions & 1 deletion .github/workflows/bvt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: BVT
on: [pull_request]
jobs:
bvt:
name: BVT
name: BVT (stable)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -16,5 +16,32 @@ jobs:
run: make clippy
- name: Build
run: make tokio_vsock
- name: Build all features
run: make tokio_vsock_all_features
- name: Build test_server
run: make test_server
bvt-nightly:
name: BVT (nightly)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: install dependencies
run: |
rustup default nightly
rustup target add x86_64-unknown-linux-musl
rustup component add rustfmt clippy
- name: Format Check
run: make fmt
- name: Clippy Check
run: make clippy
- name: Build
run: make tokio_vsock
- name: Build all features
run: make tokio_vsock_all_features
- name: Build test_server
run: make test_server
- name: Build (min-deps)
run: |
# we need to select the minimum dependencies so remove previously selected versions
rm Cargo.lock
make tokio_vsock_min_deps
7 changes: 4 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ exclude = ["test_fixture"]
[dependencies]
bytes = "1.3.0"
futures = "0.3"
libc = "0.2.138"
libc = "0.2.158"
vsock = "0.5.1"
tokio = { version = "1", features = ["net", "sync"] }
# Keep version in sync with [dev-dependencies]
tokio = { version = "1.34", features = ["net", "sync"] }
tonic05 = { package = "tonic", version = "0.5", optional = true }
tonic06 = { package = "tonic", version = "0.6", optional = true }
tonic07 = { package = "tonic", version = "0.7", optional = true }
Expand All @@ -28,7 +29,7 @@ tonic012 = { package = "tonic", version = "0.12", optional = true }
[dev-dependencies]
sha2 = "0.10.6"
rand = "0.8.5"
tokio = { version = "1", features = ["macros", "rt", "io-util"] }
tokio = { version = "1.34", features = ["macros", "rt", "io-util"] }

[package.metadata.docs.rs]
all-features = true
Expand Down
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ clean:
tokio_vsock: $(SRCS)
cargo build --lib

tokio_vsock_all_features: $(SRCS)
cargo build --lib --all-features

tokio_vsock_min_deps: $(SRCS)
cargo build --lib --all-features -Z direct-minimal-versions

test_server: tokio_vsock test_server/src/main.rs
cargo build --manifest-path=test_server/Cargo.toml

Expand Down

0 comments on commit f68b72c

Please sign in to comment.