libp2p-test-plans/ping/_compositions/rust-cross-versions.toml
Thomas Eizinger abce1ee483
ping/rust: Refactor into multiple binaries (#72)
By having one Rust binary per version, we can vary the actual binary from
version to version and f.e. fix deprecated API calls. It does introduce a bit of
duplication between the different versions but I'd rather have that then not
being able to adapt the tests to new APIs.

Instead of activating a feature per libp2p version, we add them all as
dependencies. This ensures all transitive dependencies are properly tracked in
`Cargo.lock`. Additionally, this gives us a single place we are can activate all
the feature.

For `master` and pull-request builds, we replace the git target or rev with the
one coming from the CI build. Once we trigger a build, `cargo` will update and
resolve the necessary dependencies before that, thus fixing problems such as
https://github.com/libp2p/rust-libp2p/pull/2972.
2022-11-18 12:49:30 +01:00

44 lines
964 B
TOML

[metadata]
name = "rust-cross-versions-{{ $.Env.GitReference }}"
[global]
plan = "libp2p/ping/rust"
case = "ping"
builder = "docker:generic"
runner = "local:docker"
concurrent_builds = 1
{{ with (load_resource "./rust.toml" ) }}
{{ range .groups }}
[[groups]]
id = "{{ .Id }}"
instances = { count = 1 }
[groups.build_config.build_args]
BINARY_NAME = '{{ .BinaryName }}'
{{ end }}
{{ with .master }}
[[groups]]
id = "master"
instances = { count = 1 }
[groups.build_config.build_args]
BINARY_NAME = '{{ .BinaryName }}'
GIT_REF = '{{ $.Env.GitTarget }}'
{{ end }}
{{ if $.Env.GitReference }}
{{ with .custom }}
[[groups]]
id = "custom"
instances = { count = 1 }
[groups.build_config.build_args]
BINARY_NAME = '{{ .BinaryName }}'
GIT_TARGET = '{{ $.Env.GitTarget }}'
GIT_REF = '{{ $.Env.GitTarget }}'
{{ end }}
{{ end }}
{{ end }}