rust: Add a Rust compatible API implementation. #419
Workflow file for this run
This file contains hidden or 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
| name: Build | |
| on: [push, pull_request] | |
| jobs: | |
| build: | |
| name: Build Arduino-API Zephyr samples | |
| runs-on: ubuntu-latest | |
| container: zephyrprojectrtos/ci-base:latest | |
| env: | |
| CMAKE_PREFIX_PATH: /opt/toolchains | |
| CCACHE_IGNOREOPTIONS: -specs=* | |
| MODULE_PATH: ../modules/lib/Arduino-Zephyr-API | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| path: subfolder | |
| - name: Fix module path, list needed HALs | |
| run: | | |
| mkdir -p $(dirname $MODULE_PATH) && mv subfolder $MODULE_PATH | |
| - name: Setup Zephyr project | |
| uses: zephyrproject-rtos/action-zephyr-setup@v1 | |
| with: | |
| toolchains: arm-zephyr-eabi | |
| manifest-file-name: ${{ env.MODULE_PATH }}/west.yml | |
| enable-ccache: false | |
| - name: Add manifest path as module | |
| run: | | |
| echo EXTRA_ZEPHYR_MODULES="$(pwd)/$MODULE_PATH" >> $GITHUB_ENV | |
| - name: Initialize | |
| run: | | |
| git clone https://github.com/arduino/ArduinoCore-API.git $MODULE_PATH/../ArduinoCore-API | |
| west blobs fetch arduinocore-zephyr | |
| apt install rustup | |
| rustup default stable | |
| rustup target add thumbv6m-none-eabi | |
| rustup target add thumbv7em-none-eabihf | |
| rustup target add thumbv7em-none-eabi | |
| rustup target add thumbv7m-none-eabi | |
| - name: Build fade | |
| run: | | |
| west build -p -b arduino_nano_33_ble/nrf52840/sense $MODULE_PATH/samples/fade | |
| - name: Build i2cdemo | |
| run: | | |
| west build -p -b arduino_nano_33_ble/nrf52840/sense $MODULE_PATH/samples/i2cdemo | |
| - name: Build adc | |
| run: | | |
| west build -p -b beagleconnect_freedom/cc1352p7 $MODULE_PATH/samples/analog_input | |
| - name: Archive firmware | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: firmware | |
| path: Arduino-Zephyr-API/build/zephyr/zephyr.* |