-
Notifications
You must be signed in to change notification settings - Fork 39
91 lines (84 loc) · 4.7 KB
/
TestCompile.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# TestCompile.yml
# Github workflow script to test compile all examples of an Arduino core repository.
#
# Copyright (C) 2020 Armin Joachimsmeyer
# https://github.com/ArminJo/Github-Actions
#
# This is the name of the workflow, visible on GitHub UI.
name: TestCompile
on:
workflow_dispatch: # To run it manually
description: 'manual test compile'
push: # see: https://help.github.com/en/actions/reference/events-that-trigger-workflows#pull-request-event-pull_request
paths:
- '**.ino'
- '**.cpp'
- '**.h'
- '**TestCompile.yml'
pull_request:
jobs:
build:
name: Test compiling examples for Digispark
runs-on: ubuntu-latest
env:
# PLATFORM_DEFAULT_URL: https://raw.githubusercontent.com/ArminJo/DigistumpArduino/master/package_digistump_index.json
# Comma separated list without double quotes around the list.
REQUIRED_LIBRARIES:
strategy:
matrix:
# The matrix will produce one job for each configuration parameter of type `arduino-boards-fqbn`
# In the Arduino IDE, the fqbn is printed in the first line of the verbose output for compilation as parameter -fqbn=... for the "arduino-builder -dump-prefs" command
#
# Examples: arduino:avr:uno, arduino:avr:leonardo, arduino:avr:nano, arduino:avr:mega
# arduino:sam:arduino_due_x, arduino:samd:arduino_zero_native"
# ATTinyCore:avr:attinyx5:chip=85,clock=1internal, digistump:avr:digispark-tiny, digistump:avr:digispark-pro
# STMicroelectronics:stm32:GenF1:pnum=BLUEPILL_F103C8
# esp8266:esp8266:huzzah:eesz=4M3M,xtal=80, esp32:esp32:featheresp32:FlashFreq=80
# You may add a suffix behind the fqbn with "|" to specify one board for e.g. different compile options like arduino:avr:uno|trace
#############################################################################################################
arduino-boards-fqbn:
- digistump:avr:digispark-tiny # ATtiny85 board @16.5 MHz
- digistump:avr:digispark-pro
# - digistump:avr:MHETtiny88 # Chinese MH-Tiny ATTiny88
# Specify parameters for each board.
# With sketches-exclude you may exclude specific examples for a board. Use a comma separated list.
#############################################################################################################
include:
- arduino-boards-fqbn: digistump:avr:digispark-tiny # ATtiny85 board @16.5 MHz
sketches-exclude: Blink # All Wire examples
build-properties: # the flags were put in compiler.cpp.extra_flags
Keyboard: -DLAYOUT_GERMAN
# - arduino-boards-fqbn: digistump:avr:MHETtiny88 # ATtiny88 China clone board @16 MHz
# # 1.TinyWireM not usable; 2. incompatible I2C Hardware for Wire.h; 3. SoftPwm is not required and not working
# sketches-exclude:
# WiiClassicJoystick
# BasicUsage,DigisparkOLED,DigiUSB2LCD
# SoftPwm13Pins,TinySoftPwmDemo
# DigisparkUSBDemo ArduinoNunchukDemo DigisparkJoystickDemo # Nunchuck library: incompatible I2C Hardware, the original library uses TinyWireM library
# build-properties: # the flags were put in compiler.cpp.extra_flags
# Keyboard: -DLAYOUT_FRENCH
# Do not cancel all jobs / architectures if one job fails
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@master
- name: Use this repo as Arduino core
run: |
mkdir --parents $HOME/.arduino15/packages/digistump/hardware/avr/0.0.7 # dummy release number
# cannot move, since we want to compile the examples in the library subfolder :-)
ln -s $GITHUB_WORKSPACE/digistump-avr/* $HOME/.arduino15/packages/digistump/hardware/avr/0.0.7
#cp --recursive $GITHUB_WORKSPACE/digistump-avr/* $HOME/.arduino15/packages/digistump/hardware/avr/0.0.7/
ls -l --dereference --recursive --all $HOME/.arduino15/packages/digistump/hardware/avr/0.0.7/
- name: Compile all examples
uses: ArminJo/arduino-test-compile@master
with:
required-libraries: ${{ env.REQUIRED_LIBRARIES }}
arduino-board-fqbn: ${{ matrix.arduino-boards-fqbn }}
arduino-platform: digistump:avr,arduino:avr # we require the C compiler from it. See dependencies of package_digistump_index.json
#platform-default-url: ${{ env.PLATFORM_DEFAULT_URL }}
#platform-url: ${{ matrix.platform-url }}
sketches-exclude: ${{ matrix.sketches-exclude }}
build-properties: ${{ toJson(matrix.build-properties) }}
sketch-names: "*.ino"
sketch-names-find-start: digistump-avr/libraries/*/examples/
#debug-install: true