|
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 | + - "library.properties" |
| 9 | + - "examples/**" |
| 10 | + - "src/**" |
| 11 | + pull_request: |
| 12 | + paths: |
| 13 | + - ".github/workflows/compile-examples.yml" |
| 14 | + - "library.properties" |
| 15 | + - "examples/**" |
| 16 | + - "src/**" |
| 17 | + schedule: |
| 18 | + # Run every Tuesday at 8 AM UTC to catch breakage caused by changes to external resources (libraries, platforms). |
| 19 | + - cron: "0 8 * * TUE" |
| 20 | + workflow_dispatch: |
| 21 | + repository_dispatch: |
| 22 | + |
3 | 23 | jobs:
|
4 |
| - build: |
5 |
| - runs-on: ubuntu-latest |
6 |
| - |
7 |
| - strategy: |
8 |
| - matrix: |
9 |
| - fqbn: [ |
10 |
| - "arduino:samd:mkrzero" |
11 |
| - ] |
12 |
| - |
13 |
| - steps: |
14 |
| - - uses: actions/checkout@v1 |
15 |
| - with: |
16 |
| - fetch-depth: 1 |
17 |
| - - uses: arduino/actions/libraries/compile-examples@master |
18 |
| - with: |
19 |
| - fqbn: ${{ matrix.fqbn }} |
| 24 | + build: |
| 25 | + name: ${{ matrix.board.fqbn }} |
| 26 | + runs-on: ubuntu-latest |
| 27 | + |
| 28 | + env: |
| 29 | + SKETCHES_REPORTS_PATH: sketches-reports |
| 30 | + |
| 31 | + strategy: |
| 32 | + fail-fast: false |
| 33 | + |
| 34 | + matrix: |
| 35 | + board: |
| 36 | + - fqbn: arduino:samd:arduino_zero_edbg |
| 37 | + platforms: | |
| 38 | + - name: arduino:samd |
| 39 | + - fqbn: arduino:samd:mkrzero |
| 40 | + platforms: | |
| 41 | + - name: arduino:samd |
| 42 | + - fqbn: arduino:samd:nano_33_iot |
| 43 | + platforms: | |
| 44 | + - name: arduino:samd |
| 45 | +
|
| 46 | + steps: |
| 47 | + - name: Checkout repository |
| 48 | + uses: actions/checkout@v2 |
| 49 | + |
| 50 | + - name: Compile examples |
| 51 | + uses: arduino/compile-sketches@v1 |
| 52 | + with: |
| 53 | + github-token: ${{ secrets.GITHUB_TOKEN }} |
| 54 | + fqbn: ${{ matrix.board.fqbn }} |
| 55 | + platforms: ${{ matrix.board.platforms }} |
| 56 | + libraries: | |
| 57 | + # Install the library from the local path. |
| 58 | + - source-path: ./ |
| 59 | + # Additional library dependencies can be listed here. |
| 60 | + # See: https://github.com/arduino/compile-sketches#libraries |
| 61 | + sketch-paths: | |
| 62 | + - examples |
| 63 | + enable-deltas-report: true |
| 64 | + sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }} |
| 65 | + |
| 66 | + - name: Save sketches report as workflow artifact |
| 67 | + uses: actions/upload-artifact@v2 |
| 68 | + with: |
| 69 | + if-no-files-found: error |
| 70 | + path: ${{ env.SKETCHES_REPORTS_PATH }} |
| 71 | + name: ${{ env.SKETCHES_REPORTS_PATH }} |
0 commit comments