Skip to content

Commit

Permalink
Test repo as core without platform-url
Browse files Browse the repository at this point in the history
  • Loading branch information
ArminJo committed Nov 14, 2020
1 parent 62d6d55 commit 12dc5d4
Show file tree
Hide file tree
Showing 3 changed files with 94 additions and 29 deletions.
52 changes: 23 additions & 29 deletions .github/workflows/TestCompile.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# TestCompile.yml
# Github workflow script to test compile all examples of an Arduino library repository.
# Github workflow script to test compile all examples of an Arduino core repository.
#
# Copyright (C) 2020 Armin Joachimsmeyer
# https://github.com/ArminJo/Github-Actions
Expand All @@ -20,7 +20,7 @@ jobs:
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
# 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:

Expand All @@ -42,49 +42,43 @@ jobs:
- digistump:avr:MHETtiny88 # Chinese MH-Tiny ATTiny88

# Specify parameters for each board.
# With examples-exclude you may exclude specific examples for a board. Use a comma separated list.
# 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
examples-exclude: Blink # All Wire examples
sketches-exclude: Blink # All Wire examples

- arduino-boards-fqbn: digistump:avr:MHETtiny88 # ATtiny88 Chino clone board @16 MHz
# Examples to exclude because of incompatible I2C Hardware, the original library uses TiniWireM library. SoftPwm is not required and not working
examples-exclude: WiiClassicJoystick,BasicUsage,DigisparkOLED,SoftPwm13Pins,TinySoftPwmDemo,DigiUSB2LCD,DigisparkUSBDemo,ArduinoNunchukDemo,DigisparkJoystickDemo
# 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

# Do not cancel all jobs / architectures if one job fails
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@master

# Use the arduino-test-compile script, because it is faster
# - name: Compile all examples using the bash script arduino-test-compile.sh
# env:
# # Passing parameters to the script by setting the appropriate ENV_* variables.
# ENV_REQUIRED_LIBRARIES: ${{ env.REQUIRED_LIBRARIES }}
# ENV_ARDUINO_BOARD_FQBN: ${{ matrix.arduino-boards-fqbn }}
# ENV_PLATFORM_DEFAULT_URL: ${{ env.PLATFORM_DEFAULT_URL }}
# ENV_PLATFORM_URL: ${{ matrix.platform-url }}
# ENV_EXAMPLES_EXCLUDE: ${{ matrix.examples-exclude }}
# ENV_EXAMPLES_BUILD_PROPERTIES: ${{ toJson(matrix.examples-build-properties) }}
# ENV_SKETCH_NAMES: "*.ino"
# ENV_SKETCH_NAMES_FIND_START: digistump-avr/libraries/*/examples/
#
# run: |
# wget --quiet https://raw.githubusercontent.com/ArminJo/arduino-test-compile/master/arduino-test-compile.sh
# ls -l arduino-test-compile.sh
# chmod +x arduino-test-compile.sh
# ./arduino-test-compile.sh
- 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 :-)
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 }}
platform-default-url: ${{ env.PLATFORM_DEFAULT_URL }}
platform-url: ${{ matrix.platform-url }}
examples-exclude: ${{ matrix.examples-exclude }}
examples-build-properties: ${{ toJson(matrix.examples-build-properties) }}
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/
sketch-names-find-start: digistump-avr/libraries/*/examples/
debug-install: true
69 changes: 69 additions & 0 deletions .github/workflows/TestRelease.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# TestRelease.yml
# Github workflow script to test compile all examples of an Arduino library repository.
#
# Copyright (C) 2020 Armin Joachimsmeyer
# https://github.com/ArminJo/Github-Actions
#

# This is the name of the workflow, visible on GitHub UI.
name: TestRelease
on:
push: # see: https://help.github.com/en/actions/reference/events-that-trigger-workflows#pull-request-event-pull_request
paths:
- 'package_digistump_index.json'
release:
types: [released, prereleased]
jobs:
build:
name: Test release 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
# STM32: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

- arduino-boards-fqbn: digistump:avr:MHETtiny88 # ATtiny88 Chino clone board @16 MHz
# Examples to exclude because of incompatible I2C Hardware, the original library uses TiniWireM library. SoftPwm is not required and not working
sketches-exclude: WiiClassicJoystick,BasicUsage,DigisparkOLED,SoftPwm13Pins,TinySoftPwmDemo,DigiUSB2LCD,DigisparkUSBDemo,ArduinoNunchukDemo,DigisparkJoystickDemo

# Do not cancel all jobs / architectures if one job fails
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@master

- name: Compile all examples
uses: ArminJo/arduino-test-compile@master
with:
required-libraries: ${{ env.REQUIRED_LIBRARIES }}
arduino-board-fqbn: ${{ matrix.arduino-boards-fqbn }}
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/
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ Available as Arduino Board Manager entry "Digistump AVR Boards" using the Board
### [Version 1.7.0 ](https://github.com/ArminJo/DigistumpArduino/releases) - work in progress

[![TestCompile](https://github.com/ArminJo/DigistumpArduino/workflows/TestCompile/badge.svg)](https://github.com/ArminJo/DigistumpArduino/actions)
[![Commits since latest](https://img.shields.io/github/commits-since/ArminJo/DigistumpArduino/latest)](https://github.com/ArminJo/DigistumpArduino/commits/master)
[![Hit Counter](https://hitcounter.pythonanywhere.com/count/tag.svg?url=https://github.com/ArminJo/DigistumpArduino)](https://github.com/brentvollebregt/hit-counter)

Another **great core for ATtinies** with ongoing support is the [ATTinyCore](https://github.com/SpenceKonde/ATTinyCore) of Spence Konde, which **currently added micronucleus support**. Use the Board Manager URL: http://drazzy.com/package_drazzy.com_index.json for it.

## Reduced code size was enabled by the following changes:
Expand Down

0 comments on commit 12dc5d4

Please sign in to comment.