InfiniTimeOrg / InfiniTime

Firmware for Pinetime smartwatch written in C++ and based on FreeRTOS
GNU General Public License v3.0
2.76k stars 944 forks source link

Set up CI to test all build targets #107

Closed Avamander closed 2 years ago

Avamander commented 4 years ago

It would be very useful to build all the possible targets (and flag combinations) when PRs or commits are made to the repository. This helps avoid mistakes.

If someone knows GH actions or some other CI service well enough, it'd be a nice contribution.

JF002 commented 4 years ago

Github Actions are already enabled on the repo, but I have to admit I don't know exactly how it works. They have been mainly contributed by @lupyuen.

My "dream" CI is something that is easy to deploy and run on any computer or server. Most CI tools I've found are either SaaS or unreasonably complex for a single project written in a single language.

There is a docker image that builds the whole project and generate all artifacts (bootloader, images, dfu,...). It just misses a bit of automation (automatically run when a new commit is pushed) and maybe a web frontend.

maidenone commented 4 years ago

you can soon run on my test nodes with the test API.

python3 runOnTestNode.py [testFile] [testNode] [fw.hex]

currently it does not return anything, but i will add a "job id" so you can get test results once the job is done. for now you have to manually check the test results...

luben93 commented 4 years ago

is this still an issue, if so i would like to help i am comfortable with CI workflows, and since my pinetime is broken i cant really help on more hardware related issues

JF002 commented 4 years ago

Yes, I think we can still work on this ! For now, we have Github Actions (people contributed to them, but I don't use them very often), a docker image and the testbench from @maidenone.

What do you have in mind for the CI?

maidenone commented 4 years ago

i can open up the ports needed for the comandline API tool to work, then every github action build can also trigger a test execution on real hardware.

in the future it will even be possible to link to test results and see pass/fail. for now you have to manually go to http://foss.site to see the results.

JF002 commented 4 years ago

Wow, a distributed C/I for PineTime, awesome!

luben93 commented 4 years ago

so i dont really have a concrete plan i was just thinking that i'd take the tools that you like working against the most and make them build on every commit in a PR for example, would it make sense to keep investing research in github actions or should we try and use a solution more tailored around BringYourOwnServer?

luben93 commented 4 years ago

im currently (albeit slowly, whenever i have time after work) looking into making the dockerfile without having to build it for 2+ minutes on my machine, i dont even want to know how slow its on arm, so that the docker container can just be downloaded and executed to build the code, which suites a CI workflow