[CI] Added test matrix
This commit is contained in:
parent
03ea2dbc7f
commit
7baf597c97
1 changed files with 16 additions and 6 deletions
22
.github/workflows/main.yml
vendored
22
.github/workflows/main.yml
vendored
|
@ -8,8 +8,18 @@ on:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
Arduino-Uno:
|
Build:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
platform: ["arduino:avr", "arduino:samd"]
|
||||||
|
include:
|
||||||
|
- platform: "arduino:avr"
|
||||||
|
board: "arduino:avr:uno"
|
||||||
|
- platform: "arduino:samd"
|
||||||
|
board: "arduino:samd:arduino_zero_native"
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Install arduino-cli
|
- name: Install arduino-cli
|
||||||
run: |
|
run: |
|
||||||
|
@ -17,14 +27,14 @@ 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: Install board
|
- name: Install platform
|
||||||
run: |
|
run: |
|
||||||
arduino-cli core update-index
|
arduino-cli core update-index
|
||||||
arduino-cli core install arduino:avr
|
arduino-cli core install ${{ matrix.platform }}
|
||||||
echo "::set-env name=BOARD::arduino:avr:uno"
|
|
||||||
echo "::set-env name=WARNINGS::all"
|
echo "::set-env name=WARNINGS::all"
|
||||||
|
|
||||||
- uses: actions/checkout@v2
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Build all examples
|
- name: Build all examples
|
||||||
run: |
|
run: |
|
||||||
|
@ -36,7 +46,7 @@ jobs:
|
||||||
else
|
else
|
||||||
# build sketch
|
# build sketch
|
||||||
echo -e "\n\033[1;33mBuilding ${example##*/} ... \033[0m";
|
echo -e "\n\033[1;33mBuilding ${example##*/} ... \033[0m";
|
||||||
arduino-cli compile --libraries /home/runner/work/RadioLib --fqbn $BOARD $example --warnings=$WARNINGS
|
arduino-cli compile --libraries /home/runner/work/RadioLib --fqbn ${{ matrix.board }} $example --warnings=$WARNINGS
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo -e "\033[1;31m${example##*/} build FAILED\033[0m\n";
|
echo -e "\033[1;31m${example##*/} build FAILED\033[0m\n";
|
||||||
exit 1;
|
exit 1;
|
||||||
|
|
Loading…
Add table
Reference in a new issue