From 9c3a3da0943358f361c9f0d21ebe741a381654ad Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Tue, 8 Jun 2021 22:46:52 +0100 Subject: [PATCH 01/12] Add check-arduino Config from: https://github.com/arduino-libraries/Arduino_APDS9960/blob/master/.github/workflows/check-arduino.yml --- check-arduino.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 check-arduino.yml diff --git a/check-arduino.yml b/check-arduino.yml new file mode 100644 index 0000000..5df60fc --- /dev/null +++ b/check-arduino.yml @@ -0,0 +1,28 @@ +name: Check Arduino + +# 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@v2 + + - name: Arduino Lint + uses: arduino/arduino-lint-action@v1 + with: + compliance: strict + library-manager: update + # Always use this setting for official repositories. Remove for 3rd party projects. + official: true + project-type: library From 7aa01b46e2f96b6b666ae4e40494ee76aed177ec Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Tue, 8 Jun 2021 22:47:58 +0100 Subject: [PATCH 02/12] Rename check-arduino.yml to .github/workflows/check-arduino.yml --- check-arduino.yml => .github/workflows/check-arduino.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename check-arduino.yml => .github/workflows/check-arduino.yml (100%) diff --git a/check-arduino.yml b/.github/workflows/check-arduino.yml similarity index 100% rename from check-arduino.yml rename to .github/workflows/check-arduino.yml From 1174872732bad59aac6029babe1c0b036f7d6b71 Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Tue, 8 Jun 2021 22:48:41 +0100 Subject: [PATCH 03/12] Create compile-examples.yml Config from https://github.com/arduino-libraries/Arduino_APDS9960/blob/master/.github/workflows/compile-examples.yml --- .github/workflows/compile-examples.yml | 90 ++++++++++++++++++++++++++ 1 file changed, 90 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..7800abc --- /dev/null +++ b/.github/workflows/compile-examples.yml @@ -0,0 +1,90 @@ +name: Compile Examples + +# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows +on: + push: + paths: + - ".github/workflows/compile-examples.yml" + - "examples/**" + - "src/**" + pull_request: + paths: + - ".github/workflows/compile-examples.yml" + - "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: + +jobs: + build: + name: ${{ matrix.board.fqbn }} + runs-on: ubuntu-latest + + env: + SKETCHES_REPORTS_PATH: sketches-reports + + strategy: + fail-fast: false + + matrix: + board: + - fqbn: arduino:avr:nano + platforms: | + - name: arduino:avr + - fqbn: arduino:avr:mega + platforms: | + - name: arduino:avr + - fqbn: arduino:avr:leonardo + platforms: | + - name: arduino:avr + - fqbn: arduino:megaavr:nona4809 + platforms: | + - name: arduino:megaavr + - fqbn: arduino:sam:arduino_due_x_dbg + platforms: | + - name: arduino:sam + - fqbn: arduino:samd:mkrzero + platforms: | + - name: arduino:samd + - fqbn: arduino:mbed_portenta:envie_m4 + platforms: | + - name: arduino:mbed_portenta + - fqbn: arduino:mbed_portenta:envie_m7 + platforms: | + - name: arduino:mbed_portenta + - fqbn: arduino:mbed_nano:nano33ble + platforms: | + - name: arduino:mbed_nano + - fqbn: arduino:mbed_nano:nanorp2040connect + platforms: | + - name: arduino:mbed_nano + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - 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: ./ + # Additional library dependencies can be listed here. + # See: https://github.com/arduino/compile-sketches#libraries + sketch-paths: | + - examples + enable-deltas-report: true + sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }} + + - name: Save sketches report as workflow artifact + uses: actions/upload-artifact@v2 + with: + if-no-files-found: error + path: ${{ env.SKETCHES_REPORTS_PATH }} + name: ${{ env.SKETCHES_REPORTS_PATH }} From 0f228a73aa0071c979ccbf0fd764c1ce09ff3c32 Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Tue, 8 Jun 2021 22:49:21 +0100 Subject: [PATCH 04/12] Create report-size-deltas.yml Config from https://github.com/arduino-libraries/Arduino_APDS9960/blob/master/.github/workflows/report-size-deltas.yml --- .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..652be5d --- /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: + # The name of the workflow artifact created by the sketch compilation workflow + sketches-reports-source: sketches-reports From 96fac8c5f819c7949a7a6f791dbe9dae704e1dd2 Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Tue, 8 Jun 2021 22:52:22 +0100 Subject: [PATCH 05/12] Not an official Arduino lib --- .github/workflows/check-arduino.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check-arduino.yml b/.github/workflows/check-arduino.yml index 5df60fc..6085def 100644 --- a/.github/workflows/check-arduino.yml +++ b/.github/workflows/check-arduino.yml @@ -24,5 +24,5 @@ jobs: compliance: strict library-manager: update # Always use this setting for official repositories. Remove for 3rd party projects. - official: true + official: fa;se project-type: library From 6312de65bab4369b0e8119f0e6dd18d576158b7c Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Tue, 8 Jun 2021 22:55:08 +0100 Subject: [PATCH 06/12] Fix a typo --- .github/workflows/check-arduino.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check-arduino.yml b/.github/workflows/check-arduino.yml index 6085def..083a6f0 100644 --- a/.github/workflows/check-arduino.yml +++ b/.github/workflows/check-arduino.yml @@ -24,5 +24,5 @@ jobs: compliance: strict library-manager: update # Always use this setting for official repositories. Remove for 3rd party projects. - official: fa;se + official: false project-type: library From d71a5a2f1c1ddc3a2e18b658bfb51798723048b2 Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Tue, 8 Jun 2021 22:56:37 +0100 Subject: [PATCH 07/12] Don't build on the platforms that don't work --- .github/workflows/compile-examples.yml | 44 ++++++++++++++------------ 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/.github/workflows/compile-examples.yml b/.github/workflows/compile-examples.yml index 7800abc..6c50b70 100644 --- a/.github/workflows/compile-examples.yml +++ b/.github/workflows/compile-examples.yml @@ -40,27 +40,29 @@ jobs: - fqbn: arduino:avr:leonardo platforms: | - name: arduino:avr - - fqbn: arduino:megaavr:nona4809 - platforms: | - - name: arduino:megaavr - - fqbn: arduino:sam:arduino_due_x_dbg - platforms: | - - name: arduino:sam - - fqbn: arduino:samd:mkrzero - platforms: | - - name: arduino:samd - - fqbn: arduino:mbed_portenta:envie_m4 - platforms: | - - name: arduino:mbed_portenta - - fqbn: arduino:mbed_portenta:envie_m7 - platforms: | - - name: arduino:mbed_portenta - - fqbn: arduino:mbed_nano:nano33ble - platforms: | - - name: arduino:mbed_nano - - fqbn: arduino:mbed_nano:nanorp2040connect - platforms: | - - name: arduino:mbed_nano + # No serial port/incorrect serial config + #- fqbn: arduino:megaavr:nona4809 + # platforms: | + # - name: arduino:megaavr + # No EEPROM library in all the below + #- fqbn: arduino:sam:arduino_due_x_dbg + # platforms: | + # - name: arduino:sam + #- fqbn: arduino:samd:mkrzero + # platforms: | + # - name: arduino:samd + #- fqbn: arduino:mbed_portenta:envie_m4 + # platforms: | + # - name: arduino:mbed_portenta + #- fqbn: arduino:mbed_portenta:envie_m7 + # platforms: | + # - name: arduino:mbed_portenta + #- fqbn: arduino:mbed_nano:nano33ble + # platforms: | + # - name: arduino:mbed_nano + #- fqbn: arduino:mbed_nano:nanorp2040connect + # platforms: | + # - name: arduino:mbed_nano steps: - name: Checkout repository From 1fa80a19c6cb5abb940ef7dcaa4ba9d57e6c842f Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Wed, 26 Jan 2022 14:31:26 +0000 Subject: [PATCH 08/12] Correct a comment --- .github/workflows/arduino-checks.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/arduino-checks.yml b/.github/workflows/arduino-checks.yml index f2f2096..5807b83 100644 --- a/.github/workflows/arduino-checks.yml +++ b/.github/workflows/arduino-checks.yml @@ -4,7 +4,7 @@ name: Arduino Library Checks # Controls when the action will run. on: - # Triggers the workflow on push or pull request events but only for the develop branch + # Triggers the workflow on push or pull request events but only for the develop and master branches push: branches: [develop,master] pull_request: From b4c55edd118b56fcb3708900bbceb1436933f648 Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Wed, 26 Jan 2022 14:34:19 +0000 Subject: [PATCH 09/12] Superseded by https://github.com/mathertel/DmxSerial2/blob/master/.github/workflows/arduino-checks.yml --- .github/workflows/check-arduino.yml | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 .github/workflows/check-arduino.yml diff --git a/.github/workflows/check-arduino.yml b/.github/workflows/check-arduino.yml deleted file mode 100644 index 083a6f0..0000000 --- a/.github/workflows/check-arduino.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Check Arduino - -# 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@v2 - - - name: Arduino Lint - uses: arduino/arduino-lint-action@v1 - with: - compliance: strict - library-manager: update - # Always use this setting for official repositories. Remove for 3rd party projects. - official: false - project-type: library From fb012e305d1290b0fccd098d3e916c72cc39bfa7 Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Wed, 26 Jan 2022 14:43:50 +0000 Subject: [PATCH 10/12] Port some changes from #35 --- .github/workflows/arduino-checks.yml | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/.github/workflows/arduino-checks.yml b/.github/workflows/arduino-checks.yml index 5807b83..9c1df1e 100644 --- a/.github/workflows/arduino-checks.yml +++ b/.github/workflows/arduino-checks.yml @@ -54,7 +54,7 @@ jobs: verbose: true fqbn: arduino:avr:uno sketch-paths: | - - 'examples/RDMSerialRecv' + - examples compile-leonardo: needs: compile-uno @@ -71,7 +71,7 @@ jobs: verbose: true fqbn: arduino:avr:leonardo sketch-paths: | - - 'examples/RDMSerialRecv' + - examples compile-mega: needs: compile-uno @@ -88,4 +88,21 @@ jobs: verbose: true fqbn: arduino:avr:mega sketch-paths: | - - 'examples/RDMSerialRecv' + - examples + + compile-nano: + needs: compile-uno + name: compile examples for nano + runs-on: ubuntu-latest + continue-on-error: true + + steps: + - uses: actions/checkout@v2 + + - name: Compile for nano + uses: arduino/compile-sketches@v1 + with: + verbose: true + fqbn: arduino:avr:nano + sketch-paths: | + - examples From 061c608c97da46acf8d07963cee94f8be45a376b Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Wed, 26 Jan 2022 17:10:53 +0000 Subject: [PATCH 11/12] Explicitly list the sketches to compile as the search doesn't seem to work --- .github/workflows/compile-examples.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/compile-examples.yml b/.github/workflows/compile-examples.yml index 6c50b70..a882c26 100644 --- a/.github/workflows/compile-examples.yml +++ b/.github/workflows/compile-examples.yml @@ -80,7 +80,8 @@ jobs: # Additional library dependencies can be listed here. # See: https://github.com/arduino/compile-sketches#libraries sketch-paths: | - - examples + - examples/RDMSerialRecv/RDMSerialRecv.ino + - examples/RDMIntoDMXOut.ino enable-deltas-report: true sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }} From f6e3e55c436bdf8859c65e5415aa8d93ab6bc961 Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Wed, 26 Jan 2022 17:12:39 +0000 Subject: [PATCH 12/12] Try and fix the sketch searching --- .github/workflows/arduino-checks.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/arduino-checks.yml b/.github/workflows/arduino-checks.yml index 9c1df1e..dd9c764 100644 --- a/.github/workflows/arduino-checks.yml +++ b/.github/workflows/arduino-checks.yml @@ -54,7 +54,7 @@ jobs: verbose: true fqbn: arduino:avr:uno sketch-paths: | - - examples + - examples/ compile-leonardo: needs: compile-uno @@ -71,7 +71,7 @@ jobs: verbose: true fqbn: arduino:avr:leonardo sketch-paths: | - - examples + - examples/ compile-mega: needs: compile-uno @@ -88,7 +88,7 @@ jobs: verbose: true fqbn: arduino:avr:mega sketch-paths: | - - examples + - examples/ compile-nano: needs: compile-uno @@ -105,4 +105,4 @@ jobs: verbose: true fqbn: arduino:avr:nano sketch-paths: | - - examples + - examples/