Merge remote-tracking branch 'origin/master' into nim

This commit is contained in:
Tanguy 2022-11-30 16:03:14 +01:00
commit 31cf4bc5c2
No known key found for this signature in database
GPG Key ID: 7DD8EC6B6CE6C45E
7 changed files with 23 additions and 12 deletions

View File

@ -25,7 +25,7 @@
[groups.build_config.build_args]
BINARY_NAME = '{{ .BinaryName }}'
GIT_REF = '{{ $.Env.GitReference }}'
GIT_REF = "master"
{{ end }}
{{ if $.Env.GitReference }}

View File

@ -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"

View File

@ -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"] }

View File

@ -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

View File

@ -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};

View File

@ -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};

3
ping/rust/src/main.rs Normal file
View File

@ -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.")
}