From a0ec500c5983ed7b2683a594f673adc152932f07 Mon Sep 17 00:00:00 2001 From: Victor Fusco <1221933+vfusco@users.noreply.github.com> Date: Sat, 2 Dec 2023 10:52:39 -0300 Subject: [PATCH] feat: build rust binaries in parallel --- Dockerfile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index ee43e254..9c08e916 100644 --- a/Dockerfile +++ b/Dockerfile @@ -65,8 +65,11 @@ RUN mkdir -p $HOME/.cargo && \ echo "[net]" >> $HOME/.cargo/config && \ echo "git-fetch-with-cli = true" >> $HOME/.cargo/config +FROM rust-builder as echo-dapp-builder RUN cd ${BUILD_BASE}/tools/linux/rollup/http/echo-dapp && \ cargo build --release + +FROM rust-builder as http-server-builder RUN cd ${BUILD_BASE}/tools/linux/rollup/http/rollup-http-server && \ cargo build --release @@ -85,9 +88,10 @@ RUN mkdir -p ${STAGING_DEBIAN} ${STAGING_BIN} && \ cp ${BUILD_BASE}/tools/linux/rollup/rollup/rollup ${STAGING_BIN} && \ cp ${BUILD_BASE}/tools/linux/utils/* ${STAGING_BIN} -COPY --from=rust-builder ${BUILD_BASE}/tools/linux/rollup/http/echo-dapp/target/release/echo-dapp ${STAGING_BIN} -COPY --from=rust-builder ${BUILD_BASE}/tools/linux/rollup/http/rollup-http-server/target/release/rollup-http-server ${STAGING_BIN} COPY skel/ ${STAGING_BASE}/ COPY control ${STAGING_DEBIAN}/control +COPY --from=echo-dapp-builder ${BUILD_BASE}/tools/linux/rollup/http/echo-dapp/target/release/echo-dapp ${STAGING_BIN} +COPY --from=http-server-builder ${BUILD_BASE}/tools/linux/rollup/http/rollup-http-server/target/release/rollup-http-server ${STAGING_BIN} + RUN dpkg-deb -Zxz --root-owner-group --build ${STAGING_BASE} ${BUILD_BASE}/${TOOLS_DEB}