Skip to content

Commit d3bd2a3

Browse files
Add Rust build CI attach config
Add a rust attach config to the stm32f407-rt-spark BSP so GitHub CI enables the Rust core and component-log example on a Cortex-M4 target, exercising the Rust build scripts under compile supervision. Install the Rust toolchain (rustup + thumbv7em-none-eabihf) on the sourcery-arm legs of the BSP static build workflow so the attached Rust configuration is actually compiled instead of skipped. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 8f32c4e commit d3bd2a3

2 files changed

Lines changed: 19 additions & 0 deletions

File tree

.github/workflows/bsp_buildings.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,16 @@ jobs:
280280
/opt/i386-unknown-elf_for_x86_64-pc-linux-gnu/bin/i386-unknown-elf-gcc --version
281281
echo "RTT_EXEC_PATH=/opt/i386-unknown-elf_for_x86_64-pc-linux-gnu/bin" >> $GITHUB_ENV
282282
283+
- name: Install Rust ToolChains
284+
if: ${{ matrix.legs.RTT_TOOL_CHAIN == 'sourcery-arm' && success() }}
285+
shell: bash
286+
run: |
287+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable --profile minimal
288+
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
289+
"$HOME/.cargo/bin/rustup" target add thumbv7em-none-eabihf
290+
"$HOME/.cargo/bin/rustc" --version
291+
"$HOME/.cargo/bin/cargo" --version
292+
283293
- name: Bsp Scons Compile
284294
if: ${{ success() }}
285295
shell: bash

bsp/stm32/stm32f407-rt-spark/.ci/attachconfig/ci.attachconfig.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,3 +230,12 @@ component.cherryusb_cdc:
230230
- CONFIG_RT_CHERRYUSB_DEVICE_DWC2_ST=y
231231
- CONFIG_RT_CHERRYUSB_DEVICE_CDC_ACM=y
232232
- CONFIG_RT_CHERRYUSB_DEVICE_TEMPLATE_CDC_ACM=y
233+
# ------ rust CI ------
234+
rust:
235+
<<: *scons
236+
kconfig:
237+
- CONFIG_RT_USING_RUST=y
238+
- CONFIG_RT_RUST_CORE=y
239+
- CONFIG_RT_USING_RUST_EXAMPLES=y
240+
- CONFIG_RT_RUST_BUILD_COMPONENTS=y
241+
- CONFIG_RUST_LOG_COMPONENT=y

0 commit comments

Comments
 (0)