samples: get the variant name from the Zephyr build system #131
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: | |
runs-on: ubuntu-latest | |
container: zephyrprojectrtos/ci:latest | |
env: | |
CMAKE_PREFIX_PATH: /opt/toolchains | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
path: Arduino-Zephyr-API | |
- name: Initialize | |
run: | | |
west init -l Arduino-Zephyr-API/ | |
west update | |
git clone https://github.com/arduino/ArduinoCore-API.git ArduinoCore-API | |
cp -r ArduinoCore-API/api Arduino-Zephyr-API/cores/arduino/ | |
mkdir modules/lib | |
cp -rfp Arduino-Zephyr-API modules/lib/ | |
- name: Build fade | |
working-directory: Arduino-Zephyr-API | |
run: | | |
west build -p -b arduino_nano_33_ble/nrf52840/sense samples/fade | |
- name: Build i2cdemo | |
working-directory: Arduino-Zephyr-API | |
run: | | |
west build -p -b arduino_nano_33_ble/nrf52840/sense samples/i2cdemo | |
- name: Build adc | |
working-directory: Arduino-Zephyr-API | |
run: | | |
west build -p -b beagleconnect_freedom/cc1352p7 samples/analog_input | |
- name: Archive firmware | |
uses: actions/upload-artifact@v4 | |
with: | |
name: firmware | |
path: modules/lib/Arduino-Zephyr-API/build/zephyr/zephyr.* |