diff --git a/.github/workflows/TestCompile.yml b/.github/workflows/TestCompile.yml index d76ff80..02f4d71 100644 --- a/.github/workflows/TestCompile.yml +++ b/.github/workflows/TestCompile.yml @@ -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 @@ -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: @@ -42,15 +42,19 @@ 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 @@ -58,33 +62,23 @@ jobs: - 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/ \ No newline at end of file + sketch-names-find-start: digistump-avr/libraries/*/examples/ + debug-install: true diff --git a/.github/workflows/TestRelease.yml b/.github/workflows/TestRelease.yml new file mode 100644 index 0000000..c1623a9 --- /dev/null +++ b/.github/workflows/TestRelease.yml @@ -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/ \ No newline at end of file diff --git a/README.md b/README.md index 12fc0d2..b6d76cf 100644 --- a/README.md +++ b/README.md @@ -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: