-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
workflow: Create basic build of rust samples
Build the rust code samples to make sure that Rust support is working on all supported targets. This adds toolchain support and rust target support for the supported Cortex-M, and RISC-V targets. The workflow runs on every pull request and on every push. Signed-off-by: David Brown <[email protected]>
- Loading branch information
Showing
2 changed files
with
77 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# Copyright (c) 2024 Linaro LTD | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
name: Build | ||
|
||
# Build the rust samples and tests using the current Zephyr. | ||
|
||
on: | ||
push: | ||
pull_request: | ||
schedule: | ||
- cron: "0 0 * * *" | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-22.04] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
path: zephyr-rust-lang | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.11 | ||
|
||
- name: Setup Zephyr project | ||
uses: zephyrproject-rtos/action-zephyr-setup@v1 | ||
with: | ||
app-path: zephyr-rust-lang | ||
manifest-file-name: ci-manifest.yml | ||
toolchains: arm-zephyr-eabi:riscv64-zephyr-elf | ||
|
||
- name: Install Rust Targets | ||
shell: bash | ||
run: | | ||
rustup target add riscv32i-unknown-none-elf | ||
rustup target add riscv64imac-unknown-none-elf | ||
rustup target add thumbv6m-none-eabi | ||
rustup target add thumbv7em-none-eabi | ||
rustup target add thumbv7m-none-eabi | ||
rustup target add thumbv8m.main-none-eabi | ||
- name: Build firmware | ||
working-directory: zephyr-rust-lang | ||
shell: bash | ||
run: | | ||
cargo --version | ||
west twister -T samples -v --inline-logs --integration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Copyright (c) 2021 Nordic Semiconductor ASA | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
# Although this normally lives as a module, the local CI uses action-zephyr-setup which wants the | ||
# application to have a manifest. | ||
|
||
manifest: | ||
remotes: | ||
- name: zephyrproject-rtos | ||
url-base: https://github.com/zephyrproject-rtos | ||
|
||
projects: | ||
- name: zephyr | ||
remote: zephyrproject-rtos | ||
revision: main | ||
import: | ||
# By using name-allowlist we can clone only the modules that are | ||
# strictly needed by the application. | ||
name-allowlist: | ||
- cmsis # required by the ARM port | ||
- hal_nordic # required by the custom_plank board (Nordic based) | ||
- hal_stm32 # required by the nucleo_f302r8 board (STM32 based) |