nektos/act compatibility #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# From: https://github.com/marketplace/actions/compile-arduino-sketches | |
# Uses: https://github.com/arduino/compile-sketches | |
name: Arduino Compile Sketches | |
on: | |
push: | |
workflow_dispatch: | |
jobs: | |
compile-sketches: | |
strategy: | |
matrix: | |
include: | |
- arch: avr | |
fqbn: 'arduino:avr:uno' | |
platform-name: 'arduino:avr' | |
platform-sourceurl: 'https://downloads.arduino.cc/packages/package_index.json' | |
- arch: msp | |
fqbn: 'energia:msp430:MSP-EXP430G2553LP' | |
platform-name: 'energia:msp430' | |
platform-sourceurl: 'https://raw.githubusercontent.com/Andy4495/TI_Platform_Cores_For_Arduino/main/json/package_energia_minimal_MSP_107_index.json' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@main | |
- name: Clone compile-sketches to get python version (using nektos/act locally) | |
if: ${{ env.ACT }} | |
run: cd /tmp; git clone 'https://github.com/arduino/compile-sketches' | |
- name: setup-python (when running locally for nektos/act compatibility) | |
if: ${{ env.ACT }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version-file: /tmp/compile-sketches/.python-version | |
- name: Install Poetry (when running locally for nektos/act compatibility) | |
if: ${{ env.ACT }} | |
uses: snok/install-poetry@v1 | |
- name: Install pipx (when running locally for nektos/act compatibility) | |
if: ${{ env.ACT }} | |
run: pip install pipx | |
- uses: arduino/compile-sketches@v1 | |
with: | |
fqbn: ${{ matrix.fqbn }} | |
platforms: | | |
- name: ${{ matrix.platform-name }} | |
version: latest | |
source-url: ${{ matrix.platform-sourceurl }} | |
sketch-paths: | | |
- . | |
verbose: true | |
enable-warnings-report: true | |
libraries: | | |
- source-path: ./ | |