|
1 | 1 | name: Compile Examples
|
| 2 | + |
| 3 | +# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows |
2 | 4 | on:
|
3 |
| - - push |
4 |
| - - pull_request |
| 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: |
5 | 20 |
|
6 | 21 | jobs:
|
7 | 22 | build:
|
| 23 | + name: ${{ matrix.board.fqbn }} |
8 | 24 | runs-on: ubuntu-latest
|
9 | 25 |
|
| 26 | + env: |
| 27 | + SKETCHES_REPORTS_PATH: sketches-reports |
| 28 | + |
10 | 29 | strategy:
|
| 30 | + fail-fast: false |
| 31 | + |
11 | 32 | matrix:
|
12 |
| - fqbn: |
13 |
| - - arduino:samd:mkrwifi1010 |
14 |
| - - arduino:samd:nano_33_iot |
15 |
| - - arduino:megaavr:uno2018:mode=on |
16 |
| - - arduino:mbed:nano33ble |
17 |
| - - arduino:mbed_nano:nanorp2040connect |
18 |
| - - arduino:renesas_uno:unor4wifi |
| 33 | + board: |
| 34 | + - fqbn: arduino:samd:mkrwifi1010 |
| 35 | + platforms: | |
| 36 | + - name: arduino:samd |
| 37 | + artifact-name-suffix: arduino-samd-mkrwifi1010 |
| 38 | + - fqbn: arduino:samd:nano_33_iot |
| 39 | + platforms: | |
| 40 | + - name: arduino:samd |
| 41 | + artifact-name-suffix: arduino-samd-nano_33_iot |
| 42 | + - fqbn: arduino:megaavr:uno2018:mode=on |
| 43 | + platforms: | |
| 44 | + - name: arduino:megaavr |
| 45 | + artifact-name-suffix: arduino-megaavr-uno2018 |
| 46 | + - fqbn: arduino:mbed_nano:nano33ble |
| 47 | + platforms: | |
| 48 | + - name: arduino:mbed_nano |
| 49 | + artifact-name-suffix: arduino-mbed_nano-nano33ble |
| 50 | + - fqbn: arduino:mbed_nano:nanorp2040connect |
| 51 | + platforms: | |
| 52 | + - name: arduino:mbed_nano |
| 53 | + artifact-name-suffix: arduino-mbed_nano-nanorp2040connect |
| 54 | + - fqbn: arduino:renesas_uno:unor4wifi |
| 55 | + platforms: | |
| 56 | + - name: arduino:renesas_uno |
| 57 | + artifact-name-suffix: arduino-renesas_uno-unor4wifi |
19 | 58 |
|
20 | 59 | steps:
|
21 |
| - - uses: actions/checkout@v4 |
22 |
| - - uses: arduino/compile-sketches@v1 |
| 60 | + - name: Checkout repository |
| 61 | + uses: actions/checkout@v4 |
| 62 | + |
| 63 | + - name: Compile examples |
| 64 | + uses: arduino/compile-sketches@v1 |
23 | 65 | with:
|
24 | 66 | github-token: ${{ secrets.GITHUB_TOKEN }}
|
25 |
| - fqbn: ${{ matrix.fqbn }} |
26 |
| - |
| 67 | + fqbn: ${{ matrix.board.fqbn }} |
| 68 | + platforms: ${{ matrix.board.platforms }} |
| 69 | + libraries: | |
| 70 | + # Install the library from the local path. |
| 71 | + - source-path: ./ |
| 72 | + sketch-paths: | |
| 73 | + - examples |
| 74 | + enable-deltas-report: true |
| 75 | + sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }} |
| 76 | + |
| 77 | + - name: Save sketches report as workflow artifact |
| 78 | + uses: actions/upload-artifact@v4 |
| 79 | + with: |
| 80 | + if-no-files-found: error |
| 81 | + path: ${{ env.SKETCHES_REPORTS_PATH }} |
| 82 | + name: sketches-report-${{ matrix.board.artifact-name-suffix }} |
| 83 | + |
27 | 84 | build-for-esp32:
|
28 | 85 | runs-on: ubuntu-latest
|
29 | 86 |
|
|
0 commit comments