Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .claude/skills/robostack-debug-build/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ bash -x conda_build.sh 2>&1 | less
endif()
```
- **Windows `min`/`max` macro clashes**: `target_compile_definitions(<target> PRIVATE NOMINMAX WIN32_LEAN_AND_MEAN)` under `if(WIN32)`.
- **gtest / test failures**: add the missing dependency in `dependencies.yaml`, or
- **gtest / test failures**: add the missing dependency in `pkg_additional_info.yaml`, or
disable the tests when safe; no custom shims.
- **Qt plugins (rviz, rtabmap)**: make sure CMake finds the intended Qt major version.
- **Missing dependency**: `shared/patch/dependencies.yaml` (all distributions) or
`distros/<d>/patch/dependencies.yaml` (one), keyed by ROS package name:
- **Missing dependency**: `shared/pkg_additional_info.yaml` (all distributions) or
`distros/<d>/pkg_additional_info.yaml` (one), keyed by ROS package name:
```yaml
<ros_pkg>:
add_host: [<conda-pkg>]
Expand Down
5 changes: 3 additions & 2 deletions .claude/skills/robostack-patch/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ description: Create, refresh, place, port and validate source patches for RoboSt
of adding variants.
- vinca picks them up by name when generating recipes; nothing else needs wiring.
`pixi run rs check` rejects other names.
- `distros/<d>/patch/dependencies.yaml` is for dependency fixes, not source patches
(`shared/patch/dependencies.yaml` for all distributions).
- Dependency fixes are not source patches: they are `add_*`/`remove_*` keys in
`distros/<d>/pkg_additional_info.yaml` (`shared/pkg_additional_info.yaml` for all
distributions).

## Create a patch from work-directory edits

Expand Down
3 changes: 2 additions & 1 deletion .github/ISSUE_TEMPLATE/3_robostack_bot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,15 @@ body:
| `dependency-report` | maintainers | Check the dependencies against the pins and update the distribution's dependency-report issue (closed when nothing conflicts). Runs weekly. |
| `update-build-timings` | maintainers | Record the build times of the last week's build-branch runs in `shared/build_timings/`, which the build workflows use to pack each stage's recipes into jobs by time. Runs weekly. |
| `update-pixi` | maintainers | Upgrade the tooling's dependencies in `pixi.toml` / `pixi.lock` to their newest versions (`pixi upgrade`; not Python or the capped ones) and check. The PR lists the changes. Runs monthly. |
| `sync-pixi-mappings` | maintainers | Copy the rosdep mappings (`robostack.yaml`) to pixi-build-ros and open or update a PR on prefix-dev/pixi. Runs daily. |

On a pull request, `@robostack-bot rebuild-dependents` (maintainers) commits the rebuilds its ABI check suggests to the pull request's branch.
- type: dropdown
id: command
attributes:
label: Command
options: [add-package, update-rosdistro-snapshot, find-stale-packages, update-conda-forge-pinning, rebuild, update-vinca,
dependency-report, update-build-timings, update-pixi]
dependency-report, update-build-timings, update-pixi, sync-pixi-mappings]
validations:
required: true
- type: input
Expand Down
45 changes: 38 additions & 7 deletions .github/workflows/bot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,18 @@
# nothing conflicts; and a PR with the build times the week's build-branch runs
# recorded (shared/build_timings/, for packing the build jobs by time).
# - monthly (the 1st): a PR upgrading the tooling's pixi dependencies (pixi.toml / pixi.lock).
# - daily, when vars.PIXI_FORK is set: a PR on prefix-dev/pixi copying the rosdep mappings
# (shared/ and distros/*/robostack.yaml) to pixi-build-ros, so that `pixi build` of ROS
# packages maps rosdep keys as RoboStack does. It is pushed to the fork vars.PIXI_FORK
# (<owner>/pixi) with secrets.PIXI_SYNC_TOKEN, a token of that fork's owner: the bot's
# GitHub App can't open PRs on prefix-dev/pixi.
# - on demand (owners, members and collaborators):
# Actions > robostack-bot > Run workflow, an issue from the "robostack-bot command"
# template, or a comment: @robostack-bot <command> [<distro>]
# commands: update-rosdistro-snapshot [<distro>...|all] | find-stale-packages [<distro>...|all] |
# update-conda-forge-pinning [<distro>...|all] | add-package <pkg>... [<distro>...] |
# rebuild <pkg>... [<distro>...|all] [--with-dependents] | update-vinca [<ref>] |
# dependency-report [<distro>...|all] | update-build-timings | update-pixi |
# dependency-report [<distro>...|all] | update-build-timings | update-pixi | sync-pixi-mappings |
# rebuild-dependents (a comment on a pull request: commits the rebuilds its ABI
# check suggests to its branch; not possible for pull requests from forks)
# - package requests (the "Package request" issue form or `@robostack-bot add-package`,
Expand All @@ -38,7 +43,7 @@ on:
command:
type: choice
options: [add-package, update-rosdistro-snapshot, find-stale-packages, update-conda-forge-pinning, rebuild,
update-vinca, dependency-report, update-build-timings, update-pixi]
update-vinca, dependency-report, update-build-timings, update-pixi, sync-pixi-mappings]
distro:
description: Distribution (for the per-distribution commands; empty = all)
required: false
Expand Down Expand Up @@ -89,6 +94,7 @@ jobs:
ASSOCIATION: ${{ github.event.comment.author_association || github.event.issue.author_association }}
PULL_REQUEST: ${{ github.event.issue.pull_request && github.event.issue.number || '' }}
SCHEDULE: ${{ github.event.schedule }}
PIXI_FORK: ${{ vars.PIXI_FORK }}
run: |
case "$EVENT" in
schedule)
Expand All @@ -104,8 +110,9 @@ jobs:
exit 0
fi
# rosdistro syncs, and the conda-forge pinning: one job for all distributions
# (they share it; one with its own pinning is updated in the same pull request)
jobs=$(pixi run -q rs rosdistro-syncs | python3 -c 'import json,sys; print(json.dumps(json.load(sys.stdin) + [{"command":"update-conda-forge-pinning","distro":"","args":"","preview":False}]))') ;;
# (they share it; one with its own pinning is updated in the same pull request);
# the rosdep mappings for pixi-build-ros, once a pixi fork is set up
jobs=$(pixi run -q rs rosdistro-syncs | python3 -c 'import json,os,sys; print(json.dumps(json.load(sys.stdin) + [{"command":"update-conda-forge-pinning","distro":"","args":"","preview":False}] + ([{"command":"sync-pixi-mappings","distro":"","args":"","preview":False}] if os.environ.get("PIXI_FORK") else [])))') ;;
workflow_dispatch) # only people with write access can dispatch
jobs=$(ROBOSTACK_BOT_BODY="@robostack-bot $COMMAND $PACKAGES $DISTRO" ROBOSTACK_BOT_ASSOCIATION=OWNER pixi run -q rs parse-command) ;;
*)
Expand Down Expand Up @@ -146,6 +153,13 @@ jobs:
locked: true # the lock file must match pixi.toml
pixi-version: v0.81.0
cache-write: false # saved from main only (pixi-cache.yaml)
- name: Check out prefix-dev/pixi
if: matrix.command == 'sync-pixi-mappings'
uses: actions/checkout@v6
with:
repository: prefix-dev/pixi
path: _pixi
persist-credentials: false
- name: robostack-bot ${{ matrix.command }} ${{ matrix.distro }}
id: bot
env:
Expand Down Expand Up @@ -178,6 +192,8 @@ jobs:
# shellcheck disable=SC2046 # the --exclude arguments, one word each
pixi upgrade --json $(pixi run -q rs update-pixi --excludes) > "$RUNNER_TEMP/pixi-upgrade.json" &&
pixi run rs update-pixi --changes "$RUNNER_TEMP/pixi-upgrade.json" --summary "$RUNNER_TEMP/summary.md" ;;
# writes pixi-build-ros's copies of the mappings into the pixi checkout
sync-pixi-mappings) pixi run rs sync-pixi-mappings _pixi --summary "$RUNNER_TEMP/summary.md" ;;
# creates / updates the distribution's dependency-report issue
dependency-report) pixi run rs "$DISTRO" dependency-report --summary "$RUNNER_TEMP/summary.md" ;;
esac
Expand All @@ -192,7 +208,9 @@ jobs:
printf '\nCloses #%s\n' "$NUMBER" >> "$RUNNER_TEMP/summary.md"
- name: Open or update the pull request
id: pr
if: steps.bot.outputs.changed == 'true' && !matrix.preview && matrix.command != 'rebuild-dependents'
if: >-
steps.bot.outputs.changed == 'true' && !matrix.preview &&
matrix.command != 'rebuild-dependents' && matrix.command != 'sync-pixi-mappings'
uses: peter-evans/create-pull-request@v8
with:
token: ${{ steps.app.outputs.token || secrets.GHA_PAT || github.token }}
Expand All @@ -206,14 +224,27 @@ jobs:
labels: |
robostack-bot
${{ steps.bot.outputs.labels }}
- name: Open or update the pull request on prefix-dev/pixi
id: pixi_pr
if: steps.bot.outputs.changed == 'true' && matrix.command == 'sync-pixi-mappings'
uses: peter-evans/create-pull-request@v8
with:
path: _pixi
token: ${{ secrets.PIXI_SYNC_TOKEN }}
push-to-fork: ${{ vars.PIXI_FORK }}
branch: robostack-bot/sync-mappings
delete-branch: true
commit-message: "chore(pixi-build-ros): update RoboStack's rosdep mappings"
title: "chore(pixi-build-ros): update RoboStack's rosdep mappings"
body-path: ${{ runner.temp }}/summary.md
- name: Reply on the issue / pull request
if: always() && (github.event_name == 'issue_comment' || github.event_name == 'issues')
env:
GH_TOKEN: ${{ github.token }}
NUMBER: ${{ github.event.issue.number }}
TITLE: ${{ steps.bot.outputs.title || 'failed' }}
PR_URL: ${{ steps.pr.outputs.pull-request-url }}
PR_OPERATION: ${{ steps.pr.outputs.pull-request-operation }}
PR_URL: ${{ steps.pr.outputs.pull-request-url || steps.pixi_pr.outputs.pull-request-url }}
PR_OPERATION: ${{ steps.pr.outputs.pull-request-operation || steps.pixi_pr.outputs.pull-request-operation }}
run: |
{
echo "**robostack-bot ${{ matrix.command }} ${{ matrix.distro }}**: $TITLE"
Expand Down
6 changes: 3 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ to read without Claude):
## Layout and rules

- Every distribution lives in `distros/<distro>/` (only distro-specific data); shared
data is in `shared/` (vinca.yaml, pkg_additional_info.yaml, dependencies.yaml,
data is in `shared/` (vinca.yaml, pkg_additional_info.yaml with the dependency fixes,
robostack.yaml, pinning, tests), tools in `tools/`. See README.md for the layout and
how they combine. Never edit `distros/<d>/work/`: every task regenerates it.
- A fix that applies to every distribution goes into `shared/`; a version-specific one
Expand All @@ -40,8 +40,8 @@ to read without Claude):
`vinca.yaml` (see `robostack-package-selection`), not an ad-hoc comment.
- One patch per package and platform:
`distros/<d>/patch/ros2-<pkg>[.osx|.linux|.win|.unix].patch`. Packages are only built
under the new `ros2-<pkg>` names (`package_name_mode: new`); write dependencies in
`dependencies.yaml` as `ros2-<pkg>` too.
under the new `ros2-<pkg>` names (`package_name_mode: new`); write dependency fixes in
`pkg_additional_info.yaml` as `ros2-<pkg>` too.

## Everyday commands

Expand Down
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,21 @@ If you use RoboStack in your academic work, please cite:
distros/<distro>/ only what is specific to one distribution
distro.yaml channel, where it's uploaded and read from, conda-forge pinning version/migrations, own pins, rosdistro sync
vinca.yaml extends shared/vinca.yaml: ros_distro, build number, mutex version, its exceptions
pkg_additional_info.yaml its own per-package settings (build numbers, version-specific cmake args)
patch/ its patches; patch/dependencies.yaml its own dependency fixes
pkg_additional_info.yaml its own per-package settings (build numbers, version-specific cmake args, dependency fixes)
patch/ its patches
rosdistro_snapshot.yaml, rosdistro_additional_recipes.yaml
ci.yaml temporary PR-build controls (full rebuild, cache evictions)
conda_build_config.yaml generated: `pixi run rs <distro> render-pinning`
work/ generated, git-ignored: where vinca and rattler-build run
shared/ the same for every distribution
vinca.yaml settings and the package selection of every distribution
pkg_additional_info.yaml per-package settings that are the same everywhere
patch/dependencies.yaml dependency fixes that are the same everywhere
pkg_additional_info.yaml per-package settings and dependency fixes (add_host, remove_run, ...) that are the same everywhere
robostack.yaml rosdep key -> conda package mapping (`robostack: []` drops a key)
(also copied to pixi-build-ros: robostack-bot sync-pixi-mappings)
pinning/ conda-forge pinning version, migrations and overrides
tests/ package tests (ros2-<pkg>.yaml; `if: ros_distro ...` for distro-specific bits)
patch/ patches that apply to every distribution
files/<pkg>/ copied into that package's recipe (ros_workspace's activation scripts)
tools/robostack.py `pixi run rs ...`: every task, for one distribution or the repository
tools/maintenance.py checks and robostack-bot commands
tools/import_distro.py (re)import a distribution from its own repository
Expand All @@ -78,7 +80,7 @@ combines the two, and the files next to each:
- `mutex_package`: name and `upper_bound` are shared; each distribution sets its own `version`. The mutex only keeps one distribution per environment and has no `run_constraints` (`rs check` enforces it): library versions come from the packages' own dependencies, and wrong ones are fixed in the package's metadata.
- Other keys come from the distribution if it sets them, else from `shared/`. A distribution that differs from a shared setting just sets it.
- Paths are relative to the file that sets them. `distros/<distro>/work/vinca.yaml` (generated) extends the distribution's file and adds `skip_existing` (its channel).
- **`pkg_additional_info.yaml` and `patch/dependencies.yaml`:** merged per package. The distribution's keys win, for example its own `build_number` on top of a shared `additional_cmake_args`.
- **`pkg_additional_info.yaml`:** merged per package. The distribution's keys win, for example its own `build_number` on top of a shared `additional_cmake_args`.
- **`patch/*.patch` and `tests/`:** per package, the distribution's file replaces the shared one. In tests, `- if: ros_distro in ["humble", "jazzy"]` blocks select distribution-specific parts.
- **`vinca_pinning.yaml`:** the shared pinning, adjusted by `distro.yaml`:
- `conda_forge_pinning_version` and `conda_forge_migrations` keep a distribution on its own conda-forge pinning, for example until its next full rebuild;
Expand Down Expand Up @@ -152,6 +154,7 @@ waiting for the macOS runners; remove them for a full build before merging.
| `dependency-report [<distro>... \| all]` | maintainers | Runs the dependency check (`check-deps`, linux-64) and keeps one issue per distribution, *`<distro>`: dependency report* (label `dependency-report`), up to date with the conflicts, notes and conda-forge migration status; the issue is closed when nothing conflicts. Runs weekly (Mondays). |
| `update-build-timings` | maintainers | Merges the build times the last week's build-branch runs recorded (`rs <distro> build-ci`, kept as each job's artifact) into `shared/build_timings/<platform>.json` and opens a PR. The build workflows pack each stage's recipes into jobs by these times. Runs weekly (Mondays). Labelled `build:none` (see below). |
| `update-pixi` | maintainers | Runs `pixi upgrade`: the newest versions of the tooling's dependencies in `pixi.toml` and `pixi.lock` (rattler-build, rattler-index, gh, pytest, ...), except Python (moved by hand) and requirements that are only an upper bound (`cmake = "<4.0"`: capped on purpose); the vinca pin is `update-vinca`'s. Runs `rs check`; the PR lists the changes as a table (pixi-diff-to-markdown). Runs monthly (on the 1st). Labelled `build:none` (see below). |
| `sync-pixi-mappings` | maintainers | Copies the rosdep mappings (`shared/robostack.yaml`, and each `distros/<distro>/robostack.yaml` over it) to pixi-build-ros (`crates/pixi_build_ros/robostack.yaml` and `robostack_distros.yaml` in prefix-dev/pixi) and opens or updates a PR there, listing the added, removed and changed keys: `pixi build` of ROS packages then maps rosdep keys as RoboStack does. Mappings are only changed here. Runs daily once `vars.PIXI_FORK` (the fork the PR is pushed to) and `secrets.PIXI_SYNC_TOKEN` (a token of that fork's owner) are set. |

The PRs of `update-vinca`, `update-build-timings` and `update-pixi` don't change packages directly, but touch files outside `distros/`, which would build every distribution: they are labelled `build:none`, so only the checks run (and nothing is built while a build is under way). To build one, remove the label, or replace it with `build:<distro>` labels.

Expand Down
Loading