M Cargo.toml => Cargo.toml +5 -3
@@ 61,6 61,8 @@ futures-delay-queue = "0.5" # for benchmarks
proptest = "1.0" # for property tests
tempfile = "3" # for benchmarks
-[[bench]]
-name = "server"
-harness = false
+# 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
M Dockerfile => Dockerfile +4 -1
@@ 15,7 15,10 @@ RUN apt-get update \
# 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
-RUN cd /originz && cargo build-deps --release
+# 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