Rationale: Too much effort to maintain two different tool chains. PlatformIO does not consider the west.yml files and thus, does not support custom Zephyr modules. However, they are needed to include ThingSet as a module. In addition to that, PlatformIO versions always lag behind official Zephyr releases and we want to avoid being dependent on PlatformIO.
51 lines
1.5 KiB
YAML
51 lines
1.5 KiB
YAML
name: Build with Zephyr toolchain
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
container: zephyrprojectrtos/ci:v0.18.4
|
|
# Zephyr v2.7 requires newest SDK, which is not auto-selected by v0.18.4 docker image. Below
|
|
# env setting can be removed again after upgrade of the docker image.
|
|
env:
|
|
ZEPHYR_SDK_INSTALL_DIR: "/opt/toolchains/zephyr-sdk-0.13.1"
|
|
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
|
|
cd zephyr
|
|
west init -l .
|
|
west update
|
|
pip3 install -r rtos/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 zephyr
|
|
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
|