Skip to content

Commit

Permalink
ping/rust: drop version for master builds
Browse files Browse the repository at this point in the history
  • Loading branch information
laurentsenta committed Sep 22, 2022
1 parent 3bae10d commit fae0ea9
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 14 deletions.
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,13 @@ When a new version of libp2p is released, we want to make it permanent in the `p
When a new version of libp2p is released, we want to make it permanent in the `ping/rust` test folder.

1. In the `ping/_compositions/rust.toml` file,
- Copy the `[master]` section and turn it into a item in the `[[groups]]` array
- Update the `[master]` section with the new master version
- Copy the latest `[[groups]]` section and update it's `Id` and `CargoFeature` name.
2. In the `ping/rust` folder,
- `Cargo.toml`: update the feature flags `libp2pvxxx` to fix the released version and add the new `master`
- `src/main.rs`: Update the `mod libp2p` definition with the new master
- `Cargo.toml`: create the feature flags `libp2pvxxx` with the released version,
- `src/main.rs`: Update the `mod libp2p` definition with the new version,
- Run `cargo update` if needed. Try to build with `cargo build --features libp2pvxxx`
3. Run the test on your machine
- Do once, from the test-plans root: import the test-plans with `testground plan import ./ --name libp2p`
- Do once, from the test-plans root: import the test-plans with `testground plan import --from ./ --name libp2p`
- Run the test with `testground run composition -f ping/_compositions/rust-cross-versions.toml --wait`

## License
Expand Down
2 changes: 1 addition & 1 deletion ping/_compositions/go-rust-interop-latest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
CARGO_FEATURES = '{{ .CargoFeatures }}'
CARGO_REMOVE = '{{ .CargoFeatures }}'
CARGO_PATCH = """
{{ .CargoFeatures }} = {package = "libp2p", git = "https://{{ or $.Env.GitTarget "github.com/libp2p/rust-libp2p" }}", rev = "{{ $.Env.GitReference }}", default_features = false, features = [ "websocket", "mplex", "yamux", "tcp-async-io", "ping", "noise", "dns-async-std" ], version = "{{ .Version }}", optional = true}
{{ .CargoFeatures }} = {package = "libp2p", git = "https://{{ or $.Env.GitTarget "github.com/libp2p/rust-libp2p" }}", rev = "{{ $.Env.GitReference }}", default_features = false, features = [ "websocket", "mplex", "yamux", "tcp-async-io", "ping", "noise", "dns-async-std" ], optional = true}
"""
{{ end }}
{{ end }}
Expand Down
2 changes: 1 addition & 1 deletion ping/_compositions/go-rust-interop.toml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
CARGO_FEATURES = '{{ .CargoFeatures }}'
CARGO_REMOVE = '{{ .CargoFeatures }}'
CARGO_PATCH = """
{{ .CargoFeatures }} = {package = "libp2p", git = "https://{{ or $.Env.GitTarget "github.com/libp2p/rust-libp2p" }}", rev = "{{ $.Env.GitReference }}", default_features = false, features = [ "websocket", "mplex", "yamux", "tcp-async-io", "ping", "noise", "dns-async-std" ], version = "{{ .Version }}", optional = true}
{{ .CargoFeatures }} = {package = "libp2p", git = "https://{{ or $.Env.GitTarget "github.com/libp2p/rust-libp2p" }}", rev = "{{ $.Env.GitReference }}", default_features = false, features = [ "websocket", "mplex", "yamux", "tcp-async-io", "ping", "noise", "dns-async-std" ], optional = true}
"""
{{ end }}
{{ end }}
Expand Down
2 changes: 1 addition & 1 deletion ping/_compositions/rust-cross-versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
CARGO_FEATURES = '{{ .CargoFeatures }}'
CARGO_REMOVE = '{{ .CargoFeatures }}'
CARGO_PATCH = """
{{ .CargoFeatures }} = {package = "libp2p", git = "https://{{ or $.Env.GitTarget "github.com/libp2p/rust-libp2p" }}", rev = "{{ $.Env.GitReference }}", default_features = false, features = [ "websocket", "mplex", "yamux", "tcp-async-io", "ping", "noise", "dns-async-std" ], version = "{{ .Version }}", optional = true}
{{ .CargoFeatures }} = {package = "libp2p", git = "https://{{ or $.Env.GitTarget "github.com/libp2p/rust-libp2p" }}", rev = "{{ $.Env.GitReference }}", default_features = false, features = [ "websocket", "mplex", "yamux", "tcp-async-io", "ping", "noise", "dns-async-std" ], optional = true}
"""
{{ end }}
{{ end }}
Expand Down
6 changes: 2 additions & 4 deletions ping/_compositions/rust.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
[master]
Version = '0.48.0'
CargoFeatures = 'libp2pv0480'
CargoFeatures = 'libp2pmaster'

[custom]
Version = '0.48.0'
CargoFeatures = 'libp2pv0480'
CargoFeatures = 'libp2pmaster'

[[groups]]
Id = "v0.47.0"
Expand Down
4 changes: 2 additions & 2 deletions ping/rust/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ use testground::network_conf::{
};

pub mod libp2p {
#[cfg(all(feature = "libp2pv0480",))]
pub use libp2pv0480::*;
#[cfg(all(feature = "libp2pmaster",))]
pub use libp2pmaster::*;

#[cfg(all(feature = "libp2pv0470",))]
pub use libp2pv0470::*;
Expand Down

0 comments on commit fae0ea9

Please sign in to comment.