automatic generation of bin/hex/uf2 files for arduino in continuous integration

226 views
Skip to first unread message

phillip torrone

unread,
Sep 15, 2021, 10:36:31 PM9/15/21
to Developers
here is an update to our arduino-ci continuous integration script for github actions to create artifacts for example sketches and attach them to both the pr and releases.

... if we have a library with an example sketch, we can compile it with arduino-cli to generate the hex/bin/uf2 file when we do our compilation test, and then saving those files for users to try out.

for example, here's our github repo for the is31fl371 driver chip:
https://github.com/adafruit/Adafruit_IS31FL3741

and here is a pr we did (the pr that adds the artifacts, as it happens!):
https://github.com/adafruit/Adafruit_IS31FL3741/pull/1

when visiting the actions run here:
https://github.com/adafruit/Adafruit_IS31FL3741/actions/runs/1239270699

there is a "Artifacts" section at the bottom with a zip file, containing the outputs for each of our desired platforms

on releases, we do the same, auto-uploading a release.zip with the files for that release:
https://github.com/adafruit/Adafruit_IS31FL3741/releases/tag/1.0.2

platforms are 'tagged' for artifact generation by creating a .platformname.generate file as shown here:
https://github.com/adafruit/Adafruit_IS31FL3741/tree/main/examples/gfxdemo

and here's the actions workflow:
https://github.com/adafruit/Adafruit_IS31FL3741/blob/main/.github/workflows/githubci.yml

we think it will be helpful for people who are writing code for deployment to multiple boards, or if you want to do quick hardware tests on pull requests without having to do the fork/branch/compile/upload/merge dance. it works particularly well with uf2 files of course, since you can just drag-n-drop them.

for questions & bug reports, please open an issue @:
https://github.com/adafruit/ci-arduino

cheers,
pt & limor
Reply all
Reply to author
Forward
0 new messages