-
Notifications
You must be signed in to change notification settings - Fork 2
89 lines (78 loc) · 3.97 KB
/
LibraryBuild.yml
File metadata and controls
89 lines (78 loc) · 3.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# LibraryBuild.yml
# Github workflow script to test compile all examples of an Arduino library repository.
#
# Copyright (C) 2020 Armin Joachimsmeyer
# https://github.com/ArminJo/Github-Actions
#
# This is the name of the workflow, visible on GitHub UI.
name: LibraryBuild
on:
push: # see: https://help.github.com/en/actions/reference/events-that-trigger-workflows#pull-request-event-pull_request
paths:
- '**.ino'
- '**.cpp'
- '**.h'
- '**LibraryBuild.yml'
pull_request:
jobs:
build:
name: ${{ matrix.arduino-boards-fqbn }} - test compiling examples
runs-on: ubuntu-18.04 # I picked Ubuntu to use shell scripts.
#env:
# Comma separated list without double quotes around the list.
#REQUIRED_LIBRARIES: Servo,ESP32Servo
strategy:
matrix:
# The matrix will produce one job for each configuration parameter of type `arduino-boards-fqbn`
# In the Arduino IDE, the fqbn is printed in the first line of the verbose output for compilation as parameter -fqbn=... for the "arduino-builder -dump-prefs" command
#
# Examples: arduino:avr:uno, arduino:avr:leonardo, arduino:avr:nano, arduino:avr:mega
# arduino:sam:arduino_due_x, arduino:samd:arduino_zero_native"
# ATTinyCore:avr:attinyx5:chip=85,clock=1internal, digistump:avr:digispark-tiny, digistump:avr:digispark-pro
# STM32:stm32:GenF1:pnum=BLUEPILL_F103C8
# esp8266:esp8266:huzzah:eesz=4M3M,xtal=80, esp32:esp32:featheresp32:FlashFreq=80
# You may add a suffix behind the fqbn with "|" to specify one board for e.g. different compile options like arduino:avr:uno|trace
#############################################################################################################
arduino-boards-fqbn:
# - arduino:avr:uno
# - arduino:avr:leonardo
# - arduino:avr:mega
# - arduino:megaavr:nona4809:mode=off
# - arduino:sam:arduino_due_x
# - arduino:samd:arduino_zero_native
# - arduino:mbed:nano33ble
- esp8266:esp8266:generic:eesz=4M3M,xtal=80
- esp32:esp32:esp32:FlashFreq=80
# - STM32:stm32:GenF1:pnum=BLUEPILL_F103C8
# - stm32duino:STM32F1:genericSTM32F103C
# - SparkFun:apollo3:sfe_artemis_nano
# Specify parameters for each board.
# With sketches-exclude you may exclude specific examples for a board. Use a comma separated list.
#############################################################################################################
include:
- arduino-boards-fqbn: esp8266:esp8266:generic:eesz=4M3M,xtal=80
platform-url: https://arduino.esp8266.com/stable/package_esp8266com_index.json
#sketches-exclude: Blink # Comma separated list of example names to exclude in build
#build-properties:
# PCA9685_Expander: -DUSE_PCA9685_SERVO_EXPANDER
- arduino-boards-fqbn: esp32:esp32:esp32:FlashFreq=80
platform-url: https://dl.espressif.com/dl/package_esp32_index.json
#sketches-exclude: Blink # Comma separated list of example names to exclude in build
#build-properties:
# PCA9685_Expander: -DUSE_PCA9685_SERVO_EXPANDER
# Do not cancel all jobs / architectures if one job fails
fail-fast: false
# This is the list of steps this job will run.
steps:
# First of all, we clone the repo using the `checkout` action.
- name: Checkout
uses: actions/checkout@v2
- name: Compile all examples using the arduino-test-compile action
uses: ArminJo/arduino-test-compile@master
with:
arduino-board-fqbn: ${{ matrix.arduino-boards-fqbn }}
arduino-platform: ${{ matrix.arduino-platform }}
platform-url: ${{ matrix.platform-url }}
required-libraries: ${{ env.REQUIRED_LIBRARIES }}
sketches-exclude: ${{ matrix.sketches-exclude }}
build-properties: ${{ toJson(matrix.build-properties) }}