[CI] Get platform from board name
This commit is contained in:
parent
ed02258088
commit
e4e2de8c49
1 changed files with 12 additions and 2 deletions
14
.github/workflows/main.yml
vendored
14
.github/workflows/main.yml
vendored
|
@ -11,7 +11,10 @@ jobs:
|
||||||
Build:
|
Build:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
board: ['arduino:avr:uno', 'arduino:avr:mega:cpu=atmega2560', 'arduino:samd:arduino_zero_native']
|
board:
|
||||||
|
- arduino:avr:uno
|
||||||
|
- arduino:avr:mega:cpu=atmega2560
|
||||||
|
- arduino:samd:arduino_zero_native
|
||||||
include:
|
include:
|
||||||
- board: 'arduino:avr:uno'
|
- board: 'arduino:avr:uno'
|
||||||
platform: 'arduino:avr'
|
platform: 'arduino:avr'
|
||||||
|
@ -34,11 +37,18 @@ jobs:
|
||||||
echo "::add-path::~/.local/bin"
|
echo "::add-path::~/.local/bin"
|
||||||
curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR=~/.local/bin sh
|
curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR=~/.local/bin sh
|
||||||
|
|
||||||
|
- name: Get platform name
|
||||||
|
uses: jungwinter/split@v1
|
||||||
|
id: split
|
||||||
|
with:
|
||||||
|
msg: ${{ matrix.board }}
|
||||||
|
separator: ':'
|
||||||
|
|
||||||
- name: Install platform
|
- name: Install platform
|
||||||
if: ${{ env.run-build == 'true' }}
|
if: ${{ env.run-build == 'true' }}
|
||||||
run: |
|
run: |
|
||||||
arduino-cli core update-index
|
arduino-cli core update-index
|
||||||
arduino-cli core install ${{ matrix.platform }}
|
arduino-cli core install ${{ format('{0}:{1}', steps.split.outputs_0, steps.split.outputs_1) }}
|
||||||
|
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
if: ${{ env.run-build == 'true' }}
|
if: ${{ env.run-build == 'true' }}
|
||||||
|
|
Loading…
Add table
Reference in a new issue