Skip to content

Commit

Permalink
tools/ci: Add Rust Target for QEMU RISC-V 64-bit
Browse files Browse the repository at this point in the history
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`](apache#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
  • Loading branch information
lupyuen committed Aug 7, 2024
1 parent 788f91c commit 01ca9e1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/ci/docker/linux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
1 change: 1 addition & 0 deletions tools/ci/platforms/msys2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions tools/ci/platforms/ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 01ca9e1

Please sign in to comment.