-
Notifications
You must be signed in to change notification settings - Fork 6
/
action.yml
118 lines (101 loc) · 5.42 KB
/
action.yml
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
name: 'Test compile for Arduino'
description: 'Compile sketches or Arduino library examples for one board type using arduino-cli and check for errors'
author: 'Armin Joachimsmeyer'
inputs:
cli-version:
description: 'Version of arduino-cli to use when building. Current (8/2022) one is 0.26.0.'
default: 'latest'
required: false
sketch-names:
description: 'Comma sepatated list of patterns or filenames (without path, but with extension) of the sketch(es) to test compile. Useful if the sketch is a *.cpp or *.c file or only one sketch in the repository should be compiled.'
default: '*.ino'
required: false
sketch-names-find-start:
description: 'The start directory to look for the sketch-names to test compile. Can be a path like "digistump-avr/libraries/*/examples/C*/" .'
default: '.'
required: false
arduino-board-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
description: 'Fully Qualified Board Name of the Arduino board. You may add a suffix behind the fqbn with "|" to specify one board for e.g. different compile options like arduino:avr:uno|trace.'
default: 'arduino:avr:uno'
required: false
arduino-platform:
description: 'Comma separated list of platform specifiers, if you require a fixed version like "arduino:[email protected]" or do not want the specifier derived from the 2 first elements of the arduino-board-fqbn or need more than one core. The suffix "@latest" is always removed.'
default: ''
required: false
platform-default-url:
description: 'The platform URL for the required board description if arduino-board-fqbn does not start with "arduino:" and not explicitly specified by platform-url.'
default: ''
required: false
platform-url:
description: 'The platform URL for the required board description if arduino-board-fqbn does not start with "arduino:".'
default: ''
required: false
required-libraries:
description: 'Comma separated list of arduino library names required for compiling the sketches / examples for this board. Add version number by e.g. @1.2.0.'
default: ''
required: false
sketches-exclude:
description: 'Comma or space separated list of complete names of all sketches / examples to be excluded in the build for this board.'
default: ''
required: false
build-properties:
description: |
Build parameter like -DDEBUG for each example specified or for all examples, if example name is "All". In json format.
For example: build-properties: '{ "WhistleSwitch": "-DDEBUG -DFREQUENCY_RANGE_LOW", "SimpleFrequencyDetector": "-DINFO" }'
default: ''
required: false
extra-arduino-cli-args:
description: |
This string is passed verbatim without double quotes to the arduino-cli compile commandline as last argument before the filename.
See https://arduino.github.io/arduino-cli/commands/arduino-cli_compile/ for compile parameters.
default: ''
required: false
extra-arduino-lib-install-args:
description: |
This string is passed verbatim without double quotes to the arduino-cli lib install commandline as last argument before the library names.
It can be used e.g. to suppress dependency resolving for libraries by using --no-deps as argument string.
default: ''
required: false
set-build-path:
description: |
Flag to set the build directory (arduino-cli paramer --build-path) to /build subdirectory of compiled sketches.
But anyway, the build binaries are always available in the newly generated "build/<fqbn>" directory of the sketch.
They are logged if debug-compile is set to "true".
default: 'false'
required: false
debug-compile:
description: 'If set to "true" the action logs verbose compile output even during successful builds'
default: ''
required: false
debug-install:
description: 'If set to "true" the action logs verbose arduino-cli output during installation'
default: ''
required: false
runs:
using: 'composite'
steps:
- name: Compile all sketches / examples using the bash script arduino-test-compile.sh
env:
# Passing parameters to the script by setting the appropriate ENV_* variables.
# Direct passing as arguments is not possible because of blanks in the arguments.
ENV_CLI_VERSION: ${{ inputs.cli-version }}
ENV_SKETCH_NAMES: ${{ inputs.sketch-names }}
ENV_SKETCH_NAMES_FIND_START: ${{ inputs.sketch-names-find-start }}
ENV_ARDUINO_BOARD_FQBN: ${{ inputs.arduino-board-fqbn }}
ENV_ARDUINO_PLATFORM: ${{ inputs.arduino-platform }}
ENV_PLATFORM_DEFAULT_URL: ${{ inputs.platform-default-url }}
ENV_PLATFORM_URL: ${{ inputs.platform-url }}
ENV_REQUIRED_LIBRARIES: ${{ inputs.required-libraries }}
ENV_SKETCHES_EXCLUDE: ${{ inputs.sketches-exclude }}
ENV_BUILD_PROPERTIES: ${{ inputs.build-properties }}
ENV_EXTRA_ARDUINO_CLI_ARGS: ${{ inputs.extra-arduino-cli-args }}
ENV_EXTRA_ARDUINO_LIB_INSTALL_ARGS: ${{ inputs.extra-arduino-lib-install-args }}
ENV_SET_BUILD_PATH: ${{ inputs.set-build-path }}
ENV_DEBUG_COMPILE: ${{ inputs.debug-compile }}
ENV_DEBUG_INSTALL: ${{ inputs.debug-install }}
run: ${{ github.action_path }}/arduino-test-compile.sh
shell: bash
branding:
icon: 'eye'
color: 'red'