Skip to content
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

Add colcon arguments for selecting packages to build #859

Open
rafal-gorecki opened this issue Apr 5, 2024 · 3 comments
Open

Add colcon arguments for selecting packages to build #859

rafal-gorecki opened this issue Apr 5, 2024 · 3 comments

Comments

@rafal-gorecki
Copy link

rafal-gorecki commented Apr 5, 2024

Hello,

  1. I'm looking for some solutions: to add option --packages-up-to <package_name> during the colcon build and test phase. How can be it done on Github Actions?
  2. I'd like to also add global environment variable, how can I add it? I try following solutions, but it didn't work:
      - uses: ros-industrial/industrial_ci@master
        env:
          ROS_DISTRO: ${{matrix.ROS_DISTRO}}
          global:
            - BEFORE_INIT='export HUSARION_ROS_BUILD_TYPE=simulation'

Regards

@CihatAltiparmak
Copy link

CihatAltiparmak commented Jun 21, 2024

Hello,

  1. I'm looking for some solutions: to add option --packages-up-to <package_name> during the colcon build and test phase. How can be it done on Github Actions?

Hello,

I solved the first one by giving colcon relavant arguments after cmake arguments. You can use this trick like below.

https://github.com/CihatAltiparmak/moveit_middleware_benchmark/blob/efc00b8968db64879e2c355c23ed3f43ca5600ae/.github/workflows/industrial_ci.yml#L13

When you ran this CI, you will see this command.

https://github.com/CihatAltiparmak/moveit_middleware_benchmark/actions/runs/9604667418/job/26490644523#step:3:1492

@mathias-luedtke
Copy link
Member

Another options it to remove the additional packages (actually directories) after cloning, see https://github.com/ros-industrial/industrial_ci/blob/master/doc/index.rst#workspace-management

@Ryanf55
Copy link

Ryanf55 commented Nov 28, 2024

This would be very handy to be automatic. For grid_map, on rolling, which relies on a small number of packages from nav2, it ends up building much more than necessary:

Finished <<< nav2_mppi_controller [8min 22s]
Finished <<< nav2_smac_planner [6min 8s]
Finished <<< nav2_collision_monitor [6min 52s]
Finished <<< nav2_behavior_tree [16min 13s]

Rather than manually keeping a skip list or a include list for upstream packages (which can change), I would prefer something like what like ChatGTP hallucinated, which is ironically a good idea:

UPSTREAM_PACKAGES: deps

Given that rosdep has an understanding of the ros2 graph, it seems that it would be feasible to only build packages UPSTREAM if they are dependend on in the target workspace.

Without this, when nav2 keeps adding more packages that take a long time to build and aren't necessary, I will have to keep increasing the skip list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants