Anyone using GitHub Actions for CI and PlatformIO?

treemount

New member
I recently transitioned to doing all my development in VSCode/PlatformIO (instead of Arduino IDE)...it's life changing. I've also started playing around with GitHub Action workflows which let you run checks when you commit to your repository. Right now I have it set to compile my project and alert me if the compilation passed or failed. There are many other things that are possible that I haven't done yet, such as running unit test scripts, etc. Anyone here doing something similar? It's probably possible to write a test script that compiles and uploads to real hardware, but I haven't figured that out yet.
 
Similar discussion here:
https://forum.pjrc.com/threads/61963-Remove-compiler-warnings-from-libraries-we-ship

Our workflow is a little different - we're using GitLab and CMake for compiling software for Teensy. Our version of the core is here:
https://gitlab.com/bolderflight/software/core

With CMake, I setup a target for uploading using the Teensy CLI. On Linux, the CLI enables you to request an auto restart if it's the only Teensy plugged into the computer (otherwise, it'll upload code to the first one it sees). I've been playing around a little bit with a CI pipeline using Teensy hardware connected to sensors. I setup a Raspberry PI as a CI runner for GitLab. We do a linting step with the Google C++ linting script and then have a build and upload using the targets defined in CMake. The nice thing with the Raspberry Pi is it can cycle the USB power, which will get any sensors or devices connected to the Teensy in a clean state.

Currently, I'm using test script that runs on the Teensy, which defines tests. The Raspberry Pi commands the test and receives a bool status back on whether the test passed or failed. I'd like to work out an approach that would allow us to define tests more quickly, ideally using the google test framework, and receive a wider range of data back, but haven't had time to work it out yet.
 
Have you got any further with this? I was looking for an emulation of the teensy platform for running within a github action/gitlab CI, but couldn't find anything.
 
Back
Top