diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..d096d0ad --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,59 @@ +# 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: + branches: + - main + pull_request: + branches: + - main + 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 diff --git a/ci-manifest.yml b/ci-manifest.yml new file mode 100644 index 00000000..20f8a040 --- /dev/null +++ b/ci-manifest.yml @@ -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)