From 9c3a3da0943358f361c9f0d21ebe741a381654ad Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Tue, 8 Jun 2021 22:46:52 +0100 Subject: [PATCH 1/7] 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 2/7] 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 3/7] 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 4/7] 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 5/7] 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 6/7] 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 7/7] 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