Skip to content
Merged
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
8 changes: 5 additions & 3 deletions .github/workflows/bot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,9 @@ jobs:
echo "jobs=$jobs" | tee -a "$GITHUB_OUTPUT"
exit 0
fi
# rosdistro syncs, and the conda-forge pinning of every distribution
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":d,"args":"","preview":False} for d in sys.argv[1:]]))' $(ls distros)) ;;
# 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}]))') ;;
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 @@ -152,7 +153,8 @@ jobs:
pixi run rs add-package $ARGS "${extra[@]}" --summary "$RUNNER_TEMP/summary.md" ;;
update-rosdistro-snapshot) pixi run rs "$DISTRO" update-snapshot --summary "$RUNNER_TEMP/summary.md" ;;
find-stale-packages) pixi run rs "$DISTRO" find-stale --summary "$RUNNER_TEMP/summary.md" ;;
update-conda-forge-pinning) pixi run rs "$DISTRO" update-pinning --summary "$RUNNER_TEMP/summary.md" ;;
# no distribution: all of them (rs update-pinning)
update-conda-forge-pinning) pixi run rs ${DISTRO:+"$DISTRO"} update-pinning --summary "$RUNNER_TEMP/summary.md" ;;
rebuild) pixi run rs rebuild $ARGS --summary "$RUNNER_TEMP/summary.md" ;;
# pushes to the pull request's branch itself (with this job's checkout token)
rebuild-dependents) pixi run rs rebuild-dependents "$ARGS" --summary "$RUNNER_TEMP/summary.md" ;;
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/testpr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ env:
jobs:
plan:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read # the build:<distro> labels
outputs:
distros: ${{ steps.plan.outputs.distros }}
steps:
Expand All @@ -36,13 +39,18 @@ jobs:
id: plan
env:
BASE: ${{ github.event.pull_request.base.sha }}
PR: ${{ github.event.pull_request.number }}
SELECTED: ${{ inputs.distros }}
GH_TOKEN: ${{ github.token }}
run: |
# plain python + PyYAML of the runner image; no pixi needed for this
if [ -n "$SELECTED" ]; then
distros=$(python3 -c 'import json,os; print(json.dumps(os.environ["SELECTED"].split()))')
elif [ -n "$BASE" ]; then
distros=$(python3 tools/robostack.py changed-distros --base "$BASE")
# build:<distro> labels limit the build to those distributions; read now (not
# from the event) so that a re-run sees labels added after the push
labels=$(gh pr view "$PR" --repo "$GITHUB_REPOSITORY" --json labels -q '[.labels[].name]')
distros=$(python3 tools/robostack.py changed-distros --base "$BASE" --labels "$labels")
else
distros=$(python3 tools/robostack.py changed-distros --base HEAD --all)
fi
Expand Down
3 changes: 3 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ should edit a shared file at a time.
build number (e.g. a patch fix) must be evicted: add it to `evict_cache` in
`distros/<d>/ci.yaml` (`full_rebuild: true` for everything), and reset the file
after merging.
- A PR builds the distributions it changes (all of them if it touches anything
outside `distros/<d>/`). To build only some, add `build:<distro>` labels (e.g.
`build:humble`), then push or re-run the build (adding a label doesn't start one).
- After a merge, `main.yaml` regenerates the staged build branches
`buildbranch_<distro>_<platform>`; uploads go to the channel in `distro.yaml`, or to
the repository variable `ROBOSTACK_UPLOAD_CHANNEL`.
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,12 @@ pixi run rs check # sanity checks (also run in CI)
of a distribution uses `full_rebuild: true` there. A new build number goes into its
`pkg_additional_info.yaml` (one package) or `vinca.yaml` (everything).

**Building only some distributions in a PR:** a PR builds the distributions it changes,
and all of them as soon as it touches anything outside `distros/<distro>/`. To limit
that (e.g. a humble rebuild that also changes `shared/` or `tools/`), add the label
`build:humble` (one per distribution to build), then push or re-run the build: adding a
label doesn't start one by itself. Nothing has to be reset before merging.

### CI

- **Pull requests** (`testpr.yaml`):
Expand Down
12 changes: 6 additions & 6 deletions pixi.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ git = "*"
[pypi-dependencies]
# One vinca for all distributions.
# Tobias-Fischer/vinca robostack-integration (extends, test selectors, gha fix, rebuild planner, mutex build number: RoboStack/vinca#163-#169) until merged upstream
vinca = { git = "https://github.com/Tobias-Fischer/vinca.git", rev = "cf6833a12f36509a90ea33d25766709bcc1eb2cf" }
vinca = { git = "https://github.com/Tobias-Fischer/vinca.git", rev = "63469bad308fe64612410eb2d9f7098e3fb34912" }
# For local development, temporarily use (and regenerate pixi.lock):
# vinca = { path = "../vinca", editable = true }

Expand Down
Loading
Loading