Skip to content

Commit caf9da4

Browse files
fix(interop-tests): don't hardcode x86_64 for native
Remove hard-coded `x86_64` for the native interop tests. The tests couldn't run on arm64 architecture. Pull-Request: #4862.
1 parent 41da782 commit caf9da4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

interop-tests/Dockerfile.native

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# syntax=docker/dockerfile:1.5-labs
2-
FROM rust:1.73.0 as chef
3-
RUN wget -q -O- https://github.com/LukeMathWalker/cargo-chef/releases/download/v0.1.62/cargo-chef-x86_64-unknown-linux-gnu.tar.gz | tar -zx -C /usr/local/bin
2+
FROM lukemathwalker/cargo-chef:0.1.62-rust-1.73.0 as chef
43
WORKDIR /app
54

65
FROM chef AS planner
@@ -10,12 +9,13 @@ RUN cargo chef prepare --recipe-path recipe.json
109
FROM chef AS builder
1110
COPY --from=planner /app/recipe.json recipe.json
1211
# Build dependencies - this is the caching Docker layer!
13-
RUN RUSTFLAGS='-C target-feature=+crt-static' cargo chef cook --release --package interop-tests --target x86_64-unknown-linux-gnu --bin native_ping --recipe-path recipe.json
12+
RUN RUSTFLAGS='-C target-feature=+crt-static' cargo chef cook --release --package interop-tests --target $(rustc -vV | grep host | awk '{print $2}') --bin native_ping --recipe-path recipe.json
1413
# Build application
1514
COPY . .
16-
RUN RUSTFLAGS='-C target-feature=+crt-static' cargo build --release --package interop-tests --target x86_64-unknown-linux-gnu --bin native_ping
15+
RUN RUSTFLAGS='-C target-feature=+crt-static' cargo build --release --package interop-tests --target $(rustc -vV | grep host | awk '{print $2}') --bin native_ping
16+
RUN cp /app/target/$(rustc -vV | grep host | awk '{print $2}')/release/native_ping /usr/local/bin/testplan
1717

1818
FROM scratch
19-
COPY --from=builder /app/target/x86_64-unknown-linux-gnu/release/native_ping /usr/local/bin/testplan
19+
COPY --from=builder /usr/local/bin/testplan /usr/local/bin/testplan
2020
ENV RUST_BACKTRACE=1
2121
ENTRYPOINT ["testplan"]

0 commit comments

Comments
 (0)