Skip to content

Commit cbc002e

Browse files
authored
Remove unused platforms action input from "Compile Examples" workflow (#9)
* Remove superfluous and non-compliant YAML syntax from workflow Previously, the "flow style" YAML syntax was used for this mapping. That was inconsistent with the rest of the workflow code, which uses the "block style" that is the standard for all YAML code in Arduino projects. This type of random mixing of the two styles makes otherwise fairly intuitive YAML code difficult to understand and maintain for anyone without deep familiarity with the obscure details of this language. Worse, the syntax had a form that was not specification-compliant: https://yaml.org/spec/1.2.2/#823-block-nodes > Flow nodes must be indented by at least one more space than the parent block collection. Although some lenient parsers do happen to support the previous non-compliant form, such support is not guaranteed, and non-compliance will cause a failure when used with any strict parser. * Remove unused `platforms` action input from "Compile Examples" workflow The "arduino/compile-sketches" action provides a `platforms` input by which the platform dependencies to be installed may be specified. This input is useful for use cases such as: * a 3rd party platform dependency which requires a supplemental package index * a platform dependency from an alternative source (e.g., development version of a platform from a Git repo) * transitory platform dependencies * version pinning However, the input is not required in the case where the platform is available from the primary package index, since the action will derive the platform ID from the FQBN. The workflow was based on a workflow from another repository which did explicitly define platform dependencies, and so did require the use of the `platform` input. However, the platform dependencies data was removed from this workflow, so the `platform` input serves no purpose and its presence only makes the workflow more difficult to understand and maintain.
1 parent 6fbb04e commit cbc002e

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

.github/workflows/compile-examples.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,8 @@ jobs:
2323
build:
2424
name: ${{ matrix.board.fqbn }}
2525
runs-on: ubuntu-latest
26-
permissions: {
26+
permissions:
2727
contents: read
28-
}
2928

3029
env:
3130
LIBRARIES: |
@@ -75,7 +74,6 @@ jobs:
7574
uses: arduino/compile-sketches@v1
7675
with:
7776
github-token: ${{ secrets.GITHUB_TOKEN }}
78-
platforms: ${{ matrix.platforms }}
7977
fqbn: ${{ matrix.board.fqbn }}
8078
libraries: ${{ env.LIBRARIES }}
8179
sketch-paths: ${{ env.SKETCH_PATHS }}

0 commit comments

Comments
 (0)