Add your description here
Project description
colcon-gha-visualize
A colcon extension that visualizes build job execution timelines using Mermaid gantt charts, with automatic GitHub Actions Step Summary integration.
Features
- Automatic Timeline Visualization: Generates Mermaid gantt charts showing when each job starts and ends
- Smart Lane Allocation: Automatically arranges parallel jobs in separate lanes to clearly show parallelism
- GitHub Actions Integration: Automatically outputs charts to
GITHUB_STEP_SUMMARYwhen running in GitHub Actions - Build Statistics: Displays max parallelism, lane usage, and total job count
- Job Status Visualization: Color-coded job results (success, failed, aborted)
Installation
# Using pip
pip install colcon-gha-visualize
# Using uv on development version
uv pip install -e .
Usage
The extension automatically activates as a colcon event handler. Simply run your colcon build commands as usual:
colcon build
To explicitly disable other event handlers and only use this one, run:
colcon build --event-handlers visualize-
Output
The chart will be:
- Written to GitHub Step Summary (if
GITHUB_STEP_SUMMARYenvironment variable is set)
Example Output
When running in GitHub Actions, you'll see a gantt chart like this in the Step Summary:
gantt
title Colcon Build Timeline
dateFormat HH:mm:ss
axisFormat %H:%M:%S
section Lane 1
pkg_a : done, 00:00:00, 5000ms
pkg_d : done, 00:00:05, 3000ms
section Lane 2
pkg_b : done, 00:00:01, 4000ms
pkg_e : crit, 00:00:05, 2000ms
section Lane 3
pkg_c : done, 00:00:02, 3000ms
Build Statistics
The extension also outputs:
- Max Parallelism: The maximum number of jobs running simultaneously
- Lanes Used: Number of lanes needed to visualize all parallel jobs
- Total Jobs: Total number of jobs in the build
How It Works
Lane Allocation Algorithm
The extension uses an intelligent lane allocation algorithm to arrange parallel jobs:
- Jobs are sorted by start time
- For each job, the algorithm finds the first available lane (where the previous job has ended)
- If no lane is available, a new lane is created
- This ensures jobs never overlap in the visualization while minimizing the number of lanes
Job Status Colors
- Green (done): Successful builds
- Red (crit): Failed or aborted builds
- Blue (active): Test failures
GitHub Actions Example
name: Build ROS Workspace
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
pip install colcon-common-extensions
pip install colcon-gha-visualize
- name: Build workspace
run: |
colcon build
The gantt chart will automatically appear in the job's Step Summary.
Development
Requirements
- Python >= 3.8
- colcon-core >= 0.20.1
License
Apache License 2.0
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file colcon_gha_visualize-0.1.0.tar.gz.
File metadata
- Download URL: colcon_gha_visualize-0.1.0.tar.gz
- Upload date:
- Size: 60.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3aff7654e48405420ac0782454e4648bc1b2a99fa70a6dd358335627975f2555
|
|
| MD5 |
3efb94fc37c504c863e1b50eb1dd4bb7
|
|
| BLAKE2b-256 |
f041747267a09734a4ab535f081012aa173df23751f89f0496e4bd2c777838a8
|
File details
Details for the file colcon_gha_visualize-0.1.0-py3-none-any.whl.
File metadata
- Download URL: colcon_gha_visualize-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1584d4a543e2c3798883230a16ac6b92c6f0be1430806452abae78a4bea76bd6
|
|
| MD5 |
85a8f1878643e2269e35e64634028ea2
|
|
| BLAKE2b-256 |
edc9efe55beed35acc611583623e842c42c70607a64078f8931d6ce3fbf792fa
|