Skip to content

Commit

Permalink
feat: add nightly minimum dependencies test
Browse files Browse the repository at this point in the history
Add a nightly toolchain to test builds using the `-Z
direct-minimum-dependencies` flag. This ensures our minimum version
requirements are compatible with our source code.

This required bumping some versions:

- libc: `0.2.138` -> `0.2.158` as `vsock-rs` depends on `0.2.158`.
- tokio: `1` -> `1.27` as we depend on methods/trait impls which are
  only available starting that version.

This ensures our minimum `tonic` requirement still compiles.
  • Loading branch information
jalil-salame committed Dec 14, 2024
1 parent d52af1b commit c839da3
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 3 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/bvt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,29 @@ jobs:
run: make tokio_vsock
- name: Build test_server
run: make test_server
bvt-nightly:
name: BVT
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 test_server
run: make test_server
- name: Min deps build
run: |
rm Cargo.lock
cargo build --features tonic-conn --lib -Z direct-minimal-versions
- name: Normal build
run: |
rm Cargo.lock
cargo build --features tonic-conn --lib
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ tonic-conn = ["tonic"]
[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"] }
tokio = { version = "1.27", features = ["net", "sync"] }
tonic = { version = ">= 0.5.0, < 0.13.0", optional = true }

[dev-dependencies]
sha2 = "0.10.6"
rand = "0.8.5"
tokio = { version = "1", features = ["macros", "rt", "io-util"] }
tokio = { version = "1.27", features = ["macros", "rt", "io-util"] }

[package.metadata.docs.rs]
all-features = true
Expand Down

0 comments on commit c839da3

Please sign in to comment.