Skip to content

Commit e0765ff

Browse files
authored
Merge pull request #52 from per1234/platforms-input
libraries/compile-examples: allow installation of arbitrary platform dependencies
2 parents 6149970 + 4581263 commit e0765ff

File tree

4 files changed

+580
-64
lines changed

4 files changed

+580
-64
lines changed

README.md

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,52 @@ For 3rd party boards, also specify the Boards Manager URL:
1616
fqbn: '"sandeepmistry:nRF5:Generic_nRF52832" "https://sandeepmistry.github.io/arduino-nRF5/package_nRF5_boards_index.json"'
1717
```
1818
19+
### `platforms`
20+
21+
YAML-format list of platform dependencies to install.
22+
23+
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 Board Manager.
24+
25+
If a platform dependency from a non-Board Manager source of the same name as another Board Manager source platform dependency is defined, they will both be installed, with the non-Board Manager dependency overwriting the Board Manager platform installation. This permits testing against a non-release version of a platform while using Board Manager to install the platform's tools dependencies.
26+
Example:
27+
```yaml
28+
platforms: |
29+
# Install the latest release of Arduino SAMD Boards and its toolchain via Board Manager
30+
- name: "arduino:samd"
31+
# Install the platform from the root of the repository, replacing the BM installed platform
32+
- source-path: "."
33+
name: "arduino:samd"
34+
```
35+
36+
#### Sources:
37+
38+
##### Board Manager
39+
40+
Keys:
41+
- `name` - platform name in the form of `VENDOR:ARCHITECTURE`.
42+
- `version` - version of the platform to install. Default is the latest version.
43+
44+
##### Local path
45+
46+
Keys:
47+
- `source-path` - path to install as a platform. Relative paths are assumed to be relative to the root of the repository.
48+
- `name` - platform name in the form of `VENDOR:ARCHITECTURE`.
49+
50+
##### Repository
51+
52+
Keys:
53+
- `source-url` - URL to clone the repository from. It must start with `git://` or end with `.git`.
54+
- `version` - [Git ref](https://git-scm.com/book/en/v2/Git-Internals-Git-References) of the repository to checkout. The special version name `latest` will cause the latest tag to be used. By default, the repository will be checked out to the tip of the default branch.
55+
- `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.
56+
- `name` - platform name in the form of `VENDOR:ARCHITECTURE`.
57+
58+
##### Archive download
59+
60+
Keys:
61+
- `source-url` - download URL for the archive (e.g., `https://github.com/arduino/ArduinoCore-avr/archive/master.zip`).
62+
- `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.
63+
- `name` - platform name in the form of `VENDOR:ARCHITECTURE`.
64+
1965
### `libraries`
2066

2167
YAML-format list of library dependencies to install.
@@ -50,7 +96,7 @@ Keys:
5096

5197
Keys:
5298
- `source-url` - download URL for the archive (e.g., `https://github.com/arduino-libraries/Servo/archive/master.zip`).
53-
- `source-path` - path to install as a library. Paths are relative to the root folder of the archive. If the archive doesn't have a root folder, use `..` as `source-path` to install from the archive root. The default is to install from the root folder of the archive.
99+
- `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.
54100
- `destination-name` - folder name to install the library to. By default, the folder will be named according to the source archive or subfolder name.
55101

56102
### `sketch-paths`

action.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ inputs:
1010
libraries:
1111
description: 'YAML-format list of library dependencies to install'
1212
default: '- source-path: ./'
13+
platforms:
14+
description: 'YAML-format list of platform dependencies to install'
15+
default: ''
1316
sketch-paths:
1417
description: 'List of paths containing sketches to compile.'
1518
default: 'examples'

0 commit comments

Comments
 (0)