-
-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathaction.yml
77 lines (75 loc) · 3.05 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
name: 'Compile Arduino Sketches'
description: 'Checks whether Arduino sketches will compile and produces a report of data from the compilations'
inputs:
cli-version:
description: 'Version of Arduino CLI to use when building'
default: 'latest'
required: true
fqbn:
description: 'Full qualified board name, with Boards Manager URL if needed'
default: 'arduino:avr:uno'
required: true
libraries:
description: 'YAML-format list of library dependencies to install'
default: '- source-path: ./'
required: true
platforms:
description: 'YAML-format list of platform dependencies to install'
default: ''
required: true
sketch-paths:
description: 'YAML-format list of paths containing sketches to compile.'
default: '- examples'
required: true
cli-compile-flags:
description: 'YAML-format list of flags to add to the Arduino CLI sketch compilation command.'
default: ''
required: false
verbose:
description: 'Set to true to show verbose output in the log'
default: 'false'
required: true
sketches-report-path:
description: 'Path in which to save a JSON formatted file containing data from the sketch compilations'
default: 'sketches-reports'
required: true
github-token:
description: 'GitHub access token used to get information from the GitHub API. Only needed if you are using the deltas report feature in a private repository.'
default: ''
required: true
enable-deltas-report:
description: 'Set to true to cause the action to determine the change in memory usage and compiler warnings of the compiled sketches between the head and base refs of a PR and the immediate parent commit of a push'
default: 'false'
required: true
enable-warnings-report:
description: 'Set to true to cause the action to record the compiler warning count for each sketch compilation in the sketches report'
default: 'false'
required: true
runs:
using: composite
steps:
- name: Run the set up script
id: setup
shell: bash
run: |
# Group action setup log output
echo "::group::Action set up"
"${{ github.action_path }}/action-setup.sh"
echo "::endgroup::"
- name: Run script
shell: bash
env:
INPUT_CLI-VERSION: ${{ inputs.cli-version }}
INPUT_FQBN: ${{ inputs.fqbn }}
INPUT_LIBRARIES: ${{ inputs.libraries }}
INPUT_PLATFORMS: ${{ inputs.platforms }}
INPUT_SKETCH-PATHS: ${{ inputs.sketch-paths }}
INPUT_CLI-COMPILE-FLAGS: ${{ inputs.cli-compile-flags }}
INPUT_VERBOSE: ${{ inputs.verbose }}
INPUT_GITHUB-TOKEN: ${{ inputs.github-token }}
INPUT_ENABLE-DELTAS-REPORT: ${{ inputs.enable-deltas-report }}
INPUT_ENABLE-WARNINGS-REPORT: ${{ inputs.enable-warnings-report }}
INPUT_SKETCHES-REPORT-PATH: ${{ inputs.sketches-report-path }}
run: |
source "${{ steps.setup.outputs.python-venv-activate-script-path }}"
"${{ steps.setup.outputs.python-command }}" "${{ github.action_path }}/compilesketches/compilesketches.py"