From 1223e5c240d5660de5c76b1e786de82224101d20 Mon Sep 17 00:00:00 2001 From: per1234 Date: Wed, 2 Sep 2020 19:53:03 -0700 Subject: [PATCH 1/3] Document procedure for managing compilation test CI failures caused by bugs in external components --- .github/workflows/compile-examples.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/compile-examples.yml b/.github/workflows/compile-examples.yml index 0a67737..caa1865 100644 --- a/.github/workflows/compile-examples.yml +++ b/.github/workflows/compile-examples.yml @@ -1,3 +1,17 @@ +# This workflow compiles the example sketches for one of each distinct type of active official Arduino board. +# +# This requires the use of external components (e.g., libraries, boards platform, toolchain), so it is possible for +# compilations to be broken by bugs in the external components, even though the example itself is perfect. +# +# If this happens, the procedure is: +# - Report the bug to the appropriate issue tracker. +# - Adjust this workflow to remove the compilation for the specific board/sketch combination that is failing due to the +# bug. +# - Add a comment to the workflow providing the URL of the issue report. +# - Once the bug is fixed and the fix released, revert the commit that removed the failing compilation. +# - If the issue is closed as "wontfix", add a comment to the affected examples documenting the incompatibility and open +# an issue requesting that the associated tutorials be updated. + name: Compile Examples on: From 7d9cc3b23ba7f0b8d8c9421d1f0c5dac1d5a528d Mon Sep 17 00:00:00 2001 From: per1234 Date: Wed, 2 Sep 2020 19:52:21 -0700 Subject: [PATCH 2/3] Remove compilations of sketches using tone() for Due from CI workflow The tone() function has not been implemented in the core library of the Due's "Arduino ARM (32-bits) Boards" platform. Should the day ever come when this standardized component of the Arduino API is provided for the Due, this commit should be reverted. --- .github/workflows/compile-examples.yml | 33 ++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/.github/workflows/compile-examples.yml b/.github/workflows/compile-examples.yml index caa1865..a955742 100644 --- a/.github/workflows/compile-examples.yml +++ b/.github/workflows/compile-examples.yml @@ -48,7 +48,11 @@ jobs: # Sketch paths to compile (recursive) for all boards UNIVERSAL_SKETCH_PATHS: >- "examples/01.Basics" - "examples/02.Digital" + "examples/02.Digital/BlinkWithoutDelay" + "examples/02.Digital/Button" + "examples/02.Digital/Debounce" + "examples/02.Digital/DigitalInputPullup" + "examples/02.Digital/StateChangeDetection" "examples/03.Analog" "examples/04.Communication/ASCIITable" "examples/04.Communication/Dimmer" @@ -76,36 +80,46 @@ jobs: usb: false serial1: false starter-kit: true + tone: true # Adding this in addition to the Uno because it has 1.5 kB less available flash - fqbn: arduino:avr:nano usb: false serial1: false starter-kit: false + tone: true - fqbn: arduino:avr:leonardo usb: true serial1: true starter-kit: false + tone: true - fqbn: arduino:megaavr:uno2018:mode=off usb: false serial1: true starter-kit: false + tone: true - fqbn: arduino:samd:mkrzero usb: true serial1: true starter-kit: false + tone: true - fqbn: arduino:mbed:nano33ble usb: false serial1: true starter-kit: false + tone: true # Change this to arduino:mbed:envie_m7 once there is a production release of the Arduino Mbed OS Boards platform - fqbn: arduino-beta:mbed:envie_m7 usb: false serial1: true starter-kit: false + tone: true - fqbn: arduino:sam:arduino_due_x usb: true serial1: true starter-kit: false + # Bug report: https://github.com/arduino/ArduinoCore-sam/issues/24 + # Change the value to true once it is fixed. + tone: false # Make board type-specific customizations to the matrix jobs include: @@ -139,6 +153,16 @@ jobs: - board: starter-kit: false starter-kit-sketch-paths: "" + - board: + tone: true + tone-sketch-paths: >- + "examples/02.Digital/toneKeyboard" + "examples/02.Digital/toneMelody" + "examples/02.Digital/toneMultiple" + "examples/02.Digital/tonePitchFollower" + - board: + tone: false + tone-sketch-paths: "" steps: - name: Checkout @@ -151,6 +175,11 @@ jobs: libraries: | ${{ env.UNIVERSAL_LIBRARIES }} ${{ matrix.usb-libraries }} - sketch-paths: '${{ env.UNIVERSAL_SKETCH_PATHS }} ${{ matrix.usb-sketch-paths }} ${{ matrix.serial1-sketch-paths }} ${{ matrix.starter-kit-sketch-paths }}' + sketch-paths: >- + ${{ env.UNIVERSAL_SKETCH_PATHS }} + ${{ matrix.usb-sketch-paths }} + ${{ matrix.serial1-sketch-paths }} + ${{ matrix.starter-kit-sketch-paths }} + ${{ matrix.tone-sketch-paths }} # This input can be removed once the repository is made public github-token: ${{ secrets.GITHUB_TOKEN }} From ea2cecbb046134121bde30bd4fb57a9ea5749856 Mon Sep 17 00:00:00 2001 From: per1234 Date: Wed, 2 Sep 2020 19:55:57 -0700 Subject: [PATCH 3/3] Remove compilations of sketches using pulseIn() for Portenta from CI workflow The pulseIn() function has not yet been implemented for the Portenta H7 boards in the core library of their "Arduino Mbed OS Boards (nRF52840 / STM32H747)" platform. Once the pulseIn() function has been implemented for Portenta H7 and a release of the platform made containing that implementation, this commit should be reverted. --- .github/workflows/compile-examples.yml | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/.github/workflows/compile-examples.yml b/.github/workflows/compile-examples.yml index a955742..3e2e142 100644 --- a/.github/workflows/compile-examples.yml +++ b/.github/workflows/compile-examples.yml @@ -65,7 +65,8 @@ jobs: "examples/04.Communication/SerialEvent" "examples/04.Communication/VirtualColorMixer" "examples/05.Control" - "examples/06.Sensors" + "examples/06.Sensors/ADXL3xx" + "examples/06.Sensors/Knock" "examples/07.Display" "examples/08.Strings" "examples/11.ArduinoISP" @@ -81,38 +82,47 @@ jobs: serial1: false starter-kit: true tone: true + pulsein: true # Adding this in addition to the Uno because it has 1.5 kB less available flash - fqbn: arduino:avr:nano usb: false serial1: false starter-kit: false tone: true + pulsein: true - fqbn: arduino:avr:leonardo usb: true serial1: true starter-kit: false tone: true + pulsein: true - fqbn: arduino:megaavr:uno2018:mode=off usb: false serial1: true starter-kit: false tone: true + pulsein: true - fqbn: arduino:samd:mkrzero usb: true serial1: true starter-kit: false tone: true + pulsein: true - fqbn: arduino:mbed:nano33ble usb: false serial1: true starter-kit: false tone: true + pulsein: true # Change this to arduino:mbed:envie_m7 once there is a production release of the Arduino Mbed OS Boards platform - fqbn: arduino-beta:mbed:envie_m7 usb: false serial1: true starter-kit: false tone: true + # Bug report: https://github.com/arduino/ArduinoCore-mbed/issues/48 + # Change the value to true once it is fixed. + pulsein: false - fqbn: arduino:sam:arduino_due_x usb: true serial1: true @@ -120,6 +130,7 @@ jobs: # Bug report: https://github.com/arduino/ArduinoCore-sam/issues/24 # Change the value to true once it is fixed. tone: false + pulsein: true # Make board type-specific customizations to the matrix jobs include: @@ -163,6 +174,14 @@ jobs: - board: tone: false tone-sketch-paths: "" + - board: + pulsein: true + pulsein-sketch-paths: >- + "examples/06.Sensors/Memsic2125" + "examples/06.Sensors/Ping" + - board: + pulsein: false + pulsein-sketch-paths: "" steps: - name: Checkout @@ -181,5 +200,6 @@ jobs: ${{ matrix.serial1-sketch-paths }} ${{ matrix.starter-kit-sketch-paths }} ${{ matrix.tone-sketch-paths }} + ${{ matrix.pulsein-sketch-paths }} # This input can be removed once the repository is made public github-token: ${{ secrets.GITHUB_TOKEN }}