Skip to content

Commit 26f371d

Browse files
committed
Test support of pyserial external dependency of ESP32 platform
Although Arduino boards platforms traditionally have bundled all dependencies, the ESP32 boards platform expects the pyserial Python package to be preinstalled on Linux systems. Although there is already test coverage and support for user installation of arbitrary Python package dependencies of a platform, the situation is more complex when it comes to this important boards platform. The problem is that there is an established use pattern that should be supported to avoid breaking user workflows. The added test checks for regressions in that support.
1 parent dc45fe1 commit 26f371d

File tree

3 files changed

+42
-0
lines changed

3 files changed

+42
-0
lines changed

.github/workflows/test-integration.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,35 @@ jobs:
231231
- ${{ env.TESTDATA_SKETCHES_PATH }}/BareMinimum
232232
233233
234+
# Targeted testing for ESP32 boards platform support.
235+
pyserial-dependency:
236+
runs-on: ubuntu-latest
237+
238+
steps:
239+
- name: Checkout local repo
240+
uses: actions/checkout@v3
241+
242+
- name: Install pyserial
243+
run: |
244+
# Use of pip3 and omission of recommended flags done to reproduce established use pattern:
245+
# https://github.com/arduino-libraries/ArduinoIoTCloud/blob/1.11.0/.github/workflows/compile-examples.yml#L206
246+
pip3 install pyserial
247+
248+
- name: Run action with board that has pyserial dependency
249+
# Use action from local path
250+
uses: ./
251+
with:
252+
platforms: |
253+
- name: arduino:avr
254+
- source-path: ${{ env.TESTDATA_PLATFORMS_PATH }}/PyserialDependent
255+
name: PyserialDependent:avr
256+
fqbn: PyserialDependent:avr:pyserial_dependent
257+
libraries: |
258+
[]
259+
sketch-paths: |
260+
- ${{ env.TESTDATA_SKETCHES_PATH }}/BareMinimum
261+
262+
234263
check-sketches-reports:
235264
needs: all-inputs
236265
runs-on: ubuntu-latest
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
pyserial_dependent.name=pyserial Dependent Board
2+
pyserial_dependent.upload.maximum_size=32256
3+
pyserial_dependent.upload.maximum_data_size=2048
4+
pyserial_dependent.build.mcu=atmega328p
5+
pyserial_dependent.build.f_cpu=16000000L
6+
pyserial_dependent.build.board=FOO
7+
pyserial_dependent.build.core=arduino:arduino
8+
pyserial_dependent.build.variant=arduino:standard
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
name=pyserial Dependent Platform
2+
version=0.0.0
3+
# python3 is used to parallel ESP32 platform configuration:
4+
# https://github.com/espressif/arduino-esp32/blob/2.0.7/platform.txt#L220
5+
recipe.hooks.prebuild.1.pattern=python3 -c 'import serial'

0 commit comments

Comments
 (0)