Files
charge-controller-firmware/scripts/check.sh
T
Martin Jäger c1f3f05d32 Remove PlatformIO support
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.
2021-10-05 15:01:50 +02:00

40 lines
939 B
Bash
Executable File

#!/bin/bash
#
# This file performs continuous integration checks and should be run before pushing new commits
#
# exit when any command fails
set -e
# use board-specific directory
west config build.dir-fmt "build/{board}"
echo "---------- Trailing whitespace check -------------"
# check uncommitted changes
git diff --check HEAD
# check all commits starting from initial commit
git diff --check `git rev-list --max-parents=0 HEAD`..HEAD
echo "---------- Running compile check -------------"
cd zephyr
west build -b mppt_2420_hc@0.2
west build -b mppt_2420_lc
west build -b mppt_1210_hus@0.7
west build -b pwm_2420_lus@0.3
cd ..
echo "---------- Running unit-tests -------------"
cd tests
west build -b native_posix -t run
cd ..
#echo "---------- Running static code checks -------------"
#platformio check -e mppt_1210_hus -e pwm_2420_lus --skip-packages --fail-on-defect high
echo "---------- All tests passed -------------"