https://docs.zephyrproject.org/latest/guides/west/workspaces.html Previously, west manifest and CMake entry point were in zephyr subfolder as required for PlatformIO. As PlatformIO support was dropped, we can follow the default Zephyr folder structure more closely. The application is built and flashed from app subfolder, where as unit tests are run from tests subfolder.
48 lines
1.3 KiB
YAML
48 lines
1.3 KiB
YAML
name: Build with Zephyr toolchain
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
container: zephyrprojectrtos/ci:v0.21.0
|
|
env:
|
|
CMAKE_PREFIX_PATH: /opt/toolchains
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
with:
|
|
path: charge-controller-firmware
|
|
submodules: recursive
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v1
|
|
|
|
- name: Initialize
|
|
working-directory: charge-controller-firmware
|
|
run: |
|
|
pip3 install -U west
|
|
west init -l app
|
|
west update
|
|
pip3 install -r zephyr/scripts/requirements-base.txt
|
|
|
|
- name: Trailing whitespace check
|
|
working-directory: charge-controller-firmware
|
|
run: |
|
|
git diff --check `git rev-list --max-parents=0 HEAD`..HEAD
|
|
|
|
- name: Build firmware
|
|
working-directory: charge-controller-firmware
|
|
run: |
|
|
cd app
|
|
west build -b mppt_2420_hc@0.2 -p
|
|
west build -b mppt_2420_lc -p
|
|
west build -b mppt_1210_hus@0.7 -p
|
|
west build -b pwm_2420_lus@0.3 -p
|
|
|
|
- name: Run unit-tests
|
|
working-directory: charge-controller-firmware
|
|
run: |
|
|
cd tests
|
|
west build -b native_posix -t run
|