diff --git a/ping/_compositions/rust-cross-versions.toml b/ping/_compositions/rust-cross-versions.toml index bc0829a..4f18e47 100644 --- a/ping/_compositions/rust-cross-versions.toml +++ b/ping/_compositions/rust-cross-versions.toml @@ -25,7 +25,7 @@ [groups.build_config.build_args] BINARY_NAME = '{{ .BinaryName }}' - GIT_REF = '{{ $.Env.GitReference }}' + GIT_REF = "master" {{ end }} {{ if $.Env.GitReference }} diff --git a/ping/_compositions/rust.toml b/ping/_compositions/rust.toml index 0dc0c03..e18cce1 100644 --- a/ping/_compositions/rust.toml +++ b/ping/_compositions/rust.toml @@ -17,12 +17,12 @@ Id = "v0.47.0" BinaryName = 'testplan_0470' [[groups]] -Id = "v0.46.0" -BinaryName = 'testplan_0460' +Id = "v0.46.1" +BinaryName = 'testplan_0461' [[groups]] Id = "v0.45.1" -BinaryName = 'testplan_0450' +BinaryName = 'testplan_0451' [[groups]] Id = "v0.44.0" diff --git a/ping/rust/Cargo.toml b/ping/rust/Cargo.toml index 4a98506..e28cf33 100644 --- a/ping/rust/Cargo.toml +++ b/ping/rust/Cargo.toml @@ -21,8 +21,8 @@ tokio-util = { version = "0.7", default-features = false, features = ["compat"] futures = "0.3.1" libp2pv0440 = { package = "libp2p", version = "0.44.0", default_features = false, features = ["websocket", "mplex", "yamux", "tcp-async-io", "ping", "noise", "dns-async-std"] } -libp2pv0450 = { package = "libp2p", version = "0.45.0", default_features = false, features = ["websocket", "mplex", "yamux", "tcp-async-io", "ping", "noise", "dns-async-std"] } -libp2pv0460 = { package = "libp2p", version = "0.46.0", default_features = false, features = ["websocket", "mplex", "yamux", "tcp-async-io", "ping", "noise", "dns-async-std"] } +libp2pv0451 = { package = "libp2p", version = "0.45.1", default_features = false, features = ["websocket", "mplex", "yamux", "tcp-async-io", "ping", "noise", "dns-async-std"] } +libp2pv0461 = { package = "libp2p", version = "0.46.1", default_features = false, features = ["websocket", "mplex", "yamux", "tcp-async-io", "ping", "noise", "dns-async-std"] } libp2pv0470 = { package = "libp2p", version = "0.47.0", default_features = false, features = ["websocket", "mplex", "yamux", "tcp-async-io", "ping", "noise", "dns-async-std"] } libp2pv0480 = { package = "libp2p", version = "0.48.0", default_features = false, features = ["websocket", "mplex", "yamux", "tcp-async-io", "ping", "noise", "dns-async-std", "rsa"] } libp2pv0490 = { package = "libp2p", version = "0.49.0", features = ["websocket", "mplex", "yamux", "tcp", "async-std", "ping", "noise", "dns", "rsa"] } diff --git a/ping/rust/Dockerfile b/ping/rust/Dockerfile index b9455b2..9406109 100644 --- a/ping/rust/Dockerfile +++ b/ping/rust/Dockerfile @@ -4,14 +4,22 @@ WORKDIR /usr/src/testplan RUN apt-get update && apt-get install -y cmake protobuf-compiler ARG PLAN_PATH="./" -COPY ./plan/${PLAN_PATH} ./plan + +RUN mkdir -p ./plan/src +COPY ./plan/${PLAN_PATH}/src/main.rs ./plan/src/main.rs +COPY ./plan/${PLAN_PATH}/Cargo.toml ./plan/Cargo.toml +COPY ./plan/${PLAN_PATH}/Cargo.lock ./plan/Cargo.lock + RUN cd ./plan/ && cargo build # Initial build acts as a cache. ARG GIT_TARGET="" RUN if [ ! -z "${GIT_TARGET}" ]; then sed -i "s,^git.*,git = \"https://${GIT_TARGET}\"," ./plan/Cargo.toml; fi ARG GIT_REF="" -RUN if [ ! -z "${GIT_REF}" ]; then sed -i "s/^rev.*/rev = \"${GIT_REF}\"/" ./plan/Cargo.toml; fi +RUN if [ "master" = "${GIT_REF}" ]; then sed -i "s/^rev.*/branch= \"master\"/" ./plan/Cargo.toml; elif [ ! -z "${GIT_REF}" ]; then sed -i "s/^rev.*/rev = \"${GIT_REF}\"/" ./plan/Cargo.toml; fi + +COPY ./plan/${PLAN_PATH}/src/lib.rs ./plan/src/lib.rs +COPY ./plan/${PLAN_PATH}/src/bin/ ./plan/src/bin/ # Build the requested binary: Cargo will update lockfile on changed manifest (i.e. if one of the above `sed`s patched it). ARG BINARY_NAME diff --git a/ping/rust/src/bin/testplan_0450.rs b/ping/rust/src/bin/testplan_0451.rs similarity index 97% rename from ping/rust/src/bin/testplan_0450.rs rename to ping/rust/src/bin/testplan_0451.rs index 5f51690..5a35113 100644 --- a/ping/rust/src/bin/testplan_0450.rs +++ b/ping/rust/src/bin/testplan_0451.rs @@ -1,8 +1,8 @@ use anyhow::Result; use async_trait::async_trait; use futures::StreamExt; -use libp2pv0450::swarm::SwarmEvent; -use libp2pv0450::*; +use libp2pv0451::swarm::SwarmEvent; +use libp2pv0451::*; use std::collections::HashSet; use std::time::Duration; use testplan::{run_ping, PingSwarm}; diff --git a/ping/rust/src/bin/testplan_0460.rs b/ping/rust/src/bin/testplan_0461.rs similarity index 97% rename from ping/rust/src/bin/testplan_0460.rs rename to ping/rust/src/bin/testplan_0461.rs index 6d5f228..9caa590 100644 --- a/ping/rust/src/bin/testplan_0460.rs +++ b/ping/rust/src/bin/testplan_0461.rs @@ -1,8 +1,8 @@ use anyhow::Result; use async_trait::async_trait; use futures::StreamExt; -use libp2pv0460::swarm::SwarmEvent; -use libp2pv0460::*; +use libp2pv0461::swarm::SwarmEvent; +use libp2pv0461::*; use std::collections::HashSet; use std::time::Duration; use testplan::{run_ping, PingSwarm}; diff --git a/ping/rust/src/main.rs b/ping/rust/src/main.rs new file mode 100644 index 0000000..8f55947 --- /dev/null +++ b/ping/rust/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("This is a dummy main file that is used for creating a cache layer inside the docker container.") +}