This action checks whether Arduino sketches compile and produces a report of data from the compilations.
The version of Arduino CLI to use. Default "latest".
The fully qualified board name to use when compiling. Default "arduino:avr:uno".
If the board is from one of the platforms provided by Arduino's default package index, the board's platform dependency will be automatically detected and the latest version installed. For boards of platforms not in the default package index, previous versions, or other platform sources, the platform dependency must be defined via the platforms input.
YAML-format list of platform dependencies to install.
Default "". If no platforms input is provided, the board's dependency will be automatically determined from the fqbn input and the latest version of that platform will be installed via Boards Manager.
If a platform dependency from a non-Boards Manager source of the same name as another Boards Manager source platform dependency is defined, they will both be installed, with the non-Boards Manager dependency overwriting the Boards Manager platform installation. This permits testing against a non-release version of a platform while using Boards Manager to install the platform's tools dependencies. Example:
platforms: |
# Install the latest release of Arduino SAMD Boards and its toolchain via Boards Manager
- name: "arduino:samd"
# Install the platform from the root of the repository, replacing the BM installed platform
- source-path: "."
name: "arduino:samd"Keys:
name- platform name in the form ofVENDOR:ARCHITECTURE.version- version of the platform to install. Default is the latest version.source-url- Boards Manager URL of the platform. Default is Arduino's package index, which allows installation of all official platforms.
Keys:
source-path- path to install as a platform. Relative paths are assumed to be relative to the root of the repository.name- platform name in the form ofVENDOR:ARCHITECTURE.
Keys:
source-url- URL to clone the repository from. It must start withgit://or end with.git.version- Git ref of the repository to checkout. The special version namelatestwill cause the latest tag to be used. By default, the repository will be checked out to the tip of the default branch.source-path- path to install as a platform. Paths are relative to the root of the repository. The default is to install from the root of the repository.name- platform name in the form ofVENDOR:ARCHITECTURE.
Keys:
source-url- download URL for the archive (e.g.,https://github.com/arduino/ArduinoCore-avr/archive/master.zip).source-path- path to install as a platform. Paths are relative to the root folder of the archive, or the root of the archive if it has no root folder. The default is to install from the root folder of the archive.name- platform name in the form ofVENDOR:ARCHITECTURE.
YAML-format list of library dependencies to install.
Default "- source-path: ./". This causes the repository to be installed as a library. If there are no library dependencies and you want to override the default, set the libraries input to an empty list (- libraries: '-').
Libraries are installed under the Arduino user folder at ~/Arduino/libraries.
Note: when the deprecated space-separated list format of this input is used, the repository under test will always be installed as a library.
Keys:
name- name of the library, as defined in thenamefield of its library.properties metadata file. The library will be installed to a folder matching the name, but with any spaces replaced by_.version- version of the library to install. Default is the latest version.
Keys:
source-path- path to install as a library. Relative paths are assumed to be relative to the root of the repository.destination-name- folder name to install the library to. By default, the folder will be named according to the source repository or subfolder name.
Keys:
source-url- URL to clone the repository from. It must start withgit://or end with.git.version- Git ref of the repository to checkout. The special version namelatestwill cause the latest tag to be used. By default, the repository will be checked out to the tip of the default branch.source-path- path to install as a library. Paths are relative to the root of the repository. The default is to install from the root of the repository.destination-name- folder name to install the library to. By default, the folder will be named according to the source repository or subfolder name.
Keys:
source-url- download URL for the archive (e.g.,https://github.com/arduino-libraries/Servo/archive/master.zip).source-path- path to install as a library. Paths are relative to the root folder of the archive, or the root of the archive if it has no root folder. The default is to install from the root folder of the archive.destination-name- folder name to install the library to. By default, the folder will be named according to the source archive or subfolder name.
YAML-format list of paths containing sketches to compile. These paths will be searched recursively. Default - examples.
Set to true to show verbose output in the log. Default false
Path in which to save a JSON formatted file containing data from the sketch compilations. Should be used only to store reports. Relative paths are relative to GITHUB_WORKSPACE. The folder will be created if it doesn't already exist. This report is used by the arduino/report-size-deltas and arduino/report-size-trends actions. Default "size-deltas-reports".
GitHub access token used to get information from the GitHub API. Only needed for private repositories with enable-deltas-report set to true. It will be convenient to use ${{ secrets.GITHUB_TOKEN }}. Default "".
Set to true to cause the action to determine the change in memory usage and compiler warnings of the compiled sketches. If the workflow is triggered by a pull_request event, the comparison is between the pull request branch and the tip of the pull request's base branch. If the workflow is triggered by a push event, the comparison is between the pushed commit and its immediate parent. The deltas will be displayed in the GitHub Actions build log. This may be used with the arduino/report-size-deltas action. Default false.
Set to true to cause the action to record the compiler warning count for each sketch compilation in the sketches report. Default false.
Only compiling examples:
- uses: arduino/compile-sketches@master
with:
fqbn: 'arduino:avr:uno'
libraries: |
- name: Servo
- name: Stepper
version: 1.1.3Storing the sketches compilation report report as a workflow artifact:
- uses: arduino/compile-sketches@master
with:
enable-deltas-report: true
- if: github.event_name == 'pull_request'
uses: actions/upload-artifact@v1
with:
name: size-deltas-reports
path: size-delta-reports