diff options
author | Jan Delgado <jdelgado@gmx.net> | 2020-12-26 00:52:35 +0300 |
---|---|---|
committer | Jan Delgado <jdelgado@gmx.net> | 2020-12-30 15:54:05 +0300 |
commit | 6eb61348676fbb08be200ce3843bc6de10b070e4 (patch) | |
tree | 51f5b4f645fb0a77398ab177e724e8b1336ba711 /ci | |
parent | 47e033b17ded4d35cfd8be8c9efabe40e49e4bfd (diff) |
build examples in CI using github actions
The examples are built for various different boards/platforms. Where
necessary, examples were changed to enable compilation also for ESP8266
and ESP32 platforms.
Diffstat (limited to 'ci')
-rwxr-xr-x | ci/ci-compile | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/ci/ci-compile b/ci/ci-compile new file mode 100755 index 00000000..208a173a --- /dev/null +++ b/ci/ci-compile @@ -0,0 +1,36 @@ +#!/bin/bash +# +# compile FastLED examples with platformio for various boards. This script +# is usually run by the CI, but can also be run locally. Only dependency +# is platformio. +# +# usage: +# [BOARDS=boards] [EXAMPLES=examples] ./ci-compile +# +# e.g. +# $ ./compile-ci +# - compile all board/examples combinations +# +# $ BOARDS="esp32 esp01" EXAMPLES=Blink ./compile-ci +# - compile only Blink example for the esp32 and esp8266 platforms +# +set -eou pipefail + +# List of examples that will be compiled by default +EXAMPLES=${EXAMPLES:-"Blink ColorPalette ColorTemperature Cylon DemoReel100 + Fire2012 FirstLight Multiple/MultipleStripsInOneArray + Multiple/ArrayOfLedArrays Noise NoisePlayground NoisePlusPalette Pacifica + Pride2015 RGBCalibrate RGBSetDemo TwinkleFox XYMatrix"} + +# list of boards to compile for by default +BOARDS=${BOARDS:-"uno esp32dev esp01 yun digix teensy30"} + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +BOARD_OPTS=$(for b in $BOARDS; do echo -n "--board $b "; done) + +cd "$DIR/.." + +for d in $EXAMPLES ; do + echo "*** building example $d for $BOARDS ***" + pio ci $BOARD_OPTS --lib=src "examples/$d/"*ino +done |