Open-Source-Ventilator
Open-Source-Ventilator copied to clipboard
Configure the CI with GitHub Actions
It would be cool to have the CI configured for this project. I've configured the CI for an Arduino project on GitLab before by using arduino-cli, which you can see here (the project is french, sorry).
In the project I just linked, the CI includes the following thing:
- [ ] Compiling the project using arduino-cli
- [ ] Checking the code formatting against a code convention using clang-format
- [ ] Generating HTML documentation from the source code using Doxygen and publishing it to GitLab Pages (it could be published to GitHub Pages for this project)
It would also be cool to add a badge with the CI status in the README file like so many projects do like so:

<!--
This was taken from:
https://help.github.com/en/actions/configuring-and-managing-workflows/configuring-a-workflow#adding-a-workflow-status-badge-to-your-repository
-->
To do all this on GitHub, GitHub Actions is probably the best thing to use right now, since it is directly integrated into GitHub. However, there are other services available like TravisCI, CircleCI and Jenkins, but they require more configuration than GitHub Actions.
To help with setting up the different stages of the workflow, the following GitHub Actions helpers would be good to use:
- setup-arduino-cli: made by Arduino, configures arduino-cli to run in workflows
- clang-format-action: use clang-format to format C/C++ files using a coding standard
- doxygen-action: generate html docs using Doxygen
I will look at doing this very soon!
PR #31 sets up and compiles the project.
https://gitlab.com/open-source-ventilator/ventilator/OpenLung/-/issues/146 is a parallel issue to this over on GitLab.
To tackle the issue of jm_wire
I created forks for the 2 libraries that needed to be updated.
And used git to clone these libraries instead of Arduino library manager. The build is passing now using this.
NOTE: The libraries forks would have to be updated when the library update. The most recent update was 6 months ago, so not expected to be frequent. Looking into automating this.
@karx When i use the original jm_Wire library, i am too facing issues. I will make the CI build to use the libraries maintained in GitHub.
@ladvine awesome!
So these builds will run on all PRs and add label?
@ladvine awesome!
So these builds will run on all PRs and add label?
It will run on all PRs. But following things are still pending:-
- Add label when build is successful.
- Checking the code formatting against a code convention using clang-format
- Generating HTML documentation from the source code using Doxygen and publishing it to GitLab Pages (it could be published to GitHub Pages for this project)