mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-13 01:51:23 +00:00
fix(ci): ensure all examples compile with the specified feature-set
Due to cargo's feature unification, a full build of our workspace doesn't actually check whether the examples compile as standalone projects. We add a new CI check that iterates through all crates in the `examples/` directory and runs a plain `cargo check` on them. Any failure is bubbled up via `set -e`, thus failing CI in case one of the `cargo check` commands fails. To fix the current failures, we construct a simple TCP transport everywhere where we were previously using `development_transport`. That is because `development_transport` requires `mplex` which is now deprecated. Related #3657. Related #3809. Pull-Request: #3811.
This commit is contained in:
@ -43,7 +43,7 @@ async fn main() {
|
||||
|
||||
let mut swarm = SwarmBuilder::with_tokio_executor(
|
||||
tcp::tokio::Transport::default()
|
||||
.upgrade(Version::V1)
|
||||
.upgrade(Version::V1Lazy)
|
||||
.authenticate(noise::NoiseAuthenticated::xx(&key_pair).unwrap())
|
||||
.multiplex(yamux::YamuxConfig::default())
|
||||
.boxed(),
|
||||
|
@ -39,7 +39,7 @@ async fn main() {
|
||||
|
||||
let mut swarm = SwarmBuilder::with_tokio_executor(
|
||||
tcp::tokio::Transport::default()
|
||||
.upgrade(Version::V1)
|
||||
.upgrade(Version::V1Lazy)
|
||||
.authenticate(noise::NoiseAuthenticated::xx(&key_pair).unwrap())
|
||||
.multiplex(yamux::YamuxConfig::default())
|
||||
.boxed(),
|
||||
|
@ -39,7 +39,7 @@ async fn main() {
|
||||
|
||||
let mut swarm = SwarmBuilder::with_tokio_executor(
|
||||
tcp::tokio::Transport::default()
|
||||
.upgrade(Version::V1)
|
||||
.upgrade(Version::V1Lazy)
|
||||
.authenticate(noise::NoiseAuthenticated::xx(&key_pair).unwrap())
|
||||
.multiplex(yamux::YamuxConfig::default())
|
||||
.boxed(),
|
||||
|
@ -53,7 +53,7 @@ async fn main() {
|
||||
|
||||
let mut swarm = SwarmBuilder::with_tokio_executor(
|
||||
tcp::tokio::Transport::default()
|
||||
.upgrade(Version::V1)
|
||||
.upgrade(Version::V1Lazy)
|
||||
.authenticate(noise::NoiseAuthenticated::xx(&key_pair).unwrap())
|
||||
.multiplex(yamux::YamuxConfig::default())
|
||||
.boxed(),
|
||||
|
Reference in New Issue
Block a user