This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 52583fc17e tools/ci: Add Rust Target for QEMU RISC-V 64-bit
52583fc17e is described below
commit 52583fc17eed2d206b95b3ef93e26bd41b28ad67
Author: Lup Yuen Lee <[email protected]>
AuthorDate: Wed Aug 7 13:30:27 2024 +0800
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
---
tools/ci/docker/linux/Dockerfile | 3 ++-
tools/ci/platforms/msys2.sh | 1 +
tools/ci/platforms/ubuntu.sh | 1 +
3 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/tools/ci/docker/linux/Dockerfile b/tools/ci/docker/linux/Dockerfile
index 78b43ca5c0..845f9bc18b 100644
--- a/tools/ci/docker/linux/Dockerfile
+++ b/tools/ci/docker/linux/Dockerfile
@@ -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 \
diff --git a/tools/ci/platforms/msys2.sh b/tools/ci/platforms/msys2.sh
index f5230e778c..687b81cff4 100755
--- a/tools/ci/platforms/msys2.sh
+++ b/tools/ci/platforms/msys2.sh
@@ -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
diff --git a/tools/ci/platforms/ubuntu.sh b/tools/ci/platforms/ubuntu.sh
index e545b4f5ab..fdfaaa9bf2 100755
--- a/tools/ci/platforms/ubuntu.sh
+++ b/tools/ci/platforms/ubuntu.sh
@@ -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