Skip to content

Commit

Permalink
feat: build rust binaries in parallel
Browse files Browse the repository at this point in the history
  • Loading branch information
vfusco committed Dec 2, 2023
1 parent 5d5a220 commit eefa77b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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}

0 comments on commit eefa77b

Please sign in to comment.