|
| 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 | + strategy: |
| 27 | + fail-fast: false |
| 28 | + |
| 29 | + matrix: |
| 30 | + board: |
| 31 | + - fqbn: arduino:avr:nano |
| 32 | + platforms: | |
| 33 | + - name: arduino:avr |
| 34 | + softwareserial: true |
| 35 | + - fqbn: arduino:avr:mega |
| 36 | + platforms: | |
| 37 | + - name: arduino:avr |
| 38 | + softwareserial: true |
| 39 | + - fqbn: arduino:avr:leonardo |
| 40 | + platforms: | |
| 41 | + - name: arduino:avr |
| 42 | + softwareserial: true |
| 43 | + - fqbn: arduino:megaavr:nona4809 |
| 44 | + platforms: | |
| 45 | + - name: arduino:megaavr |
| 46 | + softwareserial: true |
| 47 | + - fqbn: arduino:sam:arduino_due_x_dbg |
| 48 | + platforms: | |
| 49 | + - name: arduino:sam |
| 50 | + softwareserial: false |
| 51 | + - fqbn: arduino:samd:mkrzero |
| 52 | + platforms: | |
| 53 | + - name: arduino:samd |
| 54 | + softwareserial: false |
| 55 | + - fqbn: arduino:mbed_portenta:envie_m4 |
| 56 | + platforms: | |
| 57 | + - name: arduino:mbed_portenta |
| 58 | + softwareserial: false |
| 59 | + - fqbn: arduino:mbed_portenta:envie_m7 |
| 60 | + platforms: | |
| 61 | + - name: arduino:mbed_portenta |
| 62 | + softwareserial: false |
| 63 | + - fqbn: arduino:mbed_nano:nano33ble |
| 64 | + platforms: | |
| 65 | + - name: arduino:mbed_nano |
| 66 | + softwareserial: false |
| 67 | + - fqbn: arduino:mbed_nano:nanorp2040connect |
| 68 | + platforms: | |
| 69 | + - name: arduino:mbed_nano |
| 70 | + softwareserial: false |
| 71 | + |
| 72 | + # Make board type-specific customizations to the matrix jobs |
| 73 | + include: |
| 74 | + - board: |
| 75 | + # Boards with a SoftwareSerial library |
| 76 | + softwareserial: true |
| 77 | + # Compile these sketches in addition to the ones defined by env.UNIVERSAL_SKETCH_PATHS |
| 78 | + sketch-paths: | |
| 79 | + - examples/Arduino_Debug_Advance |
| 80 | + - board: |
| 81 | + softwareserial: false |
| 82 | + sketch-paths: "" |
| 83 | + |
| 84 | + steps: |
| 85 | + - name: Checkout repository |
| 86 | + uses: actions/checkout@v2 |
| 87 | + |
| 88 | + - name: Compile examples |
| 89 | + uses: arduino/compile-sketches@v1 |
| 90 | + with: |
| 91 | + github-token: ${{ secrets.GITHUB_TOKEN }} |
| 92 | + fqbn: ${{ matrix.board.fqbn }} |
| 93 | + platforms: ${{ matrix.board.platforms }} |
| 94 | + libraries: | |
| 95 | + # Install the library from the local path. |
| 96 | + - source-path: ./ |
| 97 | + # Additional library dependencies can be listed here. |
| 98 | + # See: https://github.com/arduino/compile-sketches#libraries |
| 99 | + sketch-paths: | |
| 100 | + - examples/Arduino_Debug_Basic |
| 101 | + ${{ matrix.sketch-paths }} |
0 commit comments