|
| 1 | +name: Compile Examples |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + paths: |
| 6 | + - ".github/workflows/compile-examples.yml" |
| 7 | + - "library.properties" |
| 8 | + - "examples/**" |
| 9 | + - "src/**" |
| 10 | + push: |
| 11 | + paths: |
| 12 | + - ".github/workflows/compile-examples.yml" |
| 13 | + - "library.properties" |
| 14 | + - "examples/**" |
| 15 | + - "src/**" |
| 16 | + schedule: |
| 17 | + # Run every Tuesday at 8 AM UTC to catch breakage caused by changes to external resources (libraries, platforms). |
| 18 | + - cron: "0 8 * * TUE" |
| 19 | + workflow_dispatch: |
| 20 | + repository_dispatch: |
| 21 | + |
| 22 | +jobs: |
| 23 | + build: |
| 24 | + name: ${{ matrix.board.fqbn }} |
| 25 | + runs-on: ubuntu-latest |
| 26 | + |
| 27 | + env: |
| 28 | + LIBRARIES: | |
| 29 | + # Install the NetworkConfigurator library from the repository |
| 30 | + - source-path: ./ |
| 31 | + - name: ArxContainer |
| 32 | + - name: ArxTypeTraits |
| 33 | + - name: DebugLog |
| 34 | + SKETCH_PATHS: | |
| 35 | + - examples/rpc_lite_client |
| 36 | + - examples/rpc_lite_dummy |
| 37 | + - examples/rpc_lite_server |
| 38 | + SKETCHES_REPORTS_PATH: sketches-reports |
| 39 | + strategy: |
| 40 | + fail-fast: false |
| 41 | + |
| 42 | + matrix: |
| 43 | + board: |
| 44 | + - fqbn: arduino:samd:mkrwifi1010 |
| 45 | + type: nina |
| 46 | + artifact-name-suffix: arduino-samd-mkrwifi1010 |
| 47 | + - fqbn: arduino:samd:nano_33_iot |
| 48 | + type: nina |
| 49 | + artifact-name-suffix: arduino-samd-nano_33_iot |
| 50 | + - fqbn: arduino:mbed_portenta:envie_m7 |
| 51 | + type: mbed_portenta |
| 52 | + artifact-name-suffix: arduino-mbed_portenta-envie_m7 |
| 53 | + - fqbn: arduino:mbed_nano:nanorp2040connect |
| 54 | + type: nina |
| 55 | + artifact-name-suffix: arduino-mbed_nano-nanorp2040connect |
| 56 | + - fqbn: arduino:mbed_nicla:nicla_vision |
| 57 | + type: mbed_nicla |
| 58 | + artifact-name-suffix: arduino-mbed_nicla-nicla_vision |
| 59 | + - fqbn: arduino:mbed_opta:opta |
| 60 | + type: mbed_opta |
| 61 | + artifact-name-suffix: arduino-mbed_opta-opta |
| 62 | + - fqbn: arduino:mbed_giga:giga |
| 63 | + type: mbed_giga |
| 64 | + artifact-name-suffix: arduino-mbed_giga-giga |
| 65 | + - fqbn: arduino:renesas_portenta:portenta_c33 |
| 66 | + type: renesas_portenta |
| 67 | + artifact-name-suffix: arduino-renesas_portenta-portenta_c33 |
| 68 | + - fqbn: arduino:renesas_uno:unor4wifi |
| 69 | + type: renesas_uno |
| 70 | + artifact-name-suffix: arduino-renesas_uno-unor4wifi |
| 71 | + |
| 72 | + |
| 73 | + # make board type-specific customizations to the matrix jobs |
| 74 | + include: |
| 75 | + # MKR WiFi 1010, Nano 33 IoT, Nano RP2040 Connect |
| 76 | + - board: |
| 77 | + type: nina |
| 78 | + platforms: | |
| 79 | + # Install samd and mbed_nano platform via Boards Manager |
| 80 | + - name: arduino:samd |
| 81 | + - name: arduino:mbed_nano |
| 82 | + libraries: {} |
| 83 | + # Portenta |
| 84 | + - board: |
| 85 | + type: mbed_portenta |
| 86 | + platforms: | |
| 87 | + # Install mbed_portenta platform via Boards Manager |
| 88 | + - name: arduino:mbed_portenta |
| 89 | + libraries: {} |
| 90 | + # Nicla Vision |
| 91 | + - board: |
| 92 | + type: mbed_nicla |
| 93 | + platforms: | |
| 94 | + # Install mbed_nicla platform via Boards Manager |
| 95 | + - name: arduino:mbed_nicla |
| 96 | + libraries: {} |
| 97 | + # Opta |
| 98 | + - board: |
| 99 | + type: mbed_opta |
| 100 | + platforms: | |
| 101 | + # Install mbed_opta platform via Boards Manager |
| 102 | + - name: arduino:mbed_opta |
| 103 | + libraries: {} |
| 104 | + # GIGA |
| 105 | + - board: |
| 106 | + type: mbed_giga |
| 107 | + platforms: | |
| 108 | + # Install mbed_giga platform via Boards Manager |
| 109 | + - name: arduino:mbed_giga |
| 110 | + libraries: {} |
| 111 | + # Portenta C33 |
| 112 | + - board: |
| 113 | + type: renesas_portenta |
| 114 | + platforms: | |
| 115 | + # Install renesas_portenta platform via Boards Manager |
| 116 | + - name: arduino:renesas_portenta |
| 117 | + libraries: {} |
| 118 | + # UNO R4 WiFi |
| 119 | + - board: |
| 120 | + type: renesas_uno |
| 121 | + platforms: | |
| 122 | + # Install renesas_uno platform via Boards Manager |
| 123 | + - name: arduino:renesas_uno |
| 124 | + libraries: {} |
| 125 | + |
| 126 | + steps: |
| 127 | + - name: Checkout |
| 128 | + uses: actions/checkout@v4 |
| 129 | + |
| 130 | + - name: Compile examples |
| 131 | + uses: arduino/compile-sketches@v1 |
| 132 | + with: |
| 133 | + github-token: ${{ secrets.GITHUB_TOKEN }} |
| 134 | + platforms: ${{ matrix.platforms }} |
| 135 | + fqbn: ${{ matrix.board.fqbn }} |
| 136 | + libraries: | |
| 137 | + ${{ env.LIBRARIES }} |
| 138 | + ${{ matrix.libraries }} |
| 139 | + sketch-paths: | |
| 140 | + ${{ env.SKETCH_PATHS }} |
| 141 | + enable-deltas-report: 'true' |
| 142 | + sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }} |
| 143 | + |
| 144 | + - name: Save memory usage change report as artifact |
| 145 | + if: github.event_name == 'pull_request' |
| 146 | + uses: actions/upload-artifact@v4 |
| 147 | + with: |
| 148 | + if-no-files-found: error |
| 149 | + name: sketches-report-${{ matrix.board.artifact-name-suffix }} |
| 150 | + path: ${{ env.SKETCHES_REPORTS_PATH }} |
0 commit comments