From 1f57f21b694a3fe82319ec9dc991864a70e3f576 Mon Sep 17 00:00:00 2001 From: Balazs Racz Date: Sun, 11 Apr 2021 09:27:44 +0200 Subject: [PATCH] Adds GitHub Action that builds the arduino examples. (#534) This Action works as a CI ensuring that the Arduino OpenMRNLite library and its contributed examples are building correctly. The Action triggers automatically upon every pull request, and builds all ESP32*.ino and Stm32*.ino sketches using arduino-cli. The OpenMRNLite library and the example sketches are always taken from HEAD. An example run is visible here: https://github.com/balazsracz/openmrn/runs/2314541629?check_suite_focus=true === * Adds a workflow to build the ESP32 arduino examples. * upgrade version * fix indent * Add libify to build action * fix paths * Add STM32 compilation step * fix typo in sketch names * update stm32 target * try deleting the build opt * add compile flag * Fix format * Revert "try deleting the build opt" This reverts commit 3692abb8c8c303162a0d2f5a4ff9834bd9de6b61. * Patch remove the build_opt.h files. build all stm32 examples. * Adjust when to run * Update esp32 platform URL to point to their github. --- .github/workflows/ArduinoBuild.yml | 49 ++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/ArduinoBuild.yml diff --git a/.github/workflows/ArduinoBuild.yml b/.github/workflows/ArduinoBuild.yml new file mode 100644 index 000000000..9ad9a0eba --- /dev/null +++ b/.github/workflows/ArduinoBuild.yml @@ -0,0 +1,49 @@ +# ArduinoBuild.yml +# +# Github workflow script that compiles all examples from the OpenMRNLite +# Arduino library. +# +# Copyright (C) 2021 Balazs Racz +# + +# Name of workflow +name: ArduinoBuild +on: + push: + paths: + - '**.ino' + - '**rduino**' + - '**ArduinoBuild.yml' + pull_request: +jobs: + build: + name: Build ESP32 examples + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@master + + - name: Generate OpenMRNLite library + run: | + mkdir --parents $HOME/Arduino/libraries/OpenMRNLite + $GITHUB_WORKSPACE/arduino/libify.sh $HOME/Arduino/libraries/OpenMRNLite $GITHUB_WORKSPACE -f -l + rm -f $GITHUB_WORKSPACE/arduino/examples/Stm*/build_opt.h + + - name: Compile all STM32 examples + uses: ArminJo/arduino-test-compile@v3.0.0 + with: + platform-url: https://raw.githubusercontent.com/stm32duino/BoardManagerFiles/master/STM32/package_stm_index.json + arduino-board-fqbn: STM32:stm32:Nucleo_144:pnum=NUCLEO_F767ZI,upload_method=MassStorage,xserial=generic,usb=CDCgen,xusb=FS,opt=osstd,rtlib=nano + sketch-names: Stm32*.ino + build-properties: '{ "All": "-DHAL_CAN_MODULE_ENABLED" }' + debug-compile: true + + - name: Compile all ESP32 examples + uses: ArminJo/arduino-test-compile@v3.0.0 + with: + platform-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json + arduino-board-fqbn: esp32:esp32:node32s + sketch-names: ESP*.ino + debug-compile: true + +