-
Notifications
You must be signed in to change notification settings - Fork 939
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(interop-tests): build test binary inside container (backport #3441…
…) (#3444) Co-authored-by: Marco Munizaga <git@marcopolo.io>
- Loading branch information
1 parent
36c0876
commit deda1ac
Showing
6 changed files
with
31 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,20 @@ | ||
FROM ubuntu:22.04 | ||
ARG TEST_BINARY | ||
COPY $TEST_BINARY /usr/local/bin/testplan | ||
LABEL org.opencontainers.image.source https://github.com/libp2p/rust-libp2p | ||
# syntax=docker/dockerfile:1.5-labs | ||
FROM rust:1.67.0 | ||
|
||
# Setup protoc. TODO this breaks reproducibility and uses an old version of protoc. | ||
# In the future protobuf generated files will be checked in, so we can remove this | ||
WORKDIR /protoc-setup | ||
RUN apt-get update && apt-get install -y cmake protobuf-compiler | ||
|
||
# Run with access to the target cache to speed up builds | ||
WORKDIR /workspace | ||
ADD . . | ||
RUN --mount=type=cache,target=./target \ | ||
--mount=type=cache,target=/usr/local/cargo/registry \ | ||
cargo build --package interop-tests | ||
|
||
RUN --mount=type=cache,target=./target \ | ||
mv ./target/debug/ping /usr/local/bin/testplan | ||
|
||
ENV RUST_BACKTRACE=1 | ||
ENTRYPOINT ["testplan"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters