-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate to GitHub Actions #69
Conversation
983a8b8
to
8dc5488
Compare
This failed |
As you can see at the link these take 45min to complete. Merging this will atleast get you out of the Travis queue. |
almost all time is spent building MoveIt from source. I haven't checked, but is that necessary? The build of the calibration packages takes about 2 minutes. Edit: |
It should be, I can test this by restarting the CI run.
I'm not sure, it is also building a bunch of stuff from moveit's rosinstall file I'm sure is not needed (like tutorials). I can try configuring this to only build moveit (assuming it even needs that). |
Here is the link to the re-run job: https://github.com/tylerjw/moveit_calibration/pull/1/checks?check_run_id=2156360504 |
One thing interesting is the cache size it restored is 22 bytes which makes me think it isn't actually working. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See below. Otherwise lgtm.
- {ROS_DISTRO: melodic, ROS_REPO: main} | ||
env: | ||
CCACHE_DIR: ~/.ccache | ||
UPSTREAM_WORKSPACE: https://raw.githubusercontent.com/ros-planning/moveit/master/moveit.rosinstall |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of building against all MoveIt sources again, just reuse the melodic-source
docker container.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can try that, I'm not sure if that docker container plays nice with industrial_ci, but it might. I'll update this with the fixes I now know for the ccache stuff and uploading any test failures.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tylerjw so are you going to try it or do you want to have this merged before trying to change the container?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll fix this (and some other things I learned about last night) and then I'll post here when I think this is ready.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is now fixed, we are using the moveit source docker (for now, melodic) to test this and rviz_visual_tools from source and it works.
Thanks, everyone, for the input. I'm fine with leaving the I know in the past the source build was necessary for |
8dc5488
to
b9286c8
Compare
I just pushed changes with these changes:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, although that's not saying much--not my expertise.
@@ -8,7 +8,6 @@ AllowAllParametersOfDeclarationOnNextLine: false | |||
AllowShortIfStatementsOnASingleLine: false | |||
AllowShortLoopsOnASingleLine: false | |||
AllowShortFunctionsOnASingleLine: None | |||
AllowShortLoopsOnASingleLine: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was gonna say something about this, but decided to just open #72 instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know a better way to do this than copy-pasting it everywhere. This change is because we copy-pasted a yaml error everywhere, this is a duplicate of line 9 above it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could do something like what ament_clang_format does from ament_lint and install our .clang-format file as a resource from the moveit_common package or some other similar package, release that as a debian, depend on it, and then change our clang_format commands to use the ros resource lookup commands to find the path to it and use it. That seems like a real hassle though it would solve the problem of this being copy-pasted everywhere.
Assuming this passes on my fork I'll merge it and you can get started using it. |
I can't manually merge this (because travis, which no longer runs, is not reporting a status and the settings of this repo require all previous tests to pass). Could someone with the correct permissions in this repo push it? |
b9286c8
to
3baa9ab
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I did not participate in your herculean effort to migrate all the repos (thank you! 💐) and can't merge this without further questions.
I guess we should also disable the travis CI jobs in the config upon merging this request?
@@ -80,6 +80,6 @@ class HandEyeCalibrationGui : public rviz::Panel | |||
rviz_visual_tools::TFVisualToolsPtr tf_tools_; | |||
}; | |||
|
|||
} // namedist moveit_rviz_plugin | |||
} // namespace moveit_rviz_plugin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where do all these patches come from? Afaics the clang-format version and config didn't change? 😕
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The config changed because now we have a yaml syntax checker and our .clang-format file was invalid and causing clang-format to miss things.
- {ROS_DISTRO: melodic, ROS_REPO: main} | ||
env: | ||
CCACHE_DIR: ~/.ccache | ||
UPSTREAM_WORKSPACE: https://raw.githubusercontent.com/ros-planning/moveit/master/moveit.rosinstall |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tylerjw so are you going to try it or do you want to have this merged before trying to change the container?
I don't mind doing it either way. For moveit itself I'm going to need to update the container and there are some other improvements I learned about last night I can apply here to make this more performant. |
Merging this will disable travis for this repo. The reason this can't be merged automatically is GitHub is trying to stop someone from merging things by deleting the ci config (which is exactly what I did). Someone with write access to master has to merge this manually. |
091f24d
to
46bab1b
Compare
46bab1b
to
7b9f3e7
Compare
Codecov Report
@@ Coverage Diff @@
## master #69 +/- ##
=========================================
Coverage ? 72.75%
=========================================
Files ? 10
Lines ? 554
Branches ? 0
=========================================
Hits ? 403
Misses ? 151
Partials ? 0 Continue to review full report at Codecov.
|
f302f2f
to
545436f
Compare
@rhaschke I believe this is now ready. I added the codecov badge to the readme (as I think it's a nice thing to have) but I resisted putting the large srv graph of it there. Thank you again for reviewing all these. |
545436f
to
a222428
Compare
With the combination of the moveit source docker image and upstream repo caching, the CI runs for this is ~4min. 🎉 |
I closed and re-opened this to see if I could get rid of the TravisCI requirement. It didn't work. |
industrial_ci: | ||
env: | ||
DOCKER_IMAGE: 'moveit/moveit:melodic-source' | ||
UPSTREAM_WORKSPACE: 'upstream.rosinstall' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seeing as this is only a single package, something like should also work (and reduce the nr of files the configuration is spread across):
UPSTREAM_WORKSPACE='github:PickNikRobotics/rviz_visual_tools#master'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm using a cache of that file to determine if I should re-use the cache of the upstream workspace. If I make this change I don't need that hash, but if someone changes this line then they could introduce confusing situations with the upstream cache.
Short story: that change would make this PR simpler as it is with the sideafect of if someone changes it later confusing things might happen. I could go either way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't caching workspaces potentially problematic anyway? You run the risk of dependencies changing and your cache becoming invalid. The hash would not change, but you'd either still have to get additional packages installed, or you'd miss the missing dependencies and end up with failed builds.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm specifically caching the upstream_ws
folder. If the repos are changed (by changing that file) the cache is invalidated and re-created. If instead the repos themselves have changes since the cache was created, the cache gets updated. This is done by the line AFTER_SETUP_UPSTREAM_WORKSPACE: 'vcs pull $BASEDIR/upstream_ws/src'
and because the upstream_cache uses ${{ github.run_id }}
at the end of the key (meaning that it'll overwrite the cache on each run at the end of the run).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only risk I see with this approach to caching the upstream if somehow incremental builds of the upstream workspace is problematic. In either case the rosdep
step is called after the vcs pull
so if there are changed binary dependencies that's handled nicely.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the industrial_ci builds attempts to update dependencies from the upstream_ws and build it in any case.
However, if the cached upstream_ws was loaded before, this is most of the time a noop.
Only if there are changes, they will be performed. If you change your dependencies (in upstream.install
) the cache becomes invalid automatically. Gijs' approach should work as well - if you hash the industrial_ci_action.yml
file.
However, this might invalidate the cache more often then needed (not all changes to this file will change the dependencies). Hence, Tyler's approach is perfectly fine and preferred from my side.
matrix: | ||
- TEST=catkin_lint | ||
- UPSTREAM_WORKSPACE=https://raw.githubusercontent.com/ros-planning/moveit/master/moveit.rosinstall | ||
TEST_BLACKLIST=moveit_ros_perception |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need to disable moveit_ros_perception
tests anymore? Cool!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
industrial_ci isn't running the upstream tests... but I haven't seen any issues with them when running moveit itself either.
This will rescue this repo out of the grasp of Travis. I'll post a link to a fork where it'll run so you can see it pass before merging.
Test is running here: tylerjw#1