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

[Proposal] Improve action-gz-ci for better maintainability and developer experience #80

Open
sauk2 opened this issue Nov 25, 2024 · 0 comments

Comments

@sauk2
Copy link

sauk2 commented Nov 25, 2024

Summary

The current implementation of action-gz-ci effectively sets up a basic Gazebo environment and runs tests. However, it has significant limitations regarding maintainability and developer usability. These challenges primarily arise because the action is written as a shell script and maintained in separate branches for each supported Ubuntu distribution.

Drawing on the experience gained during the development of the setup-gazebo, this proposal suggests a plan to rewrite action-gz-ci as a full-fledged GitHub Action that provides advanced configuration options, has improved documentation and a more maintainable codebase.

Current state of the action

The existing action-gz-ci performs the following steps:

  • Installs basic packages via apt and Python packages using pip.
  • Installs dependencies via apt using a predefined list of package names or compiles dependencies from source using a .repos file.
  • Builds the package using CMake and make and optionally runs tests.
  • Additional features include executing custom shell scripts at specific points (e.g., before the CMake step, between the CMake and make steps, after the make step and after tests).
  • Supports optional features such as linting with cpplint, static code analysis using cppcheck, generating documentation with Doxygen and test coverage reporting.

Key limitations

  • The action primarily uses CMake and make instead of colcon for building and testing. While colcon is used to build dependencies from source by providing a .repos file, it is not the default build tool.
  • The action only supports Ubuntu and is maintained as separate branches for different Ubuntu distributions.
  • It does not use rosdep for dependency installation but allows custom scripts to be run for this purpose.
  • No option exists for headless rendering during tests. Instead, users must configure headless rendering through custom scripts (e.g., using an after_make script).

Proposed improvements

Rewriting the action in TypeScript offers the opportunity to address these limitations and provide users with the following features:

  • Add support for colcon as a primary build and test tool, with options to specify colcon arguments directly.
  • Support dependency installation via rosdep using the package.xml and continue supporting .repos files for building dependencies from source.
  • Provide options to enable headless rendering for tests by allowing users to choose backends such as xvfb, EGL, or other suitable options.
  • Keep supporting options for linting, static code analysis, documentation generation, and test coverage reporting

The action-gz-ci is used in the CI pipelines of all the core Gazebo libraries so the idea is to replicate the current behaviour to minimize disruption for existing workflows. This proposal is meant to actively seek feedback from current users to ensure the new implementation suggestion addresses their needs and pain points.

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

1 participant