mirror of
https://github.com/status-im/libp2p-test-plans.git
synced 2025-01-26 06:39:07 +00:00
Laurent Senta
072d351a5f
ping/rust: introduce rust cross-version test (#26)
* ping/go: fix composition name * ping/rust: introduce the ping/rust test * Showcase version selection through features Can be run with `cargo check --features libp2pv0450` or `cargo check --features libp2pv0440`. * Peer programming session * ping/rust: experiment with master & current groups * ping/rust/src/main: Simplify import across versions * ping/rust/src/main: Remove commented out code * ping/rust/src/main: Clean up * ping/rust/Dockerfile: Update crates.io index in separate step Potentially allows caching. * ping/rust/Dockerfile: Don't both build and install Building the binary in release mode is enough. * ping/rust/src/main: Clean up log lines * ping/rust: Implement iterations with latency * ping/rust/src/main: Extract signal and wait logic into fn * ping/rust/Dockerfile: import caching fixes * ping/: add cross-version composition * ping/rust: add json payloads fix * ping/rust: match iterations id with go * ping/rust/Dockerfile: improve caching * ci: introduce workflow ping-interop-rust * ping/interop: update latest versions * ping/_compositions: add full ping interop * ci: resolve git reference to sha * ping/rust/Dockerfile: drop cargo output * ping/rust: drop version indirection * ping/rust/Dockerfile: fix features to support caching * ping/rust/Dockerfile: do not cache the rewritten package * ping/_compositions/*: use concurrent_builds * ping/_compositions/*: drop test_instances count * ci: build composition then run * ping: introduce InteropTarget option * ci: fix interop target & build * ping/_compositions/*: introduce load_resource * ci: 10 minutes timeout for the run step * README: add update instruction for rust & clean go * ping/rust/Dockerfile: add protocol buffer compiler * ping/rust/Cargo.lock: cargo update packages * .github: increase testground timeout Co-authored-by: Max Inden <mail@max-inden.de>
Testground test plans for libp2p
This repository contains Testground test plans for libp2p components.
How to add a new version to ping/go
When a new version of libp2p is released, we want to make it permanent in the ping/go
test folder.
- In the
ping/_compositions/go.toml
file,- copy the
[master]
section and turn it into a[[groups]]
item - update the
[master]
section with the future version
- copy the
- In the
ping/go
folder,- Add a new compatibility shim in
compat/
if needed, or add your new selector to the latest shim (seecompat/libp2p.v0.17.go
for example). - Create the new mod and sum files (
go.v0.21.mod
for example). Assuming you're updating fromv$A
tov$B
, a simple way to do this is to:cp go.v$A.mod go.v$B.mod; cp go.v$A.sum go.v$B.sum
ln -s go.v$B.mod go.mod; ln -s go.v$B.sum go.sum
(you may also use this for local development, these files are ignored by git)- update the
go-libp2p
version, go version, and update the code if needed. - then
go get -tags v$B && go mod tidy
- Add a new compatibility shim in
- Run the test on your machine
- Do once, from the test-plans root: import the test-plans with
testground plan import ./ --name libp2p
- Run the test with
testground run composition -f ping/_compositions/go-cross-versions.toml --wait
- Do once, from the test-plans root: import the test-plans with
How to add a new version to ping/rust
When a new version of libp2p is released, we want to make it permanent in the ping/rust
test folder.
- 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
- In the
ping/rust
folder,Cargo.toml
: update the feature flagslibp2pvxxx
to fix the released version and add the newmaster
src/main.rs
: Update themod libp2p
definition with the new master- Run
cargo update
if needed. Try to build withcargo build --features libp2pvxxx
- Run the test on your machine
- Do once, from the test-plans root: import the test-plans with
testground plan import ./ --name libp2p
- Run the test with
testground run composition -f ping/_compositions/rust-cross-versions.toml --wait
- Do once, from the test-plans root: import the test-plans with
License
Dual-licensed: MIT, Apache Software License v2, by way of the Permissive License Stack.
Description
Languages
TypeScript
60.2%
Go
14.7%
Makefile
10.9%
HCL
4.1%
Shell
2.5%
Other
7.6%