![]() |
Potential Git and CI integration
Many teams in the FIRST Robotics Competition use Git to manage their code.. Some teams even test their code on Continuous Integration services such as Travis CI or Jenkins. With the growing popularity of Git in FRC and the good coding practices that come with it, I was wondering if there was any interest in a System that would work with the RoboRIO to manage code versions and make deployment a lot smoother.
The idea is simple, whenever code it committed, the CI service builds the artifacts and tests them. If all tests are successful, the artifacts are uploaded to an external server where, upon update or boot, the RoboRIO will fetch the artifact, load it and restart the program. Alternatively, the required development tools could be loaded onto the RoboRIO system (javac/gradle or the FRC Toolchain) and the RoboRIO acting as a Git Remote to push to. This could potentially streamline the build process and make management much easier to achieve. For RobotPy, I believe no build system would be required as the sources could be loaded really easily, whereas for Java teams, the FRCUserProgram (or module if running Toast) would be built and copied to a temporary cache to be reloaded on code reboot. C++ teams would require the toolchain to be ported to the RIO. Before any developments are made, I'd like to ask if there is any interest in the project and if so, what features or concerns you have. A repo has been setup over at OpenRIO and is free for anyone to contribute to, however, feel free to post your thoughts here. I look forward to the development of this project, ~ Jaci R |
Re: Potential Git and CI integration
Quote:
For RobotPy, no build system is required. We experimented with it this off season, one of the tests was if we could put it under TravisCI easily (and thus get testing status before merging automatically) The code is available https://github.com/FRC125/NUPY and the tests are available at https://travis-ci.org/FRC125/NUPY The big change to the .travis.yml file was telling it to use the right version of python and install dependencies. The config file is https://github.com/FRC125/NUPY/blob/master/.travis.yml |
Re: Potential Git and CI integration
For an interpreted language such as python, it's super important to test your code before you upload it to the robot, as even simple syntax errors or referencing a variable that doesn't exist can put your robot dead in the water. That's why for years RobotPy has had first-class support for running your robot code without the robot -- which makes it super simple to integrate with a online CI system like Travis-CI.
It would be nice if off-robot testing were a first-class concept for the other robot languages, and I think that improving that situation would have a bigger impact on teams. After all, not everyone has an extra RoboRIO lying around to run a CI system on... and really, you shouldn't be running your robot on internet-connected networks! |
Re: Potential Git and CI integration
Quote:
|
Re: Potential Git and CI integration
Quote:
|
Re: Potential Git and CI integration
Quote:
|
Re: Potential Git and CI integration
Quote:
In my signature you can see the Toast project is fully supported under CI and metrics regarding documentation and code quality are generated as well. Modules also have full CI testing support thanks to GradleRIO |
Re: Potential Git and CI integration
Quote:
|
Re: Potential Git and CI integration
Quote:
But any chance this is published anywhere? |
Re: Potential Git and CI integration
Quote:
The good stuff is in frc971/control_loops/. It currently only builds on debian wheezy, amd64. One of these days, we'll finish open-sourcing the 2015 code... It is probably beyond what the majority of teams can do, but is useful for showing what is possible and helping inspire students to do better. I'll never claim that our code is 'simple' or 'easy'. :p |
Re: Potential Git and CI integration
Quote:
|
Re: Potential Git and CI integration
Quote:
|
Re: Potential Git and CI integration
Quote:
|
Re: Potential Git and CI integration
Digging up this thread because I think it's phenomenal.
am the current FRCSim developer. As FRCSim develops, this should hopefully become much easier to do. Gazebo can be run headless on a server, and since all the communication between WPILib and gazebo is done over Gazebo Transport, a message passing system built off protobuf, it should be way easier to write tests. How would you guys approach testing with frcsim? Would you write junit tests that calls your robot code? Or would you run your robot code as-is, and write a seperate "supervisor" program that messages the the robot code and listens for the appropriate effect in gazebo? Both seem viable to me. |
Re: Potential Git and CI integration
Quote:
Quote:
Quote:
|
| All times are GMT -5. The time now is 02:56. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi