|
1 | 1 | name: Compile Examples
|
2 |
| -on: [push, pull_request] |
| 2 | + |
| 3 | +# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows |
| 4 | +on: |
| 5 | + push: |
| 6 | + paths: |
| 7 | + - ".github/workflows/compile-examples.yml" |
| 8 | + - "examples/**" |
| 9 | + - "src/**" |
| 10 | + pull_request: |
| 11 | + paths: |
| 12 | + - ".github/workflows/compile-examples.yml" |
| 13 | + - "examples/**" |
| 14 | + - "src/**" |
| 15 | + schedule: |
| 16 | + # Run every Tuesday at 8 AM UTC to catch breakage caused by changes to external resources (libraries, platforms). |
| 17 | + - cron: "0 8 * * TUE" |
| 18 | + workflow_dispatch: |
| 19 | + repository_dispatch: |
| 20 | + |
3 | 21 | jobs:
|
4 |
| - build: |
5 |
| - runs-on: ubuntu-latest |
6 |
| - env: |
7 |
| - LIBRARIES: WiFi101 WiFiNINA |
| 22 | + build: |
| 23 | + name: ${{ matrix.board.fqbn }} |
| 24 | + runs-on: ubuntu-latest |
| 25 | + |
| 26 | + strategy: |
| 27 | + fail-fast: false |
| 28 | + |
| 29 | + matrix: |
| 30 | + board: |
| 31 | + - fqbn: arduino:megaavr:uno2018 |
| 32 | + platforms: | |
| 33 | + - name: arduino:megaavr |
| 34 | + libraries: | |
| 35 | + - name: WiFiNINA |
| 36 | + - fqbn: arduino:samd:mkrwifi1010 |
| 37 | + platforms: | |
| 38 | + - name: arduino:samd |
| 39 | + libraries: | |
| 40 | + - name: WiFiNINA |
| 41 | + - fqbn: arduino:samd:mkr1000 |
| 42 | + platforms: | |
| 43 | + - name: arduino:samd |
| 44 | + libraries: | |
| 45 | + - name: WiFi101 |
| 46 | + - fqbn: arduino:samd:nano_33_iot |
| 47 | + platforms: | |
| 48 | + - name: arduino:samd |
| 49 | + libraries: | |
| 50 | + - name: WiFiNINA |
| 51 | + - fqbn: esp8266:esp8266:huzzah |
| 52 | + platforms: | |
| 53 | + - name: esp8266:esp8266 |
| 54 | + source-url: https://arduino.esp8266.com/stable/package_esp8266com_index.json |
| 55 | + libraries: "" |
| 56 | + |
| 57 | + steps: |
| 58 | + - name: Checkout repository |
| 59 | + uses: actions/checkout@v2 |
8 | 60 |
|
9 |
| - strategy: |
10 |
| - matrix: |
11 |
| - fqbn: [ |
12 |
| - "arduino:samd:mkr1000", |
13 |
| - "arduino:samd:mkrwifi1010", |
14 |
| - "arduino:samd:nano_33_iot", |
15 |
| - "arduino:megaavr:uno2018", |
16 |
| - '"esp8266:esp8266:huzzah" "https://arduino.esp8266.com/stable/package_esp8266com_index.json"' |
17 |
| - ] |
| 61 | + - name: Compile examples |
| 62 | + uses: arduino/compile-sketches@v1 |
| 63 | + with: |
| 64 | + github-token: ${{ secrets.GITHUB_TOKEN }} |
| 65 | + fqbn: ${{ matrix.board.fqbn }} |
| 66 | + platforms: ${{ matrix.board.platforms }} |
| 67 | + libraries: | |
| 68 | + # Install the library from the local path. |
| 69 | + - source-path: ./ |
| 70 | + ${{ matrix.board.libraries }} |
| 71 | + sketch-paths: | |
| 72 | + - examples |
18 | 73 |
|
19 |
| - steps: |
20 |
| - - uses: actions/checkout@v1 |
21 |
| - with: |
22 |
| - fetch-depth: 1 |
23 |
| - - name: compile-examples for official Arduino boards |
24 |
| - uses: arduino/actions/libraries/compile-examples@master |
25 |
| - with: |
26 |
| - fqbn: ${{ matrix.fqbn }} |
27 |
| - libraries: ${{ env.LIBRARIES }} |
|
0 commit comments