From b8e040bdc27db812b3d13b40f3228d64454694d7 Mon Sep 17 00:00:00 2001 From: Jason Milldrum <2057457+NT7S@users.noreply.github.com> Date: Fri, 16 Oct 2026 14:14:05 -0700 Subject: [PATCH 1/3] CI: compile examples on AVR, ESP32, SAMD, RP2040 with size reports --- .github/workflows/main.yml | 68 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d6ed692..99190b9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,4 +1,7 @@ +name: CI + on: [push, pull_request] + jobs: lint: runs-on: ubuntu-latest @@ -7,3 +10,68 @@ jobs: - uses: arduino/arduino-lint-action@v2 with: library-manager: update + + compile-sketches: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + board: + - fqbn: arduino:avr:uno + platforms: | + - name: arduino:avr + - fqbn: esp32:esp32:esp32 + platforms: | + - name: esp32:esp32 + source-url: https://espressif.github.io/arduino-esp32/package_esp32_index.json + - fqbn: arduino:samd:mkrzero + platforms: | + - name: arduino:samd + - fqbn: rp2040:rp2040:rpipico + platforms: | + - name: rp2040:rp2040 + source-url: https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json + steps: + - uses: actions/checkout@v4 + - uses: arduino/compile-sketches@v1 + with: + fqbn: ${{ matrix.board.fqbn }} + platforms: ${{ matrix.board.platforms }} + libraries: | + - source-path: ./ + # examples/si5351_vcxo is excluded: on master it calls get_correction() + # without the required argument and fails to compile. PR #107 fixes it; + # add "- examples/si5351_vcxo" back here once #107 is merged. + sketch-paths: | + - examples/si5351_calibration + - examples/si5351_clk67_example + - examples/si5351_example + - examples/si5351_ext_ref + - examples/si5351_outputs + - examples/si5351_phase + - examples/si5351_sweeper + enable-deltas-report: true + sketches-report-path: sketches-reports + - uses: actions/upload-artifact@v4 + with: + name: sketches-report-${{ strategy.job-index }} + path: sketches-reports + + report-size-deltas: + if: github.event_name == 'pull_request' + needs: compile-sketches + runs-on: ubuntu-latest + permissions: + pull-requests: write + steps: + - uses: actions/download-artifact@v4 + with: + pattern: sketches-report-* + merge-multiple: true + path: sketches-reports + - uses: arduino/report-size-deltas@v1 + with: + sketches-reports-source: sketches-reports + + # Host tests: placeholder. Test design and harnesses are owned by Test Lab; + # a host-test job will be added in a separate change once Test Lab supplies it. From 9d1685e9cc7c371e7ab1df5f37cdc230fd394d0f Mon Sep 17 00:00:00 2001 From: Jason Milldrum <2057457+NT7S@users.noreply.github.com> Date: Fri, 16 Oct 2026 14:23:39 -0700 Subject: [PATCH 2/3] CI: least-privilege token, push only on master, per-board job names, scheduled size-deltas report for fork PRs --- .github/workflows/main.yml | 28 +++++++++++----------------- .github/workflows/size-deltas.yml | 27 +++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 17 deletions(-) create mode 100644 .github/workflows/size-deltas.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 99190b9..8eaeb82 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,9 +1,17 @@ name: CI -on: [push, pull_request] +on: + push: + branches: + - master + pull_request: + +permissions: + contents: read jobs: lint: + name: lint runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -12,6 +20,7 @@ jobs: library-manager: update compile-sketches: + name: compile (${{ matrix.board.fqbn }}) runs-on: ubuntu-latest strategy: fail-fast: false @@ -54,24 +63,9 @@ jobs: sketches-report-path: sketches-reports - uses: actions/upload-artifact@v4 with: + # Artifact names must match the regex in size-deltas.yml. name: sketches-report-${{ strategy.job-index }} path: sketches-reports - report-size-deltas: - if: github.event_name == 'pull_request' - needs: compile-sketches - runs-on: ubuntu-latest - permissions: - pull-requests: write - steps: - - uses: actions/download-artifact@v4 - with: - pattern: sketches-report-* - merge-multiple: true - path: sketches-reports - - uses: arduino/report-size-deltas@v1 - with: - sketches-reports-source: sketches-reports - # Host tests: placeholder. Test design and harnesses are owned by Test Lab; # a host-test job will be added in a separate change once Test Lab supplies it. diff --git a/.github/workflows/size-deltas.yml b/.github/workflows/size-deltas.yml new file mode 100644 index 0000000..ff61e59 --- /dev/null +++ b/.github/workflows/size-deltas.yml @@ -0,0 +1,27 @@ +name: Report size deltas + +# Runs on a schedule (per arduino/report-size-deltas docs) so it gets a +# write token and can comment on pull requests from forks. It scans recent +# workflow artifacts named sketches-report-* uploaded by the CI workflow. +# Note: scheduled workflows only run from the default branch, so this takes +# effect once merged to master. +on: + schedule: + - cron: "*/15 * * * *" + workflow_dispatch: + +permissions: + contents: read + +jobs: + report: + name: report size deltas + if: github.repository == 'etherkit/Si5351Arduino' + runs-on: ubuntu-latest + permissions: + actions: read + pull-requests: write + steps: + - uses: arduino/report-size-deltas@v1 + with: + sketches-reports-source: ^sketches-report-.+ From c1b67f5690fe4b0a32a96bbd67dd766816159370 Mon Sep 17 00:00:00 2001 From: Jason Milldrum <2057457+NT7S@users.noreply.github.com> Date: Fri, 16 Oct 2026 17:37:10 -0700 Subject: [PATCH 3/3] CI: compile the si5351_vcxo example again now that #107 fixed it --- .github/workflows/main.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8eaeb82..f5b4d38 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -48,9 +48,6 @@ jobs: platforms: ${{ matrix.board.platforms }} libraries: | - source-path: ./ - # examples/si5351_vcxo is excluded: on master it calls get_correction() - # without the required argument and fails to compile. PR #107 fixes it; - # add "- examples/si5351_vcxo" back here once #107 is merged. sketch-paths: | - examples/si5351_calibration - examples/si5351_clk67_example @@ -59,6 +56,7 @@ jobs: - examples/si5351_outputs - examples/si5351_phase - examples/si5351_sweeper + - examples/si5351_vcxo enable-deltas-report: true sketches-report-path: sketches-reports - uses: actions/upload-artifact@v4