|
| 1 | +name: Compile Provisioning |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + paths: |
| 6 | + - ".github/workflows/compile-provisioning.yml" |
| 7 | + - "examples/**" |
| 8 | + - "src/**" |
| 9 | + push: |
| 10 | + paths: |
| 11 | + - ".github/workflows/compile-provisioning.yml" |
| 12 | + - "examples/**" |
| 13 | + - "src/**" |
| 14 | + |
| 15 | +jobs: |
| 16 | + build: |
| 17 | + runs-on: ubuntu-latest |
| 18 | + |
| 19 | + env: |
| 20 | + # libraries to install for all boards |
| 21 | + UNIVERSAL_LIBRARIES: | |
| 22 | + # Install the ArduinoIoTCloud library from the repository |
| 23 | + - source-path: ./ |
| 24 | + - source-url: https://github.com/fabik111/Arduino_ConnectionHandler.git |
| 25 | + version: 0314cf54593029aea05bb8c179e40a26128f7d67 |
| 26 | + - name: ArduinoECCX08 |
| 27 | + - name: ArduinoBLE |
| 28 | + - name: ArduinoHttpClient |
| 29 | + - name: Arduino_DebugUtils |
| 30 | + - name: ArduinoMqttClient |
| 31 | + - source-url: https://github.com/fabik111/Arduino_SecureElement.git |
| 32 | + version: f5a23964a1c70048e48d5ed2d2657004446f0e3d |
| 33 | + - source-url: https://github.com/fabik111/Arduino_CloudUtils.git |
| 34 | + version: a8b52eaf500c63b2e8bd3e4b6f6c77b70fc3e65d |
| 35 | + - source-url: https://github.com/arduino-libraries/Arduino_KVStore.git |
| 36 | + - source-url: https://github.com/arduino-libraries/Arduino_UniqueHWId.git |
| 37 | + - source-url: https://github.com/arduino-libraries/Arduino_NetworkConfigurator.git |
| 38 | + # sketch paths to compile (recursive) for all boards |
| 39 | + UNIVERSAL_SKETCH_PATHS: | |
| 40 | + - examples/utility/Provisioning_2.0 |
| 41 | + SKETCHES_REPORTS_PATH: sketches-reports |
| 42 | + |
| 43 | + strategy: |
| 44 | + fail-fast: false |
| 45 | + |
| 46 | + matrix: |
| 47 | + board: |
| 48 | + - fqbn: arduino:samd:mkrwifi1010 |
| 49 | + type: nina |
| 50 | + artifact-name-suffix: arduino-samd-mkrwifi1010 |
| 51 | + - fqbn: arduino:samd:nano_33_iot |
| 52 | + type: nina |
| 53 | + artifact-name-suffix: arduino-samd-nano_33_iot |
| 54 | + - fqbn: arduino:mbed_portenta:envie_m7 |
| 55 | + type: mbed_portenta |
| 56 | + artifact-name-suffix: arduino-mbed_portenta-envie_m7 |
| 57 | + - fqbn: arduino:mbed_nano:nanorp2040connect |
| 58 | + type: nina |
| 59 | + artifact-name-suffix: arduino-mbed_nano-nanorp2040connect |
| 60 | + - fqbn: arduino:mbed_nicla:nicla_vision |
| 61 | + type: mbed_nicla |
| 62 | + artifact-name-suffix: arduino-mbed_nicla-nicla_vision |
| 63 | + - fqbn: arduino:mbed_opta:opta |
| 64 | + type: mbed_opta |
| 65 | + artifact-name-suffix: arduino-mbed_opta-opta |
| 66 | + - fqbn: arduino:mbed_giga:giga |
| 67 | + type: mbed_giga |
| 68 | + artifact-name-suffix: arduino-mbed_giga-giga |
| 69 | + - fqbn: arduino:renesas_portenta:portenta_c33 |
| 70 | + type: renesas_portenta |
| 71 | + artifact-name-suffix: arduino-renesas_portenta-portenta_c33 |
| 72 | + - fqbn: arduino:renesas_uno:unor4wifi |
| 73 | + type: renesas_uno |
| 74 | + artifact-name-suffix: arduino-renesas_uno-unor4wifi |
| 75 | + |
| 76 | + # make board type-specific customizations to the matrix jobs |
| 77 | + include: |
| 78 | + # MKR WiFi 1010, Nano 33 IoT, Nano RP2040 Connect |
| 79 | + - board: |
| 80 | + type: nina |
| 81 | + platforms: | |
| 82 | + # Install samd and mbed_nano platform via Boards Manager |
| 83 | + - name: arduino:samd |
| 84 | + - name: arduino:mbed_nano |
| 85 | + libraries: | |
| 86 | + - name: RTCZero |
| 87 | + - source-url: https://github.com/andreagilardoni/WiFiNINA.git |
| 88 | + version: 31616ac5a30f6281c68f982bc39800771b2fbaeb |
| 89 | + - name: Arduino_JSON |
| 90 | + - source-url: https://github.com/adafruit/Adafruit_SleepyDog.git |
| 91 | + # Portenta |
| 92 | + - board: |
| 93 | + type: mbed_portenta |
| 94 | + platforms: | |
| 95 | + # Install mbed_portenta platform via Boards Manager |
| 96 | + - name: arduino:mbed_portenta |
| 97 | + libraries: | |
| 98 | + - name: Arduino_BearSSL |
| 99 | + - name: Arduino_Cellular |
| 100 | + # Nicla Vision |
| 101 | + - board: |
| 102 | + type: mbed_nicla |
| 103 | + platforms: | |
| 104 | + # Install mbed_nicla platform via Boards Manager |
| 105 | + - name: arduino:mbed_nicla |
| 106 | + # Opta |
| 107 | + - board: |
| 108 | + type: mbed_opta |
| 109 | + platforms: | |
| 110 | + # Install mbed_opta platform via Boards Manager |
| 111 | + - name: arduino:mbed_opta |
| 112 | + libraries: | |
| 113 | + - name: Arduino_BearSSL |
| 114 | + # GIGA |
| 115 | + - board: |
| 116 | + type: mbed_giga |
| 117 | + platforms: | |
| 118 | + # Install mbed_giga platform via Boards Manager |
| 119 | + - name: arduino:mbed_giga |
| 120 | + libraries: | |
| 121 | + - name: Arduino_BearSSL |
| 122 | + # Portenta C33 |
| 123 | + - board: |
| 124 | + type: renesas_portenta |
| 125 | + platforms: | |
| 126 | + # Install renesas_portenta platform via Boards Manager |
| 127 | + - name: arduino:renesas_portenta |
| 128 | + libraries: | |
| 129 | + - name: Arduino_Cellular |
| 130 | + # UNO R4 WiFi |
| 131 | + - board: |
| 132 | + type: renesas_uno |
| 133 | + platforms: | |
| 134 | + # Install renesas_uno platform via Boards Manager |
| 135 | + - name: arduino:renesas_uno |
| 136 | +
|
| 137 | + steps: |
| 138 | + - name: Checkout |
| 139 | + uses: actions/checkout@v4 |
| 140 | + |
| 141 | + - name: Compile production provisioning sketch |
| 142 | + uses: arduino/compile-sketches@v1 |
| 143 | + with: |
| 144 | + github-token: ${{ secrets.GITHUB_TOKEN }} |
| 145 | + platforms: ${{ matrix.platforms }} |
| 146 | + fqbn: ${{ matrix.board.fqbn }} |
| 147 | + libraries: | |
| 148 | + ${{ env.UNIVERSAL_LIBRARIES }} |
| 149 | + ${{ matrix.libraries }} |
| 150 | + sketch-paths: | |
| 151 | + ${{ env.UNIVERSAL_SKETCH_PATHS }} |
| 152 | + ${{ matrix.sketch-paths }} |
| 153 | + enable-deltas-report: "true" |
| 154 | + sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }} |
| 155 | + cli-compile-flags: | |
| 156 | + - --output-dir |
| 157 | + - ${{ runner.temp }}/provisioning-prod |
| 158 | +
|
| 159 | + - name: Compile staging provisioning sketch |
| 160 | + uses: arduino/compile-sketches@v1 |
| 161 | + with: |
| 162 | + github-token: ${{ secrets.GITHUB_TOKEN }} |
| 163 | + platforms: ${{ matrix.platforms }} |
| 164 | + fqbn: ${{ matrix.board.fqbn }} |
| 165 | + libraries: | |
| 166 | + ${{ env.UNIVERSAL_LIBRARIES }} |
| 167 | + ${{ matrix.libraries }} |
| 168 | + sketch-paths: | |
| 169 | + ${{ env.UNIVERSAL_SKETCH_PATHS }} |
| 170 | + ${{ matrix.sketch-paths }} |
| 171 | + enable-deltas-report: "true" |
| 172 | + sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }} |
| 173 | + cli-compile-flags: | |
| 174 | + - --build-property |
| 175 | + - "build.extra_flags=-DCOMPILE_TEST=1" |
| 176 | + - --output-dir |
| 177 | + - ${{ runner.temp }}/provisioning-staging |
| 178 | +
|
| 179 | + - name: Write data to size trends report spreadsheet |
| 180 | + # Update report on every push to the master branch |
| 181 | + if: github.event_name == 'push' && github.ref == 'refs/heads/master' |
| 182 | + uses: arduino/report-size-trends@main |
| 183 | + with: |
| 184 | + sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }} |
| 185 | + google-key-file: ${{ secrets.GOOGLE_KEY_FILE }} |
| 186 | + spreadsheet-id: 1I6NZkpZpf8KugBkE92adB1Z3_b7ZepOpCdYTOigJpN4 |
| 187 | + |
| 188 | + - name: Save memory usage change report as artifact |
| 189 | + if: github.event_name == 'pull_request' |
| 190 | + uses: actions/upload-artifact@v4 |
| 191 | + with: |
| 192 | + name: sketches-report-${{ matrix.board.artifact-name-suffix }} |
| 193 | + path: ${{ env.SKETCHES_REPORTS_PATH }} |
| 194 | + |
| 195 | + - name: Save production artifact |
| 196 | + if: github.event_name == 'pull_request' |
| 197 | + uses: actions/upload-artifact@v4 |
| 198 | + with: |
| 199 | + name: provisioning-prod-${{ matrix.board.artifact-name-suffix }} |
| 200 | + path: ${{ runner.temp }}/provisioning-prod/ |
| 201 | + |
| 202 | + - name: Save staging artifact |
| 203 | + if: github.event_name == 'pull_request' |
| 204 | + uses: actions/upload-artifact@v4 |
| 205 | + with: |
| 206 | + name: provisioning-staging-${{ matrix.board.artifact-name-suffix }} |
| 207 | + path: ${{ runner.temp }}/provisioning-staging/ |
0 commit comments