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 native Zephyr samples | |
| on: [push, pull_request] | |
| jobs: | |
| build: | |
| name: Build native Zephyr samples | |
| runs-on: ubuntu-latest | |
| container: zephyrprojectrtos/ci-base:latest | |
| env: | |
| CMAKE_PREFIX_PATH: /opt/toolchains | |
| CCACHE_IGNOREOPTIONS: -specs=* | |
| SUBPATH: zephyrproject/modules/lib/ArduinoCore-zephyr | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| path: ${{ env.SUBPATH }} | |
| - name: List needed HALs | |
| run: | | |
| NEEDED_HALS=$(grep 'build.zephyr_hals=' $SUBPATH/boards.txt | cut -d '=' -f 2 | xargs -n 1 echo | sort -u) | |
| HAL_FILTER="-hal_.*" | |
| for hal in $NEEDED_HALS; do | |
| HAL_FILTER="$HAL_FILTER,+$hal" | |
| done | |
| echo "HAL_FILTER=$HAL_FILTER" >> $GITHUB_ENV | |
| - name: Setup Zephyr project | |
| uses: zephyrproject-rtos/action-zephyr-setup@v1 | |
| with: | |
| toolchains: arm-zephyr-eabi | |
| sdk-version: 0.16.8 | |
| app-path: zephyrproject | |
| manifest-file-name: ${{ env.SUBPATH }}/west.yml | |
| west-project-filter: ${{ env.HAL_FILTER }} | |
| - name: Add manifest path as module | |
| run: | | |
| echo EXTRA_ZEPHYR_MODULES="$(pwd)/${{ env.SUBPATH }}" >> $GITHUB_ENV | |
| - name: Build fade | |
| working-directory: zephyrproject | |
| run: | | |
| west build -p -b arduino_nano_33_ble//sense modules/lib/ArduinoCore-zephyr/samples/fade | |
| - name: Build i2cdemo | |
| working-directory: zephyrproject | |
| run: | | |
| west build -p -b ek_ra8d1 modules/lib/ArduinoCore-zephyr/samples/i2cdemo | |
| - name: Build adc | |
| working-directory: zephyrproject | |
| run: | | |
| west build -p -b arduino_nano_33_ble/nrf52840/sense modules/lib/ArduinoCore-zephyr/samples/analog_input |