Open-Source-Ventilator icon indicating copy to clipboard operation
Open-Source-Ventilator copied to clipboard

Configure the CI with GitHub Actions

Open ZakCodes opened this issue 4 years ago • 8 comments

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:

![Build Status](https://github.com/actions/hello-world/workflows/Greet%20Everyone/badge.svg)
<!-- 
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:

ZakCodes avatar Mar 24 '20 12:03 ZakCodes

I will look at doing this very soon!

mattd3v avatar Mar 24 '20 19:03 mattd3v

PR #31 sets up and compiles the project.

mattd3v avatar Apr 09 '20 21:04 mattd3v

https://gitlab.com/open-source-ventilator/ventilator/OpenLung/-/issues/146 is a parallel issue to this over on GitLab.

karx avatar Apr 17 '20 21:04 karx

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 avatar Apr 17 '20 21:04 karx

@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 avatar Apr 26 '20 19:04 ladvine

@ladvine awesome!

So these builds will run on all PRs and add label?

karx avatar Apr 27 '20 05:04 karx

@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:-

  1. Add label when build is successful.
  2. Checking the code formatting against a code convention using clang-format
  3. 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)

ladvine avatar Apr 28 '20 15:04 ladvine

Hi, we are a team that needs your feedback to complete our idea. Please visit our pages and comment on it. github gitlab

nimamoslemy avatar May 01 '20 16:05 nimamoslemy