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