Marco Munizaga c35de22070
Add fast multidimensional interop tests (#97)
* Add fast multidimensional interop tests

* Remove generated files

* Remove debug code around itnerfaces

* Revert changes to setup testground

* multidim-interop: update rust v050 test

for multidim-interop with redis

* Add depends on and enable rust version for testing

* Cleanup Rust test

* Have listener print multiaddr in go v024 test

* Remove EXPOSE in dockerfile

* Update multidim-interop/go/v0.24/main.go

Co-authored-by: João Oliveira <hello@jxs.pt>

* Update multidim-interop/go/v0.22/main.go

Co-authored-by: João Oliveira <hello@jxs.pt>

* Update multidim-interop/go/v0.23/main.go

Co-authored-by: João Oliveira <hello@jxs.pt>

* Go nits

* Cleanup Rust makefile

* add working ping test (js) or multidim-interop (#98)

* add working ping test (js) or multidim-interop

* Add JS-libp2p to interop tests

* ping libp2p-js (wo): resolve PR comments

* Add yamux js-libp2p test

Co-authored-by: Marco Munizaga <git@marcopolo.io>

* Fix Go err

* Ignore errors when shutting down

* Fix err

* Rename workflow

* Remove rust v0.49

* Bump up timeouts

Co-authored-by: João Oliveira <hello@jxs.pt>
Co-authored-by: Glen De Cauwsemaecker <contact@glendc.com>
2023-01-10 14:26:27 -08:00

33 lines
1.2 KiB
Docker

FROM rust:1.62-bullseye as builder
WORKDIR /usr/src/testplan
# TODO fix this, it breaks reproducibility
RUN apt-get update && apt-get install -y cmake protobuf-compiler
RUN mkdir -p ./plan/src
COPY ./src/main.rs ./plan/src/main.rs
COPY ./Cargo.toml ./plan/Cargo.toml
COPY ./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 [ "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 ./src/lib.rs ./plan/src/lib.rs
COPY ./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
RUN cd ./plan/ \
&& cargo build --bin=${BINARY_NAME} \
&& mv /usr/src/testplan/plan/target/debug/${BINARY_NAME} /usr/local/bin/testplan
FROM debian:bullseye-slim
COPY --from=builder /usr/local/bin/testplan /usr/local/bin/testplan
ENV RUST_BACKTRACE=1
ENTRYPOINT ["testplan"]