ci: get rust copied to final image.

This commit is contained in:
Piet
2022-02-21 21:59:04 +01:00
committed by Brennan Ashton
parent 419bc2fd04
commit c5bdbc810d
2 changed files with 14 additions and 10 deletions
+12 -8
View File
@@ -59,6 +59,13 @@ RUN mkdir bloaty -p \
&& cmake -DCMAKE_SYSTEM_PREFIX_PATH=/tools/bloaty \
&& make install
# Install Rust and targets supported from NuttX
ENV CARGO_HOME=/tools/rust
RUN mkdir -p $CARGO_HOME \
&& curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y \
&& $CARGO_HOME/bin/rustup target add thumbv6m-none-eabi \
&& $CARGO_HOME/bin/rustup target add thumbv7m-none-eabi
CMD [ "/bin/bash" ]
###############################################################################
@@ -191,14 +198,6 @@ RUN cd renesas-tools/source/newlib && \
RUN cd /tools/renesas-tools/build/gcc && \
make && make install
# Install Rust and targets supported from NuttX
ENV CARGO_HOME=/tools/rust
RUN mkdir -p $CARGO_HOME && \
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && \
$CARGO_HOME/bin/rustup target add thumbv6m-none-eabi && \
$CARGO_HOME/bin/rustup target add thumbv7m-none-eabi
ENV PATH="$CARGO_HOME/bin:$PATH"
###############################################################################
# Final Docker image used for running CI system. This includes all toolchains
# supported by the CI system.
@@ -262,6 +261,11 @@ ENV PATH="/tools/kconfig-frontends/bin:$PATH"
COPY --from=nuttx-tools /tools/bloaty/ bloaty/
ENV PATH="/tools/bloaty/bin:$PATH"
# Pull in the Rust toolchain including supported targets
COPY --from=nuttx-tools /tools/rust/ /tools/rust/
ENV CARGO_HOME=/tools/rust
ENV PATH="/tools/rust/bin:$PATH"
# ARM toolchain
COPY --from=nuttx-toolchain-arm /tools/gcc-arm-none-eabi/ gcc-arm-none-eabi/
ENV PATH="/tools/gcc-arm-none-eabi/bin:$PATH"