Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
aa08d37
Refactor into multiple rust binaries
thomaseizinger Nov 4, 2022
0e8d9a4
Merge branch 'master' into 71-split-rust-crate
thomaseizinger Nov 8, 2022
6d1b820
Fix some errors
thomaseizinger Nov 8, 2022
2056ae8
Update master libp2p to make use of latest derive features
thomaseizinger Nov 14, 2022
62460ea
Explicitly specify git revision in manifest file
thomaseizinger Nov 15, 2022
7d3decb
Cargo updates dependency automatically if the manifest file changes
thomaseizinger Nov 15, 2022
a8889e1
Make Dockerfile more maintenance friendly
thomaseizinger Nov 15, 2022
42bfd42
Remove stale `UpdateCmd`
thomaseizinger Nov 15, 2022
e69c165
Fix and simplify `sed`s
thomaseizinger Nov 15, 2022
f1cffef
Escape `GIT_TARGET` properly
thomaseizinger Nov 15, 2022
2c17e00
Restore original Dockerfile from local testing
thomaseizinger Nov 15, 2022
16aff9d
Add comment about build cache
thomaseizinger Nov 15, 2022
b6d6549
Put `if` on one line
thomaseizinger Nov 15, 2022
69c7d14
Update README
thomaseizinger Nov 15, 2022
6ac74b0
Use alternative sed delimiter
thomaseizinger Nov 15, 2022
40cfcac
Actually expand variables :facepalm:
thomaseizinger Nov 15, 2022
c95c03b
Attempt to fix entrypoint
thomaseizinger Nov 15, 2022
5ede777
Try not quoting vars
thomaseizinger Nov 16, 2022
8a739d3
More Dockerfile debugging
thomaseizinger Nov 16, 2022
a632dde
More Dockerfile debugging
thomaseizinger Nov 16, 2022
f53398c
More Dockerfile debugging
thomaseizinger Nov 16, 2022
fff11a9
More Dockerfile debugging
thomaseizinger Nov 16, 2022
7d2b5ab
More Dockerfile debugging
thomaseizinger Nov 16, 2022
ddc0d72
Apply suggestions from code review
thomaseizinger Nov 16, 2022
c5710e1
ping/rust/Dockerfile: Fix typo usrl usr
mxinden Nov 16, 2022
6bc971d
Update ping/rust/Dockerfile
thomaseizinger Nov 16, 2022
e81e928
Move in previous container
thomaseizinger Nov 16, 2022
a4472fb
Move comment out the way
thomaseizinger Nov 16, 2022
e50da9b
Copy binary directly into correct location
thomaseizinger Nov 17, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ 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 latest `[[groups]]` section and update it's `Id` and `CargoFeature` name.
- Copy the latest `[[groups]]` section and update it's `Id` and `BinaryName` accordingly.
2. In the `ping/rust` folder,
- `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`
- `Cargo.toml`: Add the newly released version as a crates.io dependency.
- `Cargo.toml`: Update the `Next release` dependency to the latest `master` SHA.
- `src/bin`: Add a new binary with the next released version.
3. Run the test on your machine
- 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`
Expand Down
10 changes: 4 additions & 6 deletions ping/_compositions/go-rust-interop-latest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
path = "./rust/"

[groups.build_config.build_args]
CARGO_FEATURES = '{{ .CargoFeatures }}'
BINARY_NAME = '{{ .BinaryName }}'
{{ end }}

{{ if eq $.Env.InteropTarget "rust" }}
Expand All @@ -90,11 +90,9 @@
path = "./rust/"

[groups.build_config.build_args]
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", "ping", "noise", "dns", "async-std", "rsa" ], optional = true}
"""
BINARY_NAME = '{{ .BinaryName }}'
GIT_TARGET = '{{ $.Env.GitTarget }}'
GIT_REF = '{{ $.Env.GitTarget }}'
{{ end }}
{{ end }}
{{ end }}
Expand Down
13 changes: 6 additions & 7 deletions ping/_compositions/go-rust-interop.toml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
path = "./rust/"

[groups.build_config.build_args]
CARGO_FEATURES = '{{ .CargoFeatures }}'
BINARY_NAME = '{{ .BinaryName }}'
{{ end }}

{{ with .master }}
Expand All @@ -115,7 +115,8 @@
path = "./rust/"

[groups.build_config.build_args]
CARGO_FEATURES = '{{ .CargoFeatures }}'
BINARY_NAME = '{{ .BinaryName }}'
GIT_REV = '{{ $.Env.GitReference }}'
{{ end }}

{{ if eq $.Env.InteropTarget "rust" }}
Expand All @@ -130,11 +131,9 @@
path = "./rust/"

[groups.build_config.build_args]
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", "ping", "noise", "dns", "async-std", "rsa" ], optional = true}
"""
BINARY_NAME = '{{ .BinaryName }}'
GIT_TARGET = '{{ $.Env.GitTarget }}'
GIT_REV = '{{ $.Env.GitReference }}'
{{ end }}
{{ end }}
{{ end }}
Expand Down
13 changes: 6 additions & 7 deletions ping/_compositions/rust-cross-versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
instances = { count = 1 }

[groups.build_config.build_args]
CARGO_FEATURES = '{{ .CargoFeatures }}'
BINARY_NAME = '{{ .BinaryName }}'
{{ end }}

{{ with .master }}
Expand All @@ -24,7 +24,8 @@
instances = { count = 1 }

[groups.build_config.build_args]
CARGO_FEATURES = '{{ .CargoFeatures }}'
BINARY_NAME = '{{ .BinaryName }}'
GIT_REF = '{{ $.Env.GitTarget }}'
{{ end }}

{{ if $.Env.GitReference }}
Expand All @@ -34,11 +35,9 @@
instances = { count = 1 }

[groups.build_config.build_args]
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", "ping", "noise", "dns", "async-std", "rsa" ], optional = true}
"""
BINARY_NAME = '{{ .BinaryName }}'
GIT_TARGET = '{{ $.Env.GitTarget }}'
GIT_REF = '{{ $.Env.GitTarget }}'
{{ end }}
{{ end }}
{{ end }}
16 changes: 8 additions & 8 deletions ping/_compositions/rust.toml
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
[master]
CargoFeatures = 'libp2pmaster'
BinaryName = 'testplan_0500'

[custom]
CargoFeatures = 'libp2pmaster'
BinaryName = 'testplan_0500'

[[groups]]
Id = '0.49.0'
CargoFeatures = 'libp2pv0490'
BinaryName = 'testplan_0490'

[[groups]]
Id = '0.48.0'
CargoFeatures = 'libp2pv0480'
BinaryName = 'testplan_0480'

[[groups]]
Id = "v0.47.0"
CargoFeatures = 'libp2pv0470'
BinaryName = 'testplan_0470'

[[groups]]
Id = "v0.46.0"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should here also be the 46.1?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure, this is take verbatim from current master.

CargoFeatures = 'libp2pv0460'
BinaryName = 'testplan_0460'

[[groups]]
Id = "v0.45.1"
CargoFeatures = 'libp2pv0450'
BinaryName = 'testplan_0450'
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
BinaryName = 'testplan_0450'
BinaryName = 'testplan_0451'

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you send a follow-up if you care much? :)

I'd prefer to merge this asap to unblock libp2p/rust-libp2p#2972.


[[groups]]
Id = "v0.44.0"
CargoFeatures = 'libp2pv0440'
BinaryName = 'testplan_0440'
3 changes: 3 additions & 0 deletions ping/rust/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
target/
Dockerfile
manifest.toml
Loading