|
| 1 | +name: Compile Examples |
| 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 | + |
| 21 | +jobs: |
| 22 | + build: |
| 23 | + name: ${{ matrix.board.fqbn }} |
| 24 | + runs-on: ubuntu-latest |
| 25 | + |
| 26 | + env: |
| 27 | + SKETCHES_REPORTS_PATH: sketches-reports |
| 28 | + |
| 29 | + strategy: |
| 30 | + fail-fast: false |
| 31 | + |
| 32 | + matrix: |
| 33 | + board: |
| 34 | + - fqbn: arduino:avr:nano |
| 35 | + platforms: | |
| 36 | + - name: arduino:avr |
| 37 | + - fqbn: arduino:avr:mega |
| 38 | + platforms: | |
| 39 | + - name: arduino:avr |
| 40 | + - fqbn: arduino:avr:leonardo |
| 41 | + platforms: | |
| 42 | + - name: arduino:avr |
| 43 | + - fqbn: arduino:megaavr:nona4809 |
| 44 | + platforms: | |
| 45 | + - name: arduino:megaavr |
| 46 | + - fqbn: arduino:sam:arduino_due_x_dbg |
| 47 | + platforms: | |
| 48 | + - name: arduino:sam |
| 49 | + - fqbn: arduino:samd:mkrzero |
| 50 | + platforms: | |
| 51 | + - name: arduino:samd |
| 52 | + - fqbn: arduino:mbed_portenta:envie_m4 |
| 53 | + platforms: | |
| 54 | + - name: arduino:mbed_portenta |
| 55 | + - fqbn: arduino:mbed_portenta:envie_m7 |
| 56 | + platforms: | |
| 57 | + - name: arduino:mbed_portenta |
| 58 | + - fqbn: arduino:mbed_nano:nano33ble |
| 59 | + platforms: | |
| 60 | + - name: arduino:mbed_nano |
| 61 | + - fqbn: arduino:mbed_nano:nanorp2040connect |
| 62 | + platforms: | |
| 63 | + - name: arduino:mbed_nano |
| 64 | +
|
| 65 | + steps: |
| 66 | + - name: Checkout repository |
| 67 | + uses: actions/checkout@v2 |
| 68 | + |
| 69 | + - name: Compile examples |
| 70 | + uses: arduino/compile-sketches@v1 |
| 71 | + with: |
| 72 | + github-token: ${{ secrets.GITHUB_TOKEN }} |
| 73 | + fqbn: ${{ matrix.board.fqbn }} |
| 74 | + platforms: ${{ matrix.board.platforms }} |
| 75 | + libraries: | |
| 76 | + # Install the library from the local path. |
| 77 | + - source-path: ./ |
| 78 | + # Additional library dependencies can be listed here. |
| 79 | + # See: https://github.com/arduino/compile-sketches#libraries |
| 80 | + sketch-paths: | |
| 81 | + - examples |
| 82 | + enable-deltas-report: true |
| 83 | + sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }} |
| 84 | + |
| 85 | + - name: Save sketches report as workflow artifact |
| 86 | + uses: actions/upload-artifact@v2 |
| 87 | + with: |
| 88 | + if-no-files-found: error |
| 89 | + path: ${{ env.SKETCHES_REPORTS_PATH }} |
| 90 | + name: ${{ env.SKETCHES_REPORTS_PATH }} |
0 commit comments