From 9a7a07eb6874a2577de080aaadcd6ab53b2c86f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20J=C3=A4ger?= Date: Sun, 1 Aug 2021 16:10:25 +0200 Subject: [PATCH] CI: Use Zephyr toolchain for build check Removing PlatformIO dependency as Zephyr v2.6 is not properly and PlatformIO updates always take quite a long time after official Zephyr releases. Unit tests and static code check still have to be ported to Zephyr. --- .github/workflows/platformio.yml | 28 ------------------------- .github/workflows/zephyr.yml | 35 ++++++++++++++++++++++++++++++++ platformio.ini | 5 +++-- 3 files changed, 38 insertions(+), 30 deletions(-) delete mode 100644 .github/workflows/platformio.yml create mode 100644 .github/workflows/zephyr.yml diff --git a/.github/workflows/platformio.yml b/.github/workflows/platformio.yml deleted file mode 100644 index c064d3b..0000000 --- a/.github/workflows/platformio.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: PlatformIO CI - -on: [push] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - with: - submodules: recursive - - name: Set up Python - uses: actions/setup-python@v1 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install wheel - pip install -U platformio - platformio platform install native - platformio update - - name: Run trailing white space check with git - run: | - git diff --check `git rev-list HEAD | tail -n 1`.. - - name: Run PlatformIO build tests - run: | - bash scripts/check.sh diff --git a/.github/workflows/zephyr.yml b/.github/workflows/zephyr.yml new file mode 100644 index 0000000..08b8048 --- /dev/null +++ b/.github/workflows/zephyr.yml @@ -0,0 +1,35 @@ +name: Build with Zephyr toolchain + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + container: zephyrprojectrtos/ci:latest + 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: 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 diff --git a/platformio.ini b/platformio.ini index 236c7a8..e808b54 100644 --- a/platformio.ini +++ b/platformio.ini @@ -21,11 +21,12 @@ extra_configs = framework = zephyr #platform = https://github.com/platformio/platform-ststm32.git -platform = ststm32@~14.0.0 +platform = ststm32@~14.1.0 # Use customized Zephyr branch from Libre Solar repository platform_packages = - framework-zephyr@https://github.com/LibreSolar/zephyr#v2.6-branch + toolchain-gccarmnoneeabi@1.90301.200702 +# framework-zephyr@https://github.com/LibreSolar/zephyr#v2.6-branch #upload_protocol = mbed upload_protocol = stlink