|
| 1 | +name: Compile Examples |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + paths: |
| 6 | + - ".github/workflows/compile-examples.yml" |
| 7 | + - "megaavr/libraries/**" |
| 8 | + - "megaavr/cores/**" |
| 9 | + - "megaavr/variants/**" |
| 10 | + - "megaavr/*.txt" |
| 11 | + push: |
| 12 | + paths: |
| 13 | + - ".github/workflows/compile-examples.yml" |
| 14 | + - "megaavr/libraries/**" |
| 15 | + - "megaavr/cores/**" |
| 16 | + - "megaavr/variants/**" |
| 17 | + - "megaavr/*.txt" |
| 18 | + # workflow_dispatch event allows the workflow to be triggered manually |
| 19 | + # See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows#workflow_dispatch |
| 20 | + workflow_dispatch: |
| 21 | + # repository_dispatch event allows the workflow to be triggered via the GitHub API |
| 22 | + # See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows#repository_dispatch |
| 23 | + repository_dispatch: |
| 24 | + |
| 25 | +jobs: |
| 26 | + compile-examples: |
| 27 | + runs-on: ubuntu-latest |
| 28 | + |
| 29 | + env: |
| 30 | + platform-name: DxCore:megaavr |
| 31 | + |
| 32 | + all-parts-sketch-paths: | |
| 33 | + - megaavr/libraries/Comparator/examples/Hysteresis |
| 34 | + - megaavr/libraries/Comparator/examples/Internal_reference |
| 35 | + - megaavr/libraries/Comparator/examples/Interrupt |
| 36 | + - megaavr/libraries/Comparator/examples/Simple_comparator |
| 37 | + - megaavr/libraries/DxCore/examples/EnhancedIODemo |
| 38 | + - megaavr/libraries/DxCore/examples/ModernRevSer |
| 39 | + - megaavr/libraries/DxCore/examples/SAMPLENdemo |
| 40 | + - megaavr/libraries/EEPROM/examples/eeprom_clear |
| 41 | + - megaavr/libraries/EEPROM/examples/eeprom_crc |
| 42 | + - megaavr/libraries/EEPROM/examples/eeprom_get |
| 43 | + - megaavr/libraries/EEPROM/examples/eeprom_iteration |
| 44 | + - megaavr/libraries/EEPROM/examples/eeprom_put |
| 45 | + - megaavr/libraries/EEPROM/examples/eeprom_read |
| 46 | + - megaavr/libraries/EEPROM/examples/eeprom_update |
| 47 | + - megaavr/libraries/EEPROM/examples/eeprom_write |
| 48 | + - megaavr/libraries/Logic/examples/Five_input_NOR |
| 49 | + - megaavr/libraries/Logic/examples/Interrupt |
| 50 | + - megaavr/libraries/Logic/examples/LatchNoSeq |
| 51 | + - megaavr/libraries/Logic/examples/LatchNoSeqDx |
| 52 | + - megaavr/libraries/Logic/examples/Three_input_AND |
| 53 | + - megaavr/libraries/Logic/examples/Three_input_NAND |
| 54 | + - megaavr/libraries/Logic/examples/Three_input_OR |
| 55 | + - megaavr/libraries/Logic/examples/Modulate |
| 56 | + - megaavr/libraries/Logic/examples/Oscillate |
| 57 | + - megaavr/libraries/Logic/examples/Two_input_AND |
| 58 | + - megaavr/libraries/Logic/examples/Two_input_NAND |
| 59 | + - megaavr/libraries/Logic/examples/Two_input_OR |
| 60 | + - megaavr/libraries/Servo/examples/Knob |
| 61 | + - megaavr/libraries/Servo/examples/ServoMaxTest |
| 62 | + - megaavr/libraries/Servo/examples/Sweep |
| 63 | + - megaavr/libraries/Servo_DxCore/examples/Knob |
| 64 | + - megaavr/libraries/Servo_DxCore/examples/ServoMaxTest |
| 65 | + - megaavr/libraries/Servo_DxCore/examples/Sweep |
| 66 | + - megaavr/libraries/SoftwareSerial/examples/SoftwareSerialExample |
| 67 | + - megaavr/libraries/SoftwareSerial/examples/TwoPortReceive |
| 68 | + - megaavr/libraries/SPI/examples/BarometricPressureSensor |
| 69 | + - megaavr/libraries/SPI/examples/DigitalPotControl |
| 70 | + - megaavr/libraries/tinyNeoPixel/examples/buttoncycler |
| 71 | + - megaavr/libraries/tinyNeoPixel/examples/simple |
| 72 | + - megaavr/libraries/tinyNeoPixel/examples/strandtest |
| 73 | + - megaavr/libraries/tinyNeoPixel_Static/examples/buttoncycler |
| 74 | + - megaavr/libraries/tinyNeoPixel_Static/examples/simple |
| 75 | + - megaavr/libraries/tinyNeoPixel_Static/examples/strandtest |
| 76 | + - megaavr/libraries/Wire/examples/digital_potentiometer |
| 77 | + - megaavr/libraries/Wire/examples/master_read |
| 78 | + - megaavr/libraries/Wire/examples/master_write |
| 79 | + - megaavr/libraries/Wire/examples/pinswap_via_pins |
| 80 | + - megaavr/libraries/Wire/examples/pinswap_via_swap |
| 81 | + - megaavr/libraries/Wire/examples/SFRRanger_reader |
| 82 | + - megaavr/libraries/Wire/examples/slave_read |
| 83 | + - megaavr/libraries/Wire/examples/slave_write |
| 84 | + - megaavr/libraries/Wire/examples/slave_secondary_address |
| 85 | + - megaavr/libraries/Wire/examples/slave_address_mask |
| 86 | + - megaavr/libraries/Wire/examples/master_multi_address_write |
| 87 | + - megaavr/extras/ci/test-sketch/all/math_macros |
| 88 | + - megaavr/extras/ci/test-sketch/all/test_analog |
| 89 | + - megaavr/extras/ci/test-sketch/all/test_digital |
| 90 | + - megaavr/extras/ci/test-sketch/all/test_tone |
| 91 | + - megaavr/extras/ci/test-sketch/all/test_PWM |
| 92 | + - megaavr/extras/ci/test-sketch/all/test_timekeeping |
| 93 | + avr-da-series-sketch-paths: | |
| 94 | + - megaavr/extras/ci/test-sketch/da/dummysketch |
| 95 | + - megaavr/libraries/ZCD/examples/Interrupt |
| 96 | + - megaavr/libraries/ZCD/examples/Read_state |
| 97 | + - megaavr/libraries/ZCD/examples/Simple_ZCD |
| 98 | + - megaavr/libraries/PTC/examples/mutualcap |
| 99 | + - megaavr/libraries/PTC/examples/mutualcap_low_power |
| 100 | + - megaavr/libraries/PTC/examples/self_and_mutual_mix |
| 101 | + - megaavr/libraries/PTC/examples/selfcap |
| 102 | + - megaavr/libraries/PTC/examples/selfcap_other_nodes_shield |
| 103 | + - megaavr/libraries/PTC/examples/selfcap_with_dedicated_shield |
| 104 | + avr-db-series-sketch-paths: | |
| 105 | + - megaavr/libraries/Opamp/examples/Inverting_amplifier |
| 106 | + - megaavr/libraries/Opamp/examples/Inverting_amplifier_with_follower |
| 107 | + - megaavr/libraries/Opamp/examples/Non_inverting_amplifier |
| 108 | + - megaavr/libraries/Opamp/examples/Voltage_follower |
| 109 | + - megaavr/libraries/ZCD/examples/Interrupt |
| 110 | + - megaavr/libraries/ZCD/examples/Read_state |
| 111 | + - megaavr/libraries/ZCD/examples/Simple_ZCD |
| 112 | + - megaavr/extras/ci/test-sketch/db/dummysketch |
| 113 | + #avr-dd-series-sketch-paths: | |
| 114 | + #avr-ea-series-sketch-paths: | |
| 115 | + optiboot-and-appspm-da-sketch-paths: | |
| 116 | + - megaavr/libraries/Flash/examples/FlashDemo |
| 117 | + optiboot-and-appspm-db-sketch-paths: | |
| 118 | + - megaavr/libraries/Flash/examples/FlashDemo |
| 119 | + optiboot-and-appspm-dd-sketch-paths: | |
| 120 | + - megaavr/libraries/Flash/examples/FlashDemo |
| 121 | + not-on-tca0-millis-lowpin-false-sketch-paths: | |
| 122 | + - megaavr/libraries/DxCore/examples/TCA0Demo |
| 123 | + - megaavr/libraries/DxCore/examples/TCA0Demo2 |
| 124 | + - megaavr/libraries/DxCore/examples/TCA0Demo3 |
| 125 | + - megaavr/libraries/DxCore/examples/TCA0Demo4 |
| 126 | + not-disabled-millis-sketch-paths: | |
| 127 | + - megaavr/libraries/tinyNeoPixel/examples/RGBWstrandtest |
| 128 | + - megaavr/libraries/Wire/examples/register_model |
| 129 | + - megaavr/libraries/Wire/examples/register_model_master |
| 130 | + #internal-osc-sketch-paths: | |
| 131 | + both-twi-enabled-sketch-paths: | |
| 132 | + - megaavr/libraries/Wire/examples/two_master_write |
| 133 | + not-disabled-millis-or-unlocked-flmap-sketch-paths: | |
| 134 | + - megaavr/libraries/DxCore/examples/PWMTest |
| 135 | + strategy: |
| 136 | + fail-fast: false |
| 137 | + |
| 138 | + matrix: |
| 139 | + flash-class: |
| 140 | + - 64 |
| 141 | + - 32 |
| 142 | + - 16 |
| 143 | + device-family: |
| 144 | + - ea |
| 145 | + - eb |
| 146 | + - ec |
| 147 | + - la |
| 148 | + pincount: |
| 149 | + - 64 |
| 150 | + - 48 |
| 151 | + - 32 |
| 152 | + - 28 |
| 153 | + - 20 |
| 154 | + - 14 |
| 155 | + clocksource: |
| 156 | + - internal |
| 157 | + - extclock |
| 158 | + - crystal |
| 159 | + int-osc: |
| 160 | + - 16 |
| 161 | + - 24 |
| 162 | + overclock-osc: |
| 163 | + - 16 |
| 164 | + - 32 |
| 165 | + # Filter out these matrix combinations |
| 166 | + exclude: |
| 167 | + # Things we cant get yet |
| 168 | + - device-family: ec |
| 169 | + - device-family: la |
| 170 | + # Things w/out xtals |
| 171 | + - device-family: eb |
| 172 | + clocksource: crystal |
| 173 | + # Pincounts |
| 174 | + - device-family: eb |
| 175 | + pincount: 64 |
| 176 | + - device-family: eb |
| 177 | + pincount: 48 |
| 178 | + - device-family: ea |
| 179 | + pincount: 64 |
| 180 | + - device-family: la |
| 181 | + pincount: 64 |
| 182 | + - device-family: la |
| 183 | + pincount: 48 |
| 184 | + - device-family: ea |
| 185 | + pincount: 14 |
| 186 | + - device-family: ea |
| 187 | + pincount: 20 |
| 188 | + #flashsizes |
| 189 | + - device-family: eb |
| 190 | + flash-class: 64 |
| 191 | + - device-family: la |
| 192 | + flash-class: 64 |
| 193 | + |
| 194 | + steps: |
| 195 | + - name: Checkout repository |
| 196 | + uses: actions/checkout@v4 |
| 197 | + |
| 198 | + # See: https://github.com/arduino/compile-sketches/README.md |
| 199 | + |
| 200 | + - name: Compile examples (rated max speed, nothing weird) |
| 201 | + uses: arduino/compile-sketches@main |
| 202 | + with: |
| 203 | + cli-version: 0.33.0 |
| 204 | + 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 |
| 205 | + sketch-paths: | |
| 206 | + # It's necessary to jump through some hoops to dynamically generate the env object keys to define the non-universal sketch paths |
| 207 | + # https://docs.github.com/en/free-pro-team@latest/actions/reference/context-and-expression-syntax-for-github-actions#format |
| 208 | + ${{ env.all-parts-sketch-paths }} |
| 209 | + ${{ env[format('avr-{0}-series-sketch-paths', matrix.device-family)] }} |
| 210 | + ${{ env[format('not-on-tca0-millis-lowpin-{0}-sketch-paths', matrix.pincount < 28)] }} |
| 211 | + ${{ env.not-disabled-millis-sketch-paths}} |
| 212 | + ${{ env.not-disabled-millis-or-unlocked-flmap-sketch-paths}} |
| 213 | + platforms: | |
| 214 | + # Install DxCore via Boards Manager for the toolchain |
| 215 | + - source-url: http://drazzy.com/package_drazzy.com_index.json |
| 216 | + name: ${{ env.platform-name }} |
| 217 | + # Overwrite the DxCore release version with the platform from the local path |
| 218 | + - source-path: megaavr |
| 219 | + name: ${{ env.platform-name }} |
| 220 | + libraries: | |
| 221 | + # The sketches don't have any external library dependencies, so just define an empty array |
| 222 | + - |
| 223 | + verbose: false |
| 224 | + enable-deltas-report: true |
| 225 | + github-token: ${{ secrets.GITHUB_TOKEN }} |
| 226 | + enable-warnings-report: true |
| 227 | + sketches-report-path: sketches-reports |
| 228 | + - name: Compile examples (overclocked to the max, tcb1 millis, minimal printf, old attachInterrupt, full appspm) |
| 229 | + uses: arduino/compile-sketches@main |
| 230 | + with: |
| 231 | + cli-version: 0.33.0 |
| 232 | + 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 |
| 233 | + sketch-paths: | |
| 234 | + # It's necessary to jump through some hoops to dynamically generate the env object keys to define the non-universal sketch paths |
| 235 | + # https://docs.github.com/en/free-pro-team@latest/actions/reference/context-and-expression-syntax-for-github-actions#format |
| 236 | + ${{ env.all-parts-sketch-paths }} |
| 237 | + ${{ env[format('avr-{0}-series-sketch-paths', matrix.device-family)] }} |
| 238 | + ${{ env[format('optiboot-and-appspm-{0}-sketch-paths', matrix.device-family)] }} |
| 239 | + ${{ env[format('not-on-tca0-millis-lowpin-{0}-sketch-paths', matrix.pincount < 28)] }} |
| 240 | + ${{ env.not-disabled-millis-sketch-paths}} |
| 241 | + ${{ env.not-disabled-millis-or-unlocked-flmap-sketch-paths}} |
| 242 | + platforms: | |
| 243 | + # Install DxCore via Boards Manager for the toolchain |
| 244 | + - source-url: http://drazzy.com/package_drazzy.com_index.json |
| 245 | + name: ${{ env.platform-name }} |
| 246 | + # Overwrite the DxCore release version with the platform from the local path |
| 247 | + - source-path: megaavr |
| 248 | + name: ${{ env.platform-name }} |
| 249 | + libraries: | |
| 250 | + # The sketches don't have any external library dependencies, so just define an empty array |
| 251 | + - |
| 252 | + verbose: false |
| 253 | + enable-deltas-report: true |
| 254 | + github-token: ${{ secrets.GITHUB_TOKEN }} |
| 255 | + enable-warnings-report: true |
| 256 | + sketches-report-path: sketches-reports |
| 257 | + - name: Compile examples (20 MHz, disable millis, sized appspm, flmap L0, wire mors) |
| 258 | + uses: arduino/compile-sketches@main |
| 259 | + with: |
| 260 | + 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 |
| 261 | + sketch-paths: | |
| 262 | + # It's necessary to jump through some hoops to dynamically generate the env object keys to define the non-universal sketch paths |
| 263 | + # https://docs.github.com/en/free-pro-team@latest/actions/reference/context-and-expression-syntax-for-github-actions#format |
| 264 | + ${{ env.all-parts-sketch-paths }} |
| 265 | + ${{ env[format('avr-{0}-series-sketch-paths', matrix.device-family)] }} |
| 266 | + ${{ env[format('optiboot-and-appspm-{0}-sketch-paths', matrix.device-family)] }} |
| 267 | + ${{ env[format('not-on-tca0-millis-lowpin-{0}-sketch-paths', matrix.pincount < 28)] }} |
| 268 | + platforms: | |
| 269 | + # Install DxCore via Boards Manager for the toolchain |
| 270 | + - source-url: http://drazzy.com/package_drazzy.com_index.json |
| 271 | + name: ${{ env.platform-name }} |
| 272 | + # Overwrite the DxCore release version with the platform from the local path |
| 273 | + - source-path: megaavr |
| 274 | + name: ${{ env.platform-name }} |
| 275 | + libraries: | |
| 276 | + # The sketches don't have any external library dependencies, so just define an empty array |
| 277 | + - |
| 278 | + verbose: false |
| 279 | + enable-deltas-report: true |
| 280 | + github-token: ${{ secrets.GITHUB_TOKEN }} |
| 281 | + enable-warnings-report: true |
| 282 | + sketches-report-path: sketches-reports |
| 283 | + - name: Compile examples (8 MHz, optiboot (if available), tca0 millis, full printf, and manual attachInterrupt) |
| 284 | + if: matrix.device-family != 'ea' && matrix.device-family != 'eb' |
| 285 | + uses: arduino/compile-sketches@main |
| 286 | + with: |
| 287 | + cli-version: 0.33.0 |
| 288 | + 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 |
| 289 | + sketch-paths: | |
| 290 | + # It's necessary to jump through some hoops to dynamically generate the env object keys to define the non-universal sketch paths |
| 291 | + # https://docs.github.com/en/free-pro-team@latest/actions/reference/context-and-expression-syntax-for-github-actions#format |
| 292 | + ${{ env.all-parts-sketch-paths }} |
| 293 | + ${{ env[format('avr-{0}-series-sketch-paths', matrix.device-family)] }} |
| 294 | + ${{ env[format('optiboot-and-appspm-{0}-sketch-paths', matrix.device-family)] }} |
| 295 | + ${{ env.not-disabled-millis-sketch-paths}} |
| 296 | + platforms: | |
| 297 | + # Install DxCore via Boards Manager for the toolchain |
| 298 | + - source-url: http://drazzy.com/package_drazzy.com_index.json |
| 299 | + name: ${{ env.platform-name }} |
| 300 | + # Overwrite the DxCore release version with the platform from the local path |
| 301 | + - source-path: megaavr |
| 302 | + name: ${{ env.platform-name }} |
| 303 | + libraries: | |
| 304 | + # The sketches don't have any external library dependencies, so just define an empty array |
| 305 | + - |
| 306 | + verbose: false |
| 307 | + enable-deltas-report: true |
| 308 | + github-token: ${{ secrets.GITHUB_TOKEN }} |
| 309 | + enable-warnings-report: true |
| 310 | + sketches-report-path: sketches-reports |
0 commit comments