Fix example not compiling; Update Changelog #598
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
name: Compile Examples | |
on: | |
pull_request: | |
paths: | |
- ".github/workflows/compile-examples.yml" | |
- "megaavr/libraries/**" | |
- "megaavr/cores/**" | |
- "megaavr/variants/**" | |
- "megaavr/*.txt" | |
push: | |
paths: | |
- ".github/workflows/compile-examples.yml" | |
- "megaavr/libraries/**" | |
- "megaavr/cores/**" | |
- "megaavr/variants/**" | |
- "megaavr/*.txt" | |
# workflow_dispatch event allows the workflow to be triggered manually | |
# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows#workflow_dispatch | |
workflow_dispatch: | |
# repository_dispatch event allows the workflow to be triggered via the GitHub API | |
# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows#repository_dispatch | |
repository_dispatch: | |
jobs: | |
compile-examples: | |
runs-on: ubuntu-latest | |
env: | |
platform-name: DxCore:megaavr | |
all-parts-sketch-paths: | | |
- megaavr/libraries/Comparator/examples/Hysteresis | |
- megaavr/libraries/Comparator/examples/Internal_reference | |
- megaavr/libraries/Comparator/examples/Interrupt | |
- megaavr/libraries/Comparator/examples/Simple_comparator | |
- megaavr/libraries/DxCore/examples/EnhancedIODemo | |
- megaavr/libraries/DxCore/examples/ModernRevSer | |
- megaavr/libraries/DxCore/examples/SAMPLENdemo | |
- megaavr/libraries/EEPROM/examples/eeprom_clear | |
- megaavr/libraries/EEPROM/examples/eeprom_crc | |
- megaavr/libraries/EEPROM/examples/eeprom_get | |
- megaavr/libraries/EEPROM/examples/eeprom_iteration | |
- megaavr/libraries/EEPROM/examples/eeprom_put | |
- megaavr/libraries/EEPROM/examples/eeprom_read | |
- megaavr/libraries/EEPROM/examples/eeprom_update | |
- megaavr/libraries/EEPROM/examples/eeprom_write | |
- megaavr/libraries/Logic/examples/Five_input_NOR | |
- megaavr/libraries/Logic/examples/Interrupt | |
- megaavr/libraries/Logic/examples/LatchNoSeq | |
- megaavr/libraries/Logic/examples/LatchNoSeqDx | |
- megaavr/libraries/Logic/examples/Three_input_AND | |
- megaavr/libraries/Logic/examples/Three_input_NAND | |
- megaavr/libraries/Logic/examples/Three_input_OR | |
- megaavr/libraries/Logic/examples/Modulate | |
- megaavr/libraries/Logic/examples/Oscillate | |
- megaavr/libraries/Logic/examples/Two_input_AND | |
- megaavr/libraries/Logic/examples/Two_input_NAND | |
- megaavr/libraries/Logic/examples/Two_input_OR | |
- megaavr/libraries/Servo/examples/Knob | |
- megaavr/libraries/Servo/examples/ServoMaxTest | |
- megaavr/libraries/Servo/examples/Sweep | |
- megaavr/libraries/Servo_DxCore/examples/Knob | |
- megaavr/libraries/Servo_DxCore/examples/ServoMaxTest | |
- megaavr/libraries/Servo_DxCore/examples/Sweep | |
- megaavr/libraries/SoftwareSerial/examples/SoftwareSerialExample | |
- megaavr/libraries/SoftwareSerial/examples/TwoPortReceive | |
- megaavr/libraries/SPI/examples/BarometricPressureSensor | |
- megaavr/libraries/SPI/examples/DigitalPotControl | |
- megaavr/libraries/tinyNeoPixel/examples/buttoncycler | |
- megaavr/libraries/tinyNeoPixel/examples/simple | |
- megaavr/libraries/tinyNeoPixel/examples/strandtest | |
- megaavr/libraries/tinyNeoPixel_Static/examples/buttoncycler | |
- megaavr/libraries/tinyNeoPixel_Static/examples/simple | |
- megaavr/libraries/tinyNeoPixel_Static/examples/strandtest | |
- megaavr/libraries/Wire/examples/digital_potentiometer | |
- megaavr/libraries/Wire/examples/master_read | |
- megaavr/libraries/Wire/examples/master_write | |
- megaavr/libraries/Wire/examples/pinswap_via_pins | |
- megaavr/libraries/Wire/examples/pinswap_via_swap | |
- megaavr/libraries/Wire/examples/SFRRanger_reader | |
- megaavr/libraries/Wire/examples/slave_read | |
- megaavr/libraries/Wire/examples/slave_write | |
- megaavr/libraries/Wire/examples/slave_secondary_address | |
- megaavr/libraries/Wire/examples/slave_address_mask | |
- megaavr/libraries/Wire/examples/master_multi_address_write | |
- megaavr/extras/ci/test-sketch/all/math_macros | |
- megaavr/extras/ci/test-sketch/all/test_analog | |
- megaavr/extras/ci/test-sketch/all/test_digital | |
- megaavr/extras/ci/test-sketch/all/test_tone | |
- megaavr/extras/ci/test-sketch/all/test_PWM | |
- megaavr/extras/ci/test-sketch/all/test_timekeeping | |
avr-da-series-sketch-paths: | | |
- megaavr/extras/ci/test-sketch/da/dummysketch | |
- megaavr/libraries/ZCD/examples/Interrupt | |
- megaavr/libraries/ZCD/examples/Read_state | |
- megaavr/libraries/ZCD/examples/Simple_ZCD | |
- megaavr/libraries/PTC/examples/mutualcap | |
- megaavr/libraries/PTC/examples/mutualcap_low_power | |
- megaavr/libraries/PTC/examples/self_and_mutual_mix | |
- megaavr/libraries/PTC/examples/selfcap | |
- megaavr/libraries/PTC/examples/selfcap_other_nodes_shield | |
- megaavr/libraries/PTC/examples/selfcap_with_dedicated_shield | |
avr-db-series-sketch-paths: | | |
- megaavr/libraries/Opamp/examples/Inverting_amplifier | |
- megaavr/libraries/Opamp/examples/Inverting_amplifier_with_follower | |
- megaavr/libraries/Opamp/examples/Non_inverting_amplifier | |
- megaavr/libraries/Opamp/examples/Voltage_follower | |
- megaavr/libraries/ZCD/examples/Interrupt | |
- megaavr/libraries/ZCD/examples/Read_state | |
- megaavr/libraries/ZCD/examples/Simple_ZCD | |
- megaavr/extras/ci/test-sketch/db/dummysketch | |
#avr-dd-series-sketch-paths: | | |
#avr-ea-series-sketch-paths: | | |
optiboot-and-appspm-da-sketch-paths: | | |
- megaavr/libraries/Flash/examples/FlashDemo | |
optiboot-and-appspm-db-sketch-paths: | | |
- megaavr/libraries/Flash/examples/FlashDemo | |
optiboot-and-appspm-dd-sketch-paths: | | |
- megaavr/libraries/Flash/examples/FlashDemo | |
not-on-tca0-millis-lowpin-false-sketch-paths: | | |
- megaavr/libraries/DxCore/examples/TCA0Demo | |
- megaavr/libraries/DxCore/examples/TCA0Demo2 | |
- megaavr/libraries/DxCore/examples/TCA0Demo3 | |
- megaavr/libraries/DxCore/examples/TCA0Demo4 | |
not-disabled-millis-sketch-paths: | | |
- megaavr/libraries/tinyNeoPixel/examples/RGBWstrandtest | |
- megaavr/libraries/Wire/examples/register_model | |
- megaavr/libraries/Wire/examples/register_model_master | |
#internal-osc-sketch-paths: | | |
both-twi-enabled-sketch-paths: | | |
- megaavr/libraries/Wire/examples/two_master_write | |
not-disabled-millis-or-unlocked-flmap-sketch-paths: | | |
- megaavr/libraries/DxCore/examples/PWMTest | |
strategy: | |
fail-fast: false | |
matrix: | |
flash-class: | |
- 128 | |
- 64 | |
- 32 | |
- 16 | |
- 8 | |
device-family: | |
- da | |
- db | |
- dd | |
- du | |
- ea | |
- eb | |
pincount: | |
- 64 | |
- 48 | |
- 32 | |
- 28 | |
- 20 | |
- 14 | |
clocksource: | |
- internal | |
- extclock | |
- crystal | |
int-osc: | |
- 20 | |
- 24 | |
overclock-osc: | |
- 16 | |
- 32 | |
- 48 | |
# Filter out these matrix combinations | |
exclude: | |
# Things w/out xtals | |
- device-family: da | |
clocksource: crystal | |
- device-family: eb | |
clocksource: crystal | |
# DA limits. No 8/16k flash, no 32k 64-pin. No 20/14 pin. | |
- device-family: da | |
flash-class: 32 | |
pincount: 64 | |
- device-family: da | |
flash-class: 16 | |
- device-family: da | |
flash-class: 8 | |
- device-family: da | |
pincount: 20 | |
- device-family: da | |
pincount: 14 | |
# DB limits. No 8/16k flash, no 32k 64-pin. No 20/14 pin. | |
- device-family: db | |
flash-class: 32 | |
pincount: 64 | |
- device-family: db | |
flash-class: 16 | |
- device-family: db | |
flash-class: 8 | |
- device-family: db | |
pincount: 20 | |
- device-family: db | |
pincount: 14 | |
# DD limits. No 128k/8k flash, no 64/48 pin. | |
- device-family: dd | |
flash-class: 128 | |
- device-family: dd | |
flash-class: 8 | |
- device-family: dd | |
pincount: 64 | |
- device-family: dd | |
pincount: 48 | |
# DU limits. No 128k/8k flash, no 64/48 pin. No 64k 20/14pin. | |
- device-family: du | |
flash-class: 128 | |
- device-family: du | |
flash-class: 8 | |
- device-family: du | |
pincount: 64 | |
- device-family: du | |
pincount: 48 | |
- device-family: du | |
pincount: 20 | |
flash-class: 64 | |
- device-family: du | |
pincount: 14 | |
flash-class: 64 | |
# EA limits. No 128k flash, no 64 pin, no 20/14 pin | |
- device-family: ea | |
flash-class: 128 | |
- device-family: ea | |
pincount: 64 | |
- device-family: ea | |
pincount: 20 | |
- device-family: ea | |
pincount: 14 | |
# Unclear if AVR8EAxx really coming. | |
- device-family: ea | |
flash-class: 8 | |
# EB limits. No 128k, 64k flash, no 64/48 pin | |
- device-family: eb | |
flash-class: 128 | |
- device-family: eb | |
flash-class: 64 | |
# Only headers for 16EB released. | |
- device-family: eb | |
flash-class: 32 | |
# 8-32k is expected. | |
- device-family: eb | |
flash-class: 8 | |
# ugly Dx/Ex hack. Dx excludes 20 MHz internal osc, Ex 24 MHz. | |
- int-osc: 20 | |
device-family: da | |
- int-osc: 20 | |
device-family: db | |
- int-osc: 20 | |
device-family: dd | |
- int-osc: 24 | |
device-family: ea | |
- int-osc: 24 | |
device-family: eb | |
# ugly Dx/Ex hack. No 16 MHz DB xtal tests, DA ext 16 MHz, DD 16 MHz xtal. Ex @ 48 excluded further down. | |
- overclock-osc: 48 | |
clocksource: internal | |
- overclock-osc: 48 | |
device-family: ea | |
- overclock-osc: 48 | |
device-family: eb | |
- overclock-osc: 48 | |
device-family: dd | |
clocksource: crystal | |
- overclock-osc: 48 | |
device-family: db | |
clocksource: extclock | |
- overclock-osc: 48 | |
device-family: da | |
clocksource: extclock | |
- overclock-osc: 32 | |
device-family: db | |
clocksource: internal | |
- overclock-osc: 32 | |
device-family: ea | |
clocksource: internal | |
- overclock-osc: 32 | |
device-family: eb | |
clocksource: internal | |
- overclock-osc: 32 | |
device-family: db | |
clocksource: crystal | |
- overclock-osc: 32 | |
device-family: dd | |
clocksource: crystal | |
- overclock-osc: 32 | |
device-family: ea | |
clocksource: crystal | |
- overclock-osc: 32 | |
device-family: da | |
clocksource: extclock | |
- overclock-osc: 32 | |
device-family: dd | |
clocksource: extclock | |
- overclock-osc: 32 | |
device-family: eb | |
clocksource: extclock | |
- overclock-osc: 16 | |
device-family: da | |
clocksource: internal | |
- overclock-osc: 16 | |
device-family: dd | |
clocksource: internal | |
- overclock-osc: 16 | |
device-family: db | |
clocksource: crystal | |
- overclock-osc: 16 | |
device-family: db | |
clocksource: extclock | |
- overclock-osc: 16 | |
device-family: dd | |
clocksource: extclock | |
- overclock-osc: 16 | |
device-family: ea | |
clocksource: extclock | |
# EB is not yet shipping and no datasheet is available. | |
- device-family: eb | |
# DU headers not even out - all clocking decisions TBD. | |
- device-family: du | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
# See: https://github.com/arduino/compile-sketches/README.md | |
- name: Compile examples (rated max speed, nothing weird) | |
uses: arduino/compile-sketches@main | |
with: | |
cli-version: 0.33.0 | |
fqbn: ${{ env.platform-name }}:avr${{ matrix.device-family }}:chip=avr${{ matrix.flash-class }}${{ matrix.device-family }}${{ matrix.pincount }},clock=${{matrix.int-osc}}${{ matrix.clocksource }},wiremode=mands,flmap=lockdefault | |
sketch-paths: | | |
# It's necessary to jump through some hoops to dynamically generate the env object keys to define the non-universal sketch paths | |
# https://docs.github.com/en/free-pro-team@latest/actions/reference/context-and-expression-syntax-for-github-actions#format | |
${{ env.all-parts-sketch-paths }} | |
${{ env[format('avr-{0}-series-sketch-paths', matrix.device-family)] }} | |
${{ env[format('not-on-tca0-millis-lowpin-{0}-sketch-paths', matrix.pincount < 28)] }} | |
${{ env.not-disabled-millis-sketch-paths}} | |
${{ env.not-disabled-millis-or-unlocked-flmap-sketch-paths}} | |
platforms: | | |
# Install DxCore via Boards Manager for the toolchain | |
- source-url: http://drazzy.com/package_drazzy.com_index.json | |
name: ${{ env.platform-name }} | |
# Overwrite the DxCore release version with the platform from the local path | |
- source-path: megaavr | |
name: ${{ env.platform-name }} | |
libraries: | | |
# The sketches don't have any external library dependencies, so just define an empty array | |
- | |
verbose: false | |
enable-deltas-report: true | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
enable-warnings-report: true | |
sketches-report-path: sketches-reports | |
- name: Compile examples (overclocked to the max, tcb1 millis, minimal printf, old attachInterrupt, full appspm) | |
uses: arduino/compile-sketches@main | |
with: | |
cli-version: 0.33.0 | |
fqbn: ${{ env.platform-name }}:avr${{ matrix.device-family }}:chip=avr${{ matrix.flash-class }}${{ matrix.device-family }}${{ matrix.pincount }},clock=${{ matrix.overclock-osc }}${{ matrix.clocksource }},millis=tcb1,printf=minimal,wiremode=mors,attach=oldversion,appspm=full,flmap=lockdefault | |
sketch-paths: | | |
# It's necessary to jump through some hoops to dynamically generate the env object keys to define the non-universal sketch paths | |
# https://docs.github.com/en/free-pro-team@latest/actions/reference/context-and-expression-syntax-for-github-actions#format | |
${{ env.all-parts-sketch-paths }} | |
${{ env[format('avr-{0}-series-sketch-paths', matrix.device-family)] }} | |
${{ env[format('optiboot-and-appspm-{0}-sketch-paths', matrix.device-family)] }} | |
${{ env[format('not-on-tca0-millis-lowpin-{0}-sketch-paths', matrix.pincount < 28)] }} | |
${{ env.not-disabled-millis-sketch-paths}} | |
${{ env.not-disabled-millis-or-unlocked-flmap-sketch-paths}} | |
platforms: | | |
# Install DxCore via Boards Manager for the toolchain | |
- source-url: http://drazzy.com/package_drazzy.com_index.json | |
name: ${{ env.platform-name }} | |
# Overwrite the DxCore release version with the platform from the local path | |
- source-path: megaavr | |
name: ${{ env.platform-name }} | |
libraries: | | |
# The sketches don't have any external library dependencies, so just define an empty array | |
- | |
verbose: false | |
enable-deltas-report: true | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
enable-warnings-report: true | |
sketches-report-path: sketches-reports | |
- name: Compile examples (20 MHz, disable millis, sized appspm, flmap L0, wire mors) | |
uses: arduino/compile-sketches@main | |
with: | |
fqbn: ${{ env.platform-name }}:avr${{ matrix.device-family }}:chip=avr${{ matrix.flash-class }}${{ matrix.device-family }}${{ matrix.pincount }},clock=20${{ matrix.clocksource }},millis=disabled,appspm=24plus,wiremode=mors,flmap=locksection0 | |
sketch-paths: | | |
# It's necessary to jump through some hoops to dynamically generate the env object keys to define the non-universal sketch paths | |
# https://docs.github.com/en/free-pro-team@latest/actions/reference/context-and-expression-syntax-for-github-actions#format | |
${{ env.all-parts-sketch-paths }} | |
${{ env[format('avr-{0}-series-sketch-paths', matrix.device-family)] }} | |
${{ env[format('optiboot-and-appspm-{0}-sketch-paths', matrix.device-family)] }} | |
${{ env[format('not-on-tca0-millis-lowpin-{0}-sketch-paths', matrix.pincount < 28)] }} | |
platforms: | | |
# Install DxCore via Boards Manager for the toolchain | |
- source-url: http://drazzy.com/package_drazzy.com_index.json | |
name: ${{ env.platform-name }} | |
# Overwrite the DxCore release version with the platform from the local path | |
- source-path: megaavr | |
name: ${{ env.platform-name }} | |
libraries: | | |
# The sketches don't have any external library dependencies, so just define an empty array | |
- | |
verbose: false | |
enable-deltas-report: true | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
enable-warnings-report: true | |
sketches-report-path: sketches-reports | |
- name: Compile examples (8 MHz, optiboot (if available), tca0 millis, full printf, and manual attachInterrupt) | |
if: matrix.device-family != 'ea' && matrix.device-family != 'eb' | |
uses: arduino/compile-sketches@main | |
with: | |
cli-version: 0.33.0 | |
fqbn: ${{ env.platform-name }}:avr${{ matrix.device-family }}opti:chip=avr${{ matrix.flash-class }}${{ matrix.device-family }}${{ matrix.pincount }},clock=8${{ matrix.clocksource }},millis=tca0,printf=full,attach=manual,wiremode=mands,flmap=unlocked | |
sketch-paths: | | |
# It's necessary to jump through some hoops to dynamically generate the env object keys to define the non-universal sketch paths | |
# https://docs.github.com/en/free-pro-team@latest/actions/reference/context-and-expression-syntax-for-github-actions#format | |
${{ env.all-parts-sketch-paths }} | |
${{ env[format('avr-{0}-series-sketch-paths', matrix.device-family)] }} | |
${{ env[format('optiboot-and-appspm-{0}-sketch-paths', matrix.device-family)] }} | |
${{ env.not-disabled-millis-sketch-paths}} | |
platforms: | | |
# Install DxCore via Boards Manager for the toolchain | |
- source-url: http://drazzy.com/package_drazzy.com_index.json | |
name: ${{ env.platform-name }} | |
# Overwrite the DxCore release version with the platform from the local path | |
- source-path: megaavr | |
name: ${{ env.platform-name }} | |
libraries: | | |
# The sketches don't have any external library dependencies, so just define an empty array | |
- | |
verbose: false | |
enable-deltas-report: true | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
enable-warnings-report: true | |
sketches-report-path: sketches-reports |