M Cargo.toml => Cargo.toml
@@ 61,8 61,6 @@ futures-delay-queue = "0.5" # for benchmarks
proptest = "1.0" # for property tests
tempfile = "3" # for benchmarks
# Hack to fix 'cargo build-deps' in Dockerfile:
# Hide this bench section entirely, for whatever reason build-deps wants to see server.rs.
[[bench]] # build-deps: skip
name = "server" # build-deps: skip
harness = false # build-deps: skip
name = "server"
harness = false
M Dockerfile => Dockerfile
@@ 12,14 12,6 @@ RUN apt-get update \
&& cd / \
&& cargo new --bin originz
# Build dependencies on their own as separate step to improve cached builds
# (only copy Cargo.* to avoid source changes breaking this cache)
COPY Cargo.toml Cargo.lock /originz
# Hack: fix for "can't find `server` bench at `benches/server.rs` [...]"
RUN cd /originz \
&& sed -i 's/.*build-deps: skip.*//g' Cargo.toml \
&& cargo build-deps --release
COPY . /originz
RUN cd /originz && cargo build --release