tools/ci: Add Rust Target for QEMU RISC-V 64-bit

This PR updates the Docker Image for NuttX CI, so that it builds Rust Apps correctly for QEMU RISC-V 64-bit. We add the Rust Target for `riscv64gc-unknown-none-elf` to the Docker Image.

In the next PR, we will call the Updated Docker Image to [compile the Rust App `leds_rust`](https://github.com/apache/nuttx/pull/12852), at every run of NuttX CI. This will validate whether Rust Apps are built correctly for QEMU RISC-V 64-bit.

Modified Files:

`tools/ci/docker/linux/Dockerfile`: Add Rust Target `riscv64gc-unknown-none-elf` for Docker CI

`tools/ci/platforms/ubuntu.sh`: Same as above, but for Ubuntu CI

`tools/ci/platforms/msys2.sh`: Same as above, but for MSYS2 CI
This commit is contained in:
Lup Yuen Lee 2024-08-07 13:30:27 +08:00 committed by Xiang Xiao
parent d759611e90
commit 52583fc17e
3 changed files with 4 additions and 1 deletions

View File

@ -66,7 +66,8 @@ ENV RUSTUP_HOME=$RUST_HOME/rustup
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
&& $CARGO_HOME/bin/rustup target add thumbv7m-none-eabi \
&& $CARGO_HOME/bin/rustup target add riscv64gc-unknown-none-elf
RUN mkdir /tools/gn -p \
&& cd /tools/gn \

View File

@ -181,6 +181,7 @@ rust() {
# Install targets supported from NuttX
"$CARGO_HOME"/bin/rustup target add thumbv6m-none-eabi
"$CARGO_HOME"/bin/rustup target add thumbv7m-none-eabi
"$CARGO_HOME"/bin/rustup target add riscv64gc-unknown-none-elf
rm rustup-init.exe
fi
command rustc --version

View File

@ -230,6 +230,7 @@ rust() {
# Install targets supported from NuttX
rustup target add thumbv6m-none-eabi
rustup target add thumbv7m-none-eabi
rustup target add riscv64gc-unknown-none-elf
fi
command rustc --version