Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to test hardware dependent code with Travis CI?

I just got to know about Travis CI and went through some of their docs. It seems to be a nice solution for open source projects.

With my reading so far through Travis docs, I am doubtful whether I will be able to connect it to my personal hardware in some manner.

I am working on some IoT related project written in C/C++ hosted on github. Building and publishing images on artifactory, on Travis CI should not be a problem. But when it comes to testing, definitely it cannot be tested on their (Travis's) hardware. The binaries need to be put on my development board (raspberry pi) and then test cases should be executed. Once test suit finishes, Travis CI should be notified of the results.

Is Travis allows such functionality? If not, then it would be a great limitation.

like image 999
Naveen Avatar asked Nov 08 '22 20:11

Naveen


1 Answers

But when it comes to testing, definitely it cannot be tested on their (Travis's) hardware

By this statement you answered your own question. If you want to use Travis for showing test status publicly, your best chance is running the tests on premises using Jenkins, GitLab CI or any other CI server and then offering an API to Travis (e.g. a file with the test results). All Travis would then do is fetching and showing the test results.

If you want to control things from within Travis, you could trigger builds from Travis using a HTTP call and then wait for the remote build to finish before showing its results. Both Jenkins and GitLab CI offer remote triggering. However, this requires your CI servers to be publicly accessible, which might be a security risk (e.g. people triggering non-stop builds).

like image 109
Hubert Grzeskowiak Avatar answered Nov 27 '22 22:11

Hubert Grzeskowiak