|
| 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 | + # Scheduled trigger checks for breakage caused by changes to external resources (libraries, platforms) |
| 17 | + schedule: |
| 18 | + # run every Saturday at 3 AM UTC |
| 19 | + - cron: "0 3 * * 6" |
| 20 | + # See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#workflow_dispatch |
| 21 | + workflow_dispatch: |
| 22 | + # See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#repository_dispatch |
| 23 | + repository_dispatch: |
| 24 | + |
| 25 | +jobs: |
| 26 | + build: |
| 27 | + name: ${{ matrix.board.fqbn }} |
| 28 | + runs-on: ubuntu-latest |
| 29 | + |
| 30 | + env: |
| 31 | + UNIVERSAL_SKETCH_PATHS: | |
| 32 | + - examples/backlight/SimpleBacklight |
| 33 | + - examples/basic/ArduinoLogoDrawing |
| 34 | + - examples/basic/SimpleText |
| 35 | + - examples/camera/display_camera |
| 36 | + - examples/gfx/geometrical-shapes |
| 37 | + - examples/gfx/hello-world |
| 38 | + - examples/gfx/touch-switch |
| 39 | + - examples/imu/accelerometer |
| 40 | + - examples/imu/gyroscope |
| 41 | + - examples/lvgl/bar_lvgl |
| 42 | + - examples/lvgl/button_lvgl |
| 43 | + - examples/lvgl/check_radio_lvgl |
| 44 | + - examples/lvgl/image_lvgl |
| 45 | + - examples/lvgl/imu_orientation |
| 46 | + - examples/lvgl/slider_lvgl |
| 47 | + - examples/microphone/PDMSerialPlotter |
| 48 | + - examples/rgb/SimpleRGB |
| 49 | + - examples/rgb/blink |
| 50 | +
|
| 51 | + SKETCHES_REPORTS_PATH: sketches-reports |
| 52 | + |
| 53 | + strategy: |
| 54 | + fail-fast: false |
| 55 | + |
| 56 | + matrix: |
| 57 | + board: |
| 58 | + - fqbn: arduino:mbed_portenta:envie_m7 |
| 59 | + platform-name: arduino:mbed_portenta |
| 60 | + - fqbn: arduino:mbed_giga:giga |
| 61 | + platform-name: arduino:mbed_giga |
| 62 | + |
| 63 | + include: |
| 64 | + - board: |
| 65 | + platform-name: arduino:mbed_portenta |
| 66 | + platforms: | |
| 67 | + # Install Arduino mbed_portenta Boards via Boards Manager |
| 68 | + - name: arduino:mbed_portenta |
| 69 | + - board: |
| 70 | + platform-name: arduino:mbed_giga |
| 71 | + platforms: | |
| 72 | + # Install Arduino mbed_giga Boards via Boards Manager |
| 73 | + - name: arduino:mbed_giga |
| 74 | + |
| 75 | + steps: |
| 76 | + - name: Checkout |
| 77 | + uses: actions/checkout@v4 |
| 78 | + |
| 79 | + - name: Compile examples |
| 80 | + uses: arduino/compile-sketches@v1 |
| 81 | + with: |
| 82 | + github-token: ${{ secrets.GITHUB_TOKEN }} |
| 83 | + platforms: ${{ matrix.platforms }} |
| 84 | + fqbn: ${{ matrix.board.fqbn }} |
| 85 | + libraries: | |
| 86 | + # Install the library from the local path. |
| 87 | + - source-path: ./ |
| 88 | + - name: ArduinoGraphics |
| 89 | + - name: Arduino_GigaDisplayTouch |
| 90 | + - name: Arduino_BMI270_BMM150 |
| 91 | + - name: Arduino_GigaDisplay_GFX |
| 92 | + - name: lvgl |
| 93 | + - name: Arducam_dvp |
| 94 | + sketch-paths: | |
| 95 | + ${{ env.UNIVERSAL_SKETCH_PATHS }} |
| 96 | + enable-deltas-report: true |
| 97 | + sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }} |
| 98 | + |
| 99 | + - name: Save memory usage change report as artifact |
| 100 | + uses: actions/upload-artifact@v3 |
| 101 | + with: |
| 102 | + name: ${{ env.SKETCHES_REPORTS_PATH }} |
| 103 | + if-no-files-found: error |
| 104 | + path: ${{ env.SKETCHES_REPORTS_PATH }} |
0 commit comments