From e8e61f0f5229e4d8224d3c40a0ca4e6f7f43bab5 Mon Sep 17 00:00:00 2001 From: Thomas Friedrichsmeier Date: Fri, 7 Apr 2023 14:14:29 +0200 Subject: [PATCH 1/9] Add more auto-checks --- .github/workflows/arduino_lint.yml | 18 ++++++++++++++++++ .github/workflows/compile_examples.yml | 3 +++ .github/workflows/report_size_deltas.yml | 16 ++++++++++++++++ 3 files changed, 37 insertions(+) create mode 100644 .github/workflows/arduino_lint.yml create mode 100644 .github/workflows/report_size_deltas.yml diff --git a/.github/workflows/arduino_lint.yml b/.github/workflows/arduino_lint.yml new file mode 100644 index 000000000..649ba0a83 --- /dev/null +++ b/.github/workflows/arduino_lint.yml @@ -0,0 +1,18 @@ +name: Arduino Lint +on: + push: + pull_request: + # Allow manual trigger + workflow_dispatch: + +jobs: + lint: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - uses: arduino/arduino-lint-action@v1 + with: + project-type: library + library-manager: update + compliance: specification diff --git a/.github/workflows/compile_examples.yml b/.github/workflows/compile_examples.yml index be5acaa8b..10ef5168c 100644 --- a/.github/workflows/compile_examples.yml +++ b/.github/workflows/compile_examples.yml @@ -41,6 +41,9 @@ jobs: platforms: | - name: esp8266:esp8266 source-url: https://arduino.esp8266.com/stable/package_esp8266com_index.json + - fqbn: arduino:mbed_giga:giga + platforms: | + - name: arduino:mbed_giga steps: - name: Checkout repository diff --git a/.github/workflows/report_size_deltas.yml b/.github/workflows/report_size_deltas.yml new file mode 100644 index 000000000..3d2d66977 --- /dev/null +++ b/.github/workflows/report_size_deltas.yml @@ -0,0 +1,16 @@ +name: Report Size Deltas + +on: + pull_request: + # Allow manual trigger + workflow_dispatch: + +jobs: + report: + runs-on: ubuntu-latest + steps: + - name: Comment size deltas reports to PRs + uses: arduino/report-size-deltas@v1 + with: + # The name of the workflow artifact created by the sketch compilation workflow + sketches-reports-source: sketches-reports From 200601b80bc2158d688e444aa789d48a0f30047f Mon Sep 17 00:00:00 2001 From: Thomas Friedrichsmeier Date: Fri, 7 Apr 2023 14:21:13 +0200 Subject: [PATCH 2/9] Remove giga builds, until the port has been merged --- .github/workflows/compile_examples.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/compile_examples.yml b/.github/workflows/compile_examples.yml index 10ef5168c..be5acaa8b 100644 --- a/.github/workflows/compile_examples.yml +++ b/.github/workflows/compile_examples.yml @@ -41,9 +41,6 @@ jobs: platforms: | - name: esp8266:esp8266 source-url: https://arduino.esp8266.com/stable/package_esp8266com_index.json - - fqbn: arduino:mbed_giga:giga - platforms: | - - name: arduino:mbed_giga steps: - name: Checkout repository From f09ce5eee1be228706bba49255b00d709b6057b0 Mon Sep 17 00:00:00 2001 From: Thomas Friedrichsmeier Date: Fri, 7 Apr 2023 14:32:48 +0200 Subject: [PATCH 3/9] Attempt to get delta reports working --- .github/workflows/report_size_deltas.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/report_size_deltas.yml b/.github/workflows/report_size_deltas.yml index 3d2d66977..20e264f47 100644 --- a/.github/workflows/report_size_deltas.yml +++ b/.github/workflows/report_size_deltas.yml @@ -9,6 +9,10 @@ jobs: report: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@v3 + with: + name: sketches-reports - name: Comment size deltas reports to PRs uses: arduino/report-size-deltas@v1 with: From 913f82d224ca5ba09e589ec41e518d51394fd11f Mon Sep 17 00:00:00 2001 From: Thomas Friedrichsmeier Date: Fri, 7 Apr 2023 14:38:21 +0200 Subject: [PATCH 4/9] Re-run --- .github/workflows/compile_examples.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/compile_examples.yml b/.github/workflows/compile_examples.yml index be5acaa8b..a00272775 100644 --- a/.github/workflows/compile_examples.yml +++ b/.github/workflows/compile_examples.yml @@ -4,14 +4,14 @@ name: Compile Examples on: push: paths: - - ".github/workflows/compile_examples.yml" + - ".github/workflows/**" - "examples/**" - "**.cpp" - "**.h" - "**.hpp" pull_request: paths: - - ".github/workflows/compile_examples.yml" + - ".github/workflows/**" - "examples/**" - "**.cpp" - "**.h" From f12cb1608d1496f3cedbb1d0f3f363b99e132752 Mon Sep 17 00:00:00 2001 From: Thomas Friedrichsmeier Date: Fri, 7 Apr 2023 14:41:46 +0200 Subject: [PATCH 5/9] Try within same job --- .github/workflows/compile_examples.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/compile_examples.yml b/.github/workflows/compile_examples.yml index a00272775..c84e1e7dc 100644 --- a/.github/workflows/compile_examples.yml +++ b/.github/workflows/compile_examples.yml @@ -70,3 +70,9 @@ jobs: if-no-files-found: error path: ${{ env.SKETCHES_REPORTS_PATH }} name: ${{ env.SKETCHES_REPORTS_PATH }} + + - name: Comment size deltas reports to PRs + uses: arduino/report-size-deltas@v1 + with: + # The name of the workflow artifact created by the sketch compilation workflow + sketches-reports-source: ${{ env.SKETCHES_REPORTS_PATH }} From f42d59f0556a828dad5933b8451f83e0710e84b9 Mon Sep 17 00:00:00 2001 From: Thomas Friedrichsmeier Date: Fri, 7 Apr 2023 14:45:19 +0200 Subject: [PATCH 6/9] Fix for matrix build --- .github/workflows/compile_examples.yml | 17 ++++++++++++++--- .github/workflows/report_size_deltas.yml | 20 -------------------- 2 files changed, 14 insertions(+), 23 deletions(-) delete mode 100644 .github/workflows/report_size_deltas.yml diff --git a/.github/workflows/compile_examples.yml b/.github/workflows/compile_examples.yml index c84e1e7dc..e1666aaeb 100644 --- a/.github/workflows/compile_examples.yml +++ b/.github/workflows/compile_examples.yml @@ -71,8 +71,19 @@ jobs: path: ${{ env.SKETCHES_REPORTS_PATH }} name: ${{ env.SKETCHES_REPORTS_PATH }} - - name: Comment size deltas reports to PRs - uses: arduino/report-size-deltas@v1 + # When using a matrix to compile for multiple boards, it's necessary to use a separate job for the deltas report + report: + needs: build # Wait for the compile job to finish to get the data for the report + if: github.event_name == 'pull_request' # Only run the job when the workflow is triggered by a pull request + runs-on: ubuntu-latest + steps: + # This step is needed to get the size data produced by the compile jobs + - name: Download sketches reports artifact + uses: actions/download-artifact@v2 + with: + name: ${{ env.SKETCHES_REPORTS_PATH }} + path: ${{ env.SKETCHES_REPORTS_PATH }} + + - uses: arduino/report-size-deltas@v1 with: - # The name of the workflow artifact created by the sketch compilation workflow sketches-reports-source: ${{ env.SKETCHES_REPORTS_PATH }} diff --git a/.github/workflows/report_size_deltas.yml b/.github/workflows/report_size_deltas.yml deleted file mode 100644 index 20e264f47..000000000 --- a/.github/workflows/report_size_deltas.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Report Size Deltas - -on: - pull_request: - # Allow manual trigger - workflow_dispatch: - -jobs: - report: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/download-artifact@v3 - with: - name: sketches-reports - - name: Comment size deltas reports to PRs - uses: arduino/report-size-deltas@v1 - with: - # The name of the workflow artifact created by the sketch compilation workflow - sketches-reports-source: sketches-reports From 139657d66a53e83cbb9932fa23ec7de7b6bf774c Mon Sep 17 00:00:00 2001 From: Thomas Friedrichsmeier Date: Fri, 7 Apr 2023 14:59:51 +0200 Subject: [PATCH 7/9] Try with a name set --- .github/workflows/compile_examples.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/compile_examples.yml b/.github/workflows/compile_examples.yml index e1666aaeb..9708bbf5f 100644 --- a/.github/workflows/compile_examples.yml +++ b/.github/workflows/compile_examples.yml @@ -69,7 +69,7 @@ jobs: with: if-no-files-found: error path: ${{ env.SKETCHES_REPORTS_PATH }} - name: ${{ env.SKETCHES_REPORTS_PATH }} + name: sketches-reports-artifact # When using a matrix to compile for multiple boards, it's necessary to use a separate job for the deltas report report: @@ -81,7 +81,7 @@ jobs: - name: Download sketches reports artifact uses: actions/download-artifact@v2 with: - name: ${{ env.SKETCHES_REPORTS_PATH }} + name: sketches-reports-artifact path: ${{ env.SKETCHES_REPORTS_PATH }} - uses: arduino/report-size-deltas@v1 From 06c1bd4af752e5ce3ee56368ef5ccba32c88f06c Mon Sep 17 00:00:00 2001 From: Thomas Friedrichsmeier Date: Fri, 7 Apr 2023 15:06:24 +0200 Subject: [PATCH 8/9] Dummy commit to test report accuracy --- examples/01.Basics/Sinewave/Sinewave.ino | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/01.Basics/Sinewave/Sinewave.ino b/examples/01.Basics/Sinewave/Sinewave.ino index 27b2d4a80..9285867d6 100644 --- a/examples/01.Basics/Sinewave/Sinewave.ino +++ b/examples/01.Basics/Sinewave/Sinewave.ino @@ -18,10 +18,10 @@ #include #include // oscillator template -#include // sine table for oscillator +#include // sine table for oscillator // use: Oscil oscilName (wavetable), look in .h file of table #included above -Oscil aSin(SIN2048_DATA); +Oscil aSin(SIN8192_DATA); // use #define for CONTROL_RATE, not a constant #define CONTROL_RATE 64 // Hz, powers of 2 are most reliable From 75a2e31d9add73cc552bd470ea80045f46ec49e1 Mon Sep 17 00:00:00 2001 From: Thomas Friedrichsmeier Date: Fri, 7 Apr 2023 15:06:46 +0200 Subject: [PATCH 9/9] Revert "Dummy commit to test report accuracy" This reverts commit 06c1bd4af752e5ce3ee56368ef5ccba32c88f06c. --- examples/01.Basics/Sinewave/Sinewave.ino | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/01.Basics/Sinewave/Sinewave.ino b/examples/01.Basics/Sinewave/Sinewave.ino index 9285867d6..27b2d4a80 100644 --- a/examples/01.Basics/Sinewave/Sinewave.ino +++ b/examples/01.Basics/Sinewave/Sinewave.ino @@ -18,10 +18,10 @@ #include #include // oscillator template -#include // sine table for oscillator +#include // sine table for oscillator // use: Oscil oscilName (wavetable), look in .h file of table #included above -Oscil aSin(SIN8192_DATA); +Oscil aSin(SIN2048_DATA); // use #define for CONTROL_RATE, not a constant #define CONTROL_RATE 64 // Hz, powers of 2 are most reliable