From 8bdb4862b2e2adbb6f706b44be69f4d5e971dffa Mon Sep 17 00:00:00 2001 From: Sebastian Romero Date: Mon, 10 Nov 2025 14:19:21 +0100 Subject: [PATCH 1/3] maintenance: Add compile examples workflow --- .github/workflows/compile-examples.yml | 75 ++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 .github/workflows/compile-examples.yml diff --git a/.github/workflows/compile-examples.yml b/.github/workflows/compile-examples.yml new file mode 100644 index 0000000..478b3f3 --- /dev/null +++ b/.github/workflows/compile-examples.yml @@ -0,0 +1,75 @@ +# Source: https://github.com/per1234/.github/blob/main/workflow-templates/compile-examples-private.md +name: Compile Examples + +# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows +on: + push: + paths: + - ".github/workflows/compile-examples.ya?ml" + - "library.properties" + - "examples/**" + - "src/**" + pull_request: + paths: + - ".github/workflows/compile-examples.ya?ml" + - "library.properties" + - "examples/**" + - "src/**" + schedule: + # Run every Tuesday at 8 AM UTC to catch breakage caused by changes to external resources (libraries, platforms). + - cron: "0 8 * * TUE" + workflow_dispatch: + repository_dispatch: + +env: + UNIVERSAL_SKETCH_PATHS: | + - examples + SKETCHES_REPORTS_PATH: sketches-reports + SKETCHES_REPORTS_ARTIFACT_NAME: sketches-reports + +jobs: + build: + name: ${{ matrix.board.fqbn }} + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: read + + strategy: + fail-fast: false + + matrix: + board: + - fqbn: arduino:zephyr:unoq + platforms: | + - name: arduino:zephyr + artifact-name-suffix: arduino-uno_q + + steps: + - name: Checkout repository + uses: actions/checkout@v5 + + - name: Compile examples + uses: arduino/compile-sketches@v1 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + fqbn: ${{ matrix.board.fqbn }} + platforms: ${{ matrix.board.platforms }} + libraries: | + # Install the library from the local path. + - source-path: ./ + - name: Arduino_RPClite + # Additional library dependencies can be listed here. + # See: https://github.com/arduino/compile-sketches#libraries + sketch-paths: | + ${{ env.UNIVERSAL_SKETCH_PATHS }} + ${{ matrix.board.additional-sketch-paths }} + enable-deltas-report: true + sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }} + + - name: Save sketches report as workflow artifact + uses: actions/upload-artifact@v5 + with: + if-no-files-found: error + name: sketches-report-${{ matrix.board.artifact-name-suffix }} + path: ${{ env.SKETCHES_REPORTS_PATH }} \ No newline at end of file From bca9999d82d39923e677b709f256d98b1dfd5cf0 Mon Sep 17 00:00:00 2001 From: Sebastian Romero Date: Mon, 10 Nov 2025 14:30:34 +0100 Subject: [PATCH 2/3] maintenance: Add linting workflow --- .github/workflows/arduino-lint.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/arduino-lint.yml diff --git a/.github/workflows/arduino-lint.yml b/.github/workflows/arduino-lint.yml new file mode 100644 index 0000000..09c47e2 --- /dev/null +++ b/.github/workflows/arduino-lint.yml @@ -0,0 +1,27 @@ +name: Arduino Lint + +# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows +on: + push: + pull_request: + schedule: + # Run every Tuesday at 8 AM UTC to catch breakage caused by new rules added to Arduino Lint. + - cron: "0 8 * * TUE" + workflow_dispatch: + repository_dispatch: + +jobs: + lint: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Arduino Lint + uses: arduino/arduino-lint-action@v2 + with: + compliance: specification + library-manager: update # Change to 'update' once the library is published. + official: true # Always use this setting for official repositories. + project-type: library From cc76ed55ba9f0a1886b7e3ccaeda8617afdb1e76 Mon Sep 17 00:00:00 2001 From: Sebastian Romero Date: Mon, 10 Nov 2025 14:37:02 +0100 Subject: [PATCH 3/3] maintenance: Add workflow to report size deltas --- .github/workflows/report-size-deltas.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/report-size-deltas.yml diff --git a/.github/workflows/report-size-deltas.yml b/.github/workflows/report-size-deltas.yml new file mode 100644 index 0000000..d771b0d --- /dev/null +++ b/.github/workflows/report-size-deltas.yml @@ -0,0 +1,24 @@ +name: Report Size Deltas + +# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows +on: + push: + paths: + - ".github/workflows/report-size-deltas.yml" + schedule: + # Run at the minimum interval allowed by GitHub Actions. + # Note: GitHub Actions periodically has outages which result in workflow failures. + # In this event, the workflows will start passing again once the service recovers. + - cron: "*/5 * * * *" + workflow_dispatch: + repository_dispatch: + +jobs: + report: + runs-on: ubuntu-latest + steps: + - name: Comment size deltas reports to PRs + uses: arduino/report-size-deltas@v1 + with: + # Regex matching the names of the workflow artifacts created by the "Compile Examples" workflow + sketches-reports-source: ^sketches-report-.+ \ No newline at end of file