Generate version.h with git branch and commit hash#2793
Generate version.h with git branch and commit hash#2793rhaschke merged 6 commits intomoveit:masterfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2793 +/- ##
==========================================
- Coverage 62.12% 62.09% -0.02%
==========================================
Files 375 375
Lines 33144 33144
==========================================
- Hits 20586 20577 -9
- Misses 12558 12567 +9
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
|
With our internal jenkins CI we need to use the following as it otherwise shows the branch as "head" don't know if that's need/works with github ci |
That's a pretty harsh requirement and would lead to incorrect results for user workspaces (including mine) the whole time!
What does that mean for catkin workspaces? it's also a hassle if catkin_make/catkin build has to configure the whole workspace each time. If that should be the case (I would expect that), maybe there's a way to generate the hash entry at build-time instead of using Also, we probably want to add the hash as output to moveit_version |
- regenerate version.h on every build - don't generate "alpha" postfix on buildfarm
|
I fixed the open issues:
|
* docker.yaml: Enable caching * [TEMP] moveit2_rolling.repos: add not yet released packages * Skip broken ci-testing image: osrf/ros2:testing doesn't contain /opt/ros! * use boost::timer::progress_display if available check for header to stay compatible with ubuntu 20.04. Support boost >= 1.83 Slightly ugly due to the double alias, but boost::timer was a class before 1.72, so using `boost::timer::progress_display` in the code breaks with older versions. * cherry-pick of moveit#3547 from MoveIt1 * Tag ci image as ci-testing as well --------- Co-authored-by: Michael Görner <me@v4hn.de> Co-authored-by: Sebastian Jahr <sebastian.jahr@picknik.ai> Co-authored-by: Henning Kayser <henningkayser@picknik.ai>
Description
This PR stores the git current branch and commit hash into the version header file. This is needed for benchmarking different commits so we can aggregate the results. This was taken from this blog who lead to this git repo.
Pitfalls
You have to re-cmake to update the hash definition. There is another solution that will force a re-configure of cmake before a build every time the HEAD commit changes.
Discussion
There may be better ways to find the
.gitfolder.We could remove the else block and define the git information as an empty string before the execute_process function.
Result
Generated
version.hfile: