Skip to content

Commit

Permalink
Arduino test compile Action (#119)
Browse files Browse the repository at this point in the history
* use ArminJo/arduino-test-compile Action

* added debug sketch to ci #101

* updated examples-build-properties syntax

* use json string as input

* reduced number of jobs in workflow

* trigger workflow

* set version of arduino-test-compile action
  • Loading branch information
Legion2 authored Apr 3, 2020
1 parent 3687654 commit b97d130
Showing 1 changed file with 37 additions and 74 deletions.
111 changes: 37 additions & 74 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,10 @@ on: [push, pull_request]
name: Test
jobs:
test:
name: Test ${{ matrix.sketch }} for ${{ matrix.board }}
name: Test for ${{ matrix.board }}
runs-on: ubuntu-latest
strategy:
matrix:
sketch:
[
LightingNodePRO,
SingleStripLightingNodePRO,
CommanderPRO,
DeviceIDTool,
RepeatAndScale,
TransformLLFansFormatToStrip,
LS100,
LightingNodeCORE,
NonAddressable,
AmbientBacklight,
]
board:
[
"Legion2:avr:leonardoclp",
Expand All @@ -27,77 +14,53 @@ jobs:
]
steps:
- uses: actions/checkout@master
- uses: arduino/[email protected]
- name: Install repo as library
run: |
mkdir -p "$HOME/Arduino/libraries"
ln -s "$PWD" "$HOME/Arduino/libraries/."
- name: Install FastLED
run: arduino-cli lib install [email protected]
- name: Install Arduino core
run: |
arduino-cli core update-index
arduino-cli core install arduino:[email protected]
- name: Install SparkFun boards
if: contains(matrix.board, 'promicro')
run: |
arduino-cli core update-index --additional-urls https://raw.githubusercontent.com/sparkfun/Arduino_Boards/master/IDE_Board_Manager/package_sparkfun_index.json
arduino-cli core install SparkFun:[email protected] --additional-urls https://raw.githubusercontent.com/sparkfun/Arduino_Boards/master/IDE_Board_Manager/package_sparkfun_index.json
- name: Install CLP Boards
run: |
arduino-cli core update-index --additional-urls https://raw.githubusercontent.com/Legion2/CorsairLightingProtocolBoards/master/package_Legion2_CorsairLightingProtocolBoards_index.json
arduino-cli core install Legion2:[email protected] --additional-urls https://raw.githubusercontent.com/Legion2/CorsairLightingProtocolBoards/master/package_Legion2_CorsairLightingProtocolBoards_index.json
- name: Build ${{ matrix.sketch }} for ${{ matrix.board }}
run: arduino-cli compile --fqbn ${{ matrix.board }} ./examples/${{ matrix.sketch }} --warnings more
- name: Build for ${{ matrix.board }}
uses: ArminJo/[email protected]
with:
arduino-board-fqbn: ${{ matrix.board }}
platform-url: https://raw.githubusercontent.com/sparkfun/Arduino_Boards/master/IDE_Board_Manager/package_sparkfun_index.json,https://raw.githubusercontent.com/Legion2/CorsairLightingProtocolBoards/master/package_Legion2_CorsairLightingProtocolBoards_index.json
arduino-platform: arduino:[email protected],SparkFun:[email protected],Legion2:[email protected]
required-libraries: [email protected]
sketch-names: LightingNodePRO.ino,
SingleStripLightingNodePRO.ino,
CommanderPRO.ino,
DeviceIDTool.ino,
RepeatAndScale.ino,
TransformLLFansFormatToStrip.ino,
LS100.ino,
LightingNodeCORE.ino,
NonAddressable.ino,
AmbientBacklight.ino,
DebugSketch.ino
examples-build-properties: '{"DebugSketch": "-DDEBUG -DVERBOSE -DPRINT_COMMAND=true -DPRINT_RESPONSE=true -DPRINT_LOOP=true -DPRINT_UPDATE=true"}'
testUnoMega:
name: Test UnoMega ${{ matrix.sketch }} for ${{ matrix.board }}
name: Test UnoMega sketches for ${{ matrix.board }}
runs-on: ubuntu-latest
strategy:
matrix:
sketch: [HoodLoader2UnoMegaController]
board: ["arduino:avr:uno", "arduino:avr:mega:cpu=atmega2560"]
steps:
- uses: actions/checkout@master
- uses: arduino/[email protected]
- name: Install repo as library
run: |
mkdir -p "$HOME/Arduino/libraries"
ln -s "$PWD" "$HOME/Arduino/libraries/."
- name: Install FastLED
run: arduino-cli lib install [email protected]
- name: Install Arduino core
run: |
arduino-cli core update-index
arduino-cli core install arduino:[email protected]
- name: Build ${{ matrix.sketch }} for ${{ matrix.board }}
run: arduino-cli compile --fqbn ${{ matrix.board }} ./examples/${{ matrix.sketch }} --warnings more
- name: Build for ${{ matrix.board }}
uses: ArminJo/[email protected]
with:
arduino-board-fqbn: ${{ matrix.board }}
arduino-platform: arduino:[email protected]
required-libraries: [email protected]
sketch-names: HoodLoader2UnoMegaController.ino
test16u2:
name: Test 16u2 ${{ matrix.sketch }} for ${{ matrix.board }}
name: Test 16u2 sketch for ${{ matrix.board }}
runs-on: ubuntu-latest
strategy:
matrix:
sketch: [HoodLoader2CLPBridge]
board: ["Legion2:avr:HoodLoader2atmega16u2clp"]
steps:
- uses: actions/checkout@master
- uses: arduino/[email protected]
- name: Install repo as library
run: |
mkdir -p "$HOME/Arduino/libraries"
ln -s "$PWD" "$HOME/Arduino/libraries/."
- name: Install FastLED
run: arduino-cli lib install [email protected]
- name: Install Arduino core
run: |
arduino-cli core update-index
arduino-cli core install arduino:[email protected]
- name: Install HoodLoader2
run: |
arduino-cli core update-index --additional-urls https://raw.githubusercontent.com/NicoHood/HoodLoader2/master/package_NicoHood_HoodLoader2_index.json
arduino-cli core install HoodLoader2:[email protected] --additional-urls https://raw.githubusercontent.com/NicoHood/HoodLoader2/master/package_NicoHood_HoodLoader2_index.json
- name: Install CLP Boards
run: |
arduino-cli core update-index --additional-urls https://raw.githubusercontent.com/Legion2/CorsairLightingProtocolBoards/master/package_Legion2_CorsairLightingProtocolBoards_index.json
arduino-cli core install Legion2:[email protected] --additional-urls https://raw.githubusercontent.com/Legion2/CorsairLightingProtocolBoards/master/package_Legion2_CorsairLightingProtocolBoards_index.json
- name: Build ${{ matrix.sketch }} for ${{ matrix.board }}
run: arduino-cli compile --fqbn ${{ matrix.board }} ./examples/${{ matrix.sketch }} --warnings more
- name: Build for ${{ matrix.board }}
uses: ArminJo/[email protected]
with:
arduino-board-fqbn: ${{ matrix.board }}
platform-url: https://raw.githubusercontent.com/NicoHood/HoodLoader2/master/package_NicoHood_HoodLoader2_index.json,https://raw.githubusercontent.com/Legion2/CorsairLightingProtocolBoards/master/package_Legion2_CorsairLightingProtocolBoards_index.json
arduino-platform: arduino:[email protected],HoodLoader2:[email protected],Legion2:[email protected]
required-libraries: [email protected]
sketch-names: HoodLoader2CLPBridge.ino

0 comments on commit b97d130

Please sign in to comment.