Bleson CI Testing

78 views
Skip to first unread message

Wayne Keenan

unread,
Dec 3, 2017, 9:04:50 AM12/3/17
to python-bleson

Hi,


AS we know, CI is a "good thing"(tm), bleson needs it for high quality releases, and in this case it should involve:

  1. Automating tests on all 3 platforms (Linux, Mac, Windows)
  2. Testing using real Bluetooth LE hardware on all platforms.
  3. Automating releases to PyPi for the `bleson` and the Win32 native extension `blesonwin`, only when tests pass.
  4. Using dedicated hardware (e.g. not ad-hoc developer laptops)


So...


I have implemented the above using a CI platform other than a hosted one like TravisCI,  as `bleson` needs to test against real hardware.

 

Some of the features of the implemented CI build process are:

  • GitHub webhooks trigger on PR and new tags (for releases to PyPi). 
  • The builds update the PR with status info, as TravisCI does.
  • Cross platform test suites:
    • Runs the test suite on Linux (Pi3 Jessie, physical HW)   
    • Runs the test suite on Mac (macOS 10.12, physical HW)
    • Runs the test suite on Windows (Win10 64bit, VM on a x86_64 Linux box)
    • Publish bleson to PyPi (from Linux)
    • Publish blesonwin to PyPi (from Windows)
  • Each test suite, on all platforms, has one or more tests to validate bleson works with real BLE hardware.
  • The `python-blesonwin` builder on Windows 10 builds 5 package variants: a source distro and 4 precompiled `wheels` for Python 3.5 and Python 3.6 (in 32 and 64 bit arch's variants, for both version) 
  • The Pi where the build worker runs has 2 BLE adapters; one of the tests in the test suite creates an observer on one adapter and an advertiser on the other, at the same time (e.g. a loopback/concurrency test). 


The BLE hardware in the testing rack in readiness for future testing against real devices & GATT services includes:


2x Micro:bit

1x nrf51 DK

2x nrf52 DK (Nordic and Rigado)

1x TI Sensor tagCC2650

1x Puck.JS


The Win,Mac and Linux hosts are also present in the same rack.


Horizontally scaling the build workers onto additional OS versions and variants can be added fairly easily.


I've been testing this against personal forks of the bleson and blesonwin repositories, with the uploads going to 'test' PyPi. 


My plan is that the CI for the repos in TheCellule org have their CI 'go live' sometime very soon, hopefully this week...



Wayne

Carlos Pereira Atencio

unread,
Dec 10, 2017, 5:45:00 PM12/10/17
to python-bleson
This is pretty awesome, great work Wayne!
Reply all
Reply to author
Forward
0 new messages