|
| 1 | +# Source: https://github.com/per1234/.github/blob/main/workflow-templates/compile-examples-private.md |
| 2 | +name: Compile Examples with Build Profiles |
| 3 | + |
| 4 | +# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows |
| 5 | +on: |
| 6 | + schedule: |
| 7 | + # Run every Tuesday at 8 AM UTC to catch breakage caused by changes to external resources (libraries, platforms). |
| 8 | + - cron: "0 8 * * TUE" |
| 9 | + workflow_dispatch: |
| 10 | + repository_dispatch: |
| 11 | + |
| 12 | +env: |
| 13 | + UNIVERSAL_SKETCH_PATHS: | |
| 14 | + - extras/tests |
| 15 | + - examples/AdvancedUSBInternalOperations |
| 16 | + - examples/BackupInternalPartitions |
| 17 | + - examples/Callbacks |
| 18 | + - examples/InternalStoragePartitioning |
| 19 | + - examples/Logger |
| 20 | + - examples/SimpleStorageWriteRead |
| 21 | + SKETCHES_REPORTS_PATH: sketches-reports |
| 22 | + SKETCHES_REPORTS_ARTIFACT_NAME: sketches-reports |
| 23 | + |
| 24 | +jobs: |
| 25 | + build: |
| 26 | + name: ${{ matrix.board.fqbn }} |
| 27 | + runs-on: ubuntu-latest |
| 28 | + permissions: |
| 29 | + contents: read |
| 30 | + pull-requests: read |
| 31 | + |
| 32 | + strategy: |
| 33 | + fail-fast: false |
| 34 | + |
| 35 | + matrix: |
| 36 | + board: |
| 37 | + - fqbn: arduino:mbed_portenta:envie_m7 |
| 38 | + platforms: | |
| 39 | + - name: arduino:mbed_portenta |
| 40 | + artifact-name-suffix: arduino-mbed_portenta-envie_m7 |
| 41 | + - fqbn: arduino:renesas_portenta:portenta_c33 |
| 42 | + platforms: | |
| 43 | + - name: arduino:renesas_portenta |
| 44 | + artifact-name-suffix: arduino-renesas_portenta-portenta_c33 |
| 45 | + - fqbn: arduino:mbed_opta:opta |
| 46 | + platforms: | |
| 47 | + - name: arduino:mbed_opta |
| 48 | + artifact-name-suffix: arduino-mbed_opta-opta |
| 49 | + |
| 50 | + steps: |
| 51 | + - name: Checkout repository |
| 52 | + uses: actions/checkout@v4 |
| 53 | + |
| 54 | + - name: Compile examples |
| 55 | + uses: arduino/compile-sketches@v1 |
| 56 | + with: |
| 57 | + github-token: ${{ secrets.GITHUB_TOKEN }} |
| 58 | + cli-compile-flags: --profile ${{ matrix.board.fqbn }} |
| 59 | + fqbn: ${{ matrix.board.fqbn }} |
| 60 | + platforms: ${{ matrix.board.platforms }} |
| 61 | + libraries: | |
| 62 | + # Install the library from the local path. |
| 63 | + - source-path: ./ |
| 64 | + - name: Arduino_USBHostMbed5 |
| 65 | + - name: Arduino_POSIXStorage |
| 66 | + - name: ArduinoRS485 |
| 67 | + # Additional library dependencies can be listed here. |
| 68 | + # See: https://github.com/arduino/compile-sketches#libraries |
| 69 | + sketch-paths: | |
| 70 | + ${{ env.UNIVERSAL_SKETCH_PATHS }} |
| 71 | + ${{ matrix.board.additional-sketch-paths }} |
| 72 | + enable-deltas-report: true |
| 73 | + sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }} |
| 74 | + |
| 75 | + - name: Save sketches report as workflow artifact |
| 76 | + uses: actions/upload-artifact@v4 |
| 77 | + with: |
| 78 | + if-no-files-found: error |
| 79 | + name: sketches-report-${{ matrix.board.artifact-name-suffix }} |
| 80 | + path: ${{ env.SKETCHES_REPORTS_PATH }} |
0 commit comments