| 1 |
name: Compile Examples |
| 2 |
|
| 3 |
# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows |
| 4 |
on: |
| 5 |
push: |
| 6 |
paths: |
| 7 |
- ".github/workflows/compile-platform-examples.ya?ml" |
| 8 |
- "cores/**" |
| 9 |
- "libraries/**" |
| 10 |
- "variants/**" |
| 11 |
- "boards.txt" |
| 12 |
- "platform.txt" |
| 13 |
pull_request: |
| 14 |
paths: |
| 15 |
- ".github/workflows/compile-platform-examples.ya?ml" |
| 16 |
- "cores/**" |
| 17 |
- "libraries/**" |
| 18 |
- "variants/**" |
| 19 |
- "boards.txt" |
| 20 |
- "platform.txt" |
| 21 |
workflow_dispatch: |
| 22 |
repository_dispatch: |
| 23 |
|
| 24 |
jobs: |
| 25 |
build: |
| 26 |
name: ${{ matrix.board.fqbn }} |
| 27 |
runs-on: ubuntu-latest |
| 28 |
|
| 29 |
env: |
| 30 |
SKETCHES_REPORTS_PATH: sketches-reports |
| 31 |
|
| 32 |
strategy: |
| 33 |
fail-fast: false |
| 34 |
|
| 35 |
matrix: |
| 36 |
board: |
| 37 |
- fqbn: arduino:avr:yun |
| 38 |
artifact-name-suffix: arduino-avr-yun |
| 39 |
serial: true |
| 40 |
softwareserial: true |
| 41 |
- fqbn: arduino:avr:uno |
| 42 |
artifact-name-suffix: arduino-avr-uno |
| 43 |
serial: true |
| 44 |
softwareserial: true |
| 45 |
- fqbn: arduino:avr:diecimila:cpu=atmega328 |
| 46 |
artifact-name-suffix: arduino-avr-diecimila-cpu-atmega328 |
| 47 |
serial: true |
| 48 |
softwareserial: true |
| 49 |
- fqbn: arduino:avr:diecimila:cpu=atmega168 |
| 50 |
artifact-name-suffix: arduino-avr-diecimila-cpu-atmega168 |
| 51 |
serial: true |
| 52 |
softwareserial: true |
| 53 |
- fqbn: arduino:avr:nano:cpu=atmega328 |
| 54 |
artifact-name-suffix: arduino-avr-nano-cpu-atmega328 |
| 55 |
serial: true |
| 56 |
softwareserial: true |
| 57 |
- fqbn: arduino:avr:nano:cpu=atmega328old |
| 58 |
artifact-name-suffix: arduino-avr-nano-cpu-atmega328old |
| 59 |
serial: true |
| 60 |
softwareserial: true |
| 61 |
- fqbn: arduino:avr:nano:cpu=atmega168 |
| 62 |
artifact-name-suffix: arduino-avr-nano-cpu-atmega168 |
| 63 |
serial: true |
| 64 |
softwareserial: true |
| 65 |
- fqbn: arduino:avr:mega:cpu=atmega2560 |
| 66 |
artifact-name-suffix: arduino-avr-mega-cpu-atmega2560 |
| 67 |
serial: true |
| 68 |
softwareserial: true |
| 69 |
- fqbn: arduino:avr:mega:cpu=atmega1280 |
| 70 |
artifact-name-suffix: arduino-avr-mega-cpu-atmega1280 |
| 71 |
serial: true |
| 72 |
softwareserial: true |
| 73 |
- fqbn: arduino:avr:megaADK |
| 74 |
artifact-name-suffix: arduino-avr-megaADK |
| 75 |
serial: true |
| 76 |
softwareserial: true |
| 77 |
- fqbn: arduino:avr:leonardo |
| 78 |
artifact-name-suffix: arduino-avr-leonardo |
| 79 |
serial: true |
| 80 |
softwareserial: true |
| 81 |
- fqbn: arduino:avr:leonardoeth |
| 82 |
artifact-name-suffix: arduino-avr-leonardoeth |
| 83 |
serial: true |
| 84 |
softwareserial: true |
| 85 |
- fqbn: arduino:avr:micro |
| 86 |
artifact-name-suffix: arduino-avr-micro |
| 87 |
serial: true |
| 88 |
softwareserial: true |
| 89 |
- fqbn: arduino:avr:esplora |
| 90 |
artifact-name-suffix: arduino-avr-esplora |
| 91 |
serial: true |
| 92 |
softwareserial: true |
| 93 |
- fqbn: arduino:avr:mini:cpu=atmega328 |
| 94 |
artifact-name-suffix: arduino-avr-mini-cpu-atmega328 |
| 95 |
serial: true |
| 96 |
softwareserial: true |
| 97 |
- fqbn: arduino:avr:mini:cpu=atmega168 |
| 98 |
artifact-name-suffix: arduino-avr-mini-cpu-atmega168 |
| 99 |
serial: true |
| 100 |
softwareserial: true |
| 101 |
- fqbn: arduino:avr:ethernet |
| 102 |
artifact-name-suffix: arduino-avr-ethernet |
| 103 |
serial: true |
| 104 |
softwareserial: true |
| 105 |
- fqbn: arduino:avr:fio |
| 106 |
artifact-name-suffix: arduino-avr-fio |
| 107 |
serial: true |
| 108 |
softwareserial: true |
| 109 |
- fqbn: arduino:avr:bt:cpu=atmega328 |
| 110 |
artifact-name-suffix: arduino-avr-bt-cpu-atmega328 |
| 111 |
serial: true |
| 112 |
softwareserial: true |
| 113 |
- fqbn: arduino:avr:bt:cpu=atmega168 |
| 114 |
artifact-name-suffix: arduino-avr-bt-cpu-atmega168 |
| 115 |
serial: true |
| 116 |
softwareserial: true |
| 117 |
- fqbn: arduino:avr:LilyPadUSB |
| 118 |
artifact-name-suffix: arduino-avr-LilyPadUSB |
| 119 |
serial: true |
| 120 |
softwareserial: true |
| 121 |
- fqbn: arduino:avr:lilypad:cpu=atmega328 |
| 122 |
artifact-name-suffix: arduino-avr-lilypad-cpu-atmega328 |
| 123 |
serial: true |
| 124 |
softwareserial: true |
| 125 |
- fqbn: arduino:avr:lilypad:cpu=atmega168 |
| 126 |
artifact-name-suffix: arduino-avr-lilypad-cpu-atmega168 |
| 127 |
serial: true |
| 128 |
softwareserial: true |
| 129 |
- fqbn: arduino:avr:pro:cpu=16MHzatmega328 |
| 130 |
artifact-name-suffix: arduino-avr-pro-cpu-16MHzatmega328 |
| 131 |
serial: true |
| 132 |
softwareserial: true |
| 133 |
- fqbn: arduino:avr:pro:cpu=8MHzatmega328 |
| 134 |
artifact-name-suffix: arduino-avr-pro-cpu-8MHzatmega328 |
| 135 |
serial: true |
| 136 |
softwareserial: true |
| 137 |
- fqbn: arduino:avr:pro:cpu=16MHzatmega168 |
| 138 |
artifact-name-suffix: arduino-avr-pro-cpu-16MHzatmega168 |
| 139 |
serial: true |
| 140 |
softwareserial: true |
| 141 |
- fqbn: arduino:avr:pro:cpu=8MHzatmega168 |
| 142 |
artifact-name-suffix: arduino-avr-pro-cpu-8MHzatmega168 |
| 143 |
serial: true |
| 144 |
softwareserial: true |
| 145 |
- fqbn: arduino:avr:atmegang:cpu=atmega168 |
| 146 |
artifact-name-suffix: arduino-avr-atmegang-cpu-atmega168 |
| 147 |
serial: true |
| 148 |
softwareserial: true |
| 149 |
- fqbn: arduino:avr:atmegang:cpu=atmega8 |
| 150 |
artifact-name-suffix: arduino-avr-atmegang-cpu-atmega8 |
| 151 |
serial: true |
| 152 |
softwareserial: false |
| 153 |
- fqbn: arduino:avr:robotControl |
| 154 |
artifact-name-suffix: arduino-avr-robotControl |
| 155 |
serial: true |
| 156 |
softwareserial: false |
| 157 |
- fqbn: arduino:avr:robotMotor |
| 158 |
artifact-name-suffix: arduino-avr-robotMotor |
| 159 |
serial: true |
| 160 |
softwareserial: false |
| 161 |
- fqbn: arduino:avr:gemma |
| 162 |
artifact-name-suffix: arduino-avr-gemma |
| 163 |
serial: false |
| 164 |
softwareserial: false |
| 165 |
- fqbn: arduino:avr:circuitplay32u4cat |
| 166 |
artifact-name-suffix: arduino-avr-circuitplay32u4cat |
| 167 |
serial: true |
| 168 |
softwareserial: true |
| 169 |
- fqbn: arduino:avr:yunmini |
| 170 |
artifact-name-suffix: arduino-avr-yunmini |
| 171 |
serial: true |
| 172 |
softwareserial: true |
| 173 |
- fqbn: arduino:avr:chiwawa |
| 174 |
artifact-name-suffix: arduino-avr-chiwawa |
| 175 |
serial: true |
| 176 |
softwareserial: true |
| 177 |
- fqbn: arduino:avr:one |
| 178 |
artifact-name-suffix: arduino-avr-one |
| 179 |
serial: true |
| 180 |
softwareserial: true |
| 181 |
- fqbn: arduino:avr:unowifi |
| 182 |
artifact-name-suffix: arduino-avr-unowifi |
| 183 |
serial: true |
| 184 |
softwareserial: true |
| 185 |
- fqbn: arduino:avr:unomini |
| 186 |
artifact-name-suffix: arduino-avr-unomini |
| 187 |
serial: true |
| 188 |
softwareserial: true |
| 189 |
|
| 190 |
# Make board type-specific customizations to the matrix jobs |
| 191 |
include: |
| 192 |
- board: |
| 193 |
# Boards with Serial interface |
| 194 |
serial: true |
| 195 |
# Compile these sketches in addition to the ones compiled for all boards |
| 196 |
serial-sketch-paths: | |
| 197 |
- libraries/EEPROM/examples/eeprom_crc |
| 198 |
- libraries/EEPROM/examples/eeprom_get |
| 199 |
- libraries/EEPROM/examples/eeprom_put |
| 200 |
- libraries/EEPROM/examples/eeprom_read |
| 201 |
- libraries/SPI |
| 202 |
- libraries/Wire |
| 203 |
- board: |
| 204 |
serial: false |
| 205 |
serial-sketch-paths: "" |
| 206 |
- board: |
| 207 |
# Boards compatible with the SoftwareSerial library |
| 208 |
softwareserial: true |
| 209 |
softwareserial-sketch-paths: | |
| 210 |
- libraries/SoftwareSerial |
| 211 |
- board: |
| 212 |
softwareserial: false |
| 213 |
softwareserial-sketch-paths: "" |
| 214 |
|
| 215 |
steps: |
| 216 |
- name: Checkout repository |
| 217 |
uses: actions/checkout@v6 |
| 218 |
|
| 219 |
- name: Compile examples |
| 220 |
uses: arduino/compile-sketches@v1 |
| 221 |
with: |
| 222 |
github-token: ${{ secrets.GITHUB_TOKEN }} |
| 223 |
fqbn: ${{ matrix.board.fqbn }} |
| 224 |
platforms: | |
| 225 |
# Use Boards Manager to install the latest release of the platform to get the toolchain. |
| 226 |
- name: arduino:avr |
| 227 |
# Overwrite the Boards Manager installation with the platform from the repository. |
| 228 |
- source-path: ./ |
| 229 |
name: arduino:avr |
| 230 |
sketch-paths: | |
| 231 |
# Compile these sketches for all boards |
| 232 |
- libraries/EEPROM/examples/eeprom_clear |
| 233 |
- libraries/EEPROM/examples/eeprom_iteration |
| 234 |
- libraries/EEPROM/examples/eeprom_update |
| 235 |
- libraries/EEPROM/examples/eeprom_write |
| 236 |
# Board-specific sketches |
| 237 |
${{ matrix.serial-sketch-paths }} |
| 238 |
${{ matrix.softwareserial-sketch-paths }} |
| 239 |
enable-deltas-report: true |
| 240 |
sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }} |
| 241 |
|
| 242 |
- name: Save sketches report as workflow artifact |
| 243 |
uses: actions/upload-artifact@v6 |
| 244 |
with: |
| 245 |
if-no-files-found: error |
| 246 |
path: ${{ env.SKETCHES_REPORTS_PATH }} |
| 247 |
name: sketches-report-${{ matrix.board.artifact-name-suffix }} |