Skip to content

Commit

Permalink
Adds GitHub Action that builds the arduino examples. (#534)
Browse files Browse the repository at this point in the history
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 3692abb.

* Patch remove the build_opt.h files.
build all stm32 examples.

* Adjust when to run

* Update esp32 platform URL to point to their github.
  • Loading branch information
balazsracz authored Apr 11, 2021
1 parent 9731cec commit 1f57f21
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/ArduinoBuild.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
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/[email protected]
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


0 comments on commit 1f57f21

Please sign in to comment.