Skip to content

Commit 13ea521

Browse files
ci: opt-in Blender 5.1 smoke via needs-5.1 and dispatch (#137)
* ci: add opt-in 5.1 smoke via needs-5.1 and dispatch Default PR matrix stays 4.5 and 5.2. labeled is required so the label actually starts a job. Dispatch takes a series input. Monday cron is unchanged. Signed-off-by: TMHSDigital <154358121+TMHSDigital@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com> * docs: document the 5.1 smoke lever for contributors Place the how-to in CONTRIBUTING.md, where version targeting already lives, and point at it from the workflow header, README, AGENTS.md, and the PR template. Signed-off-by: TMHSDigital <154358121+TMHSDigital@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com> * test: canary to prove 5.1 smoke goes red Temporary SystemExit(1) in bmesh-gear so the labeled 5.1 job is observed failing. Reverted in the next commit. Signed-off-by: TMHSDigital <154358121+TMHSDigital@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com> * Revert "test: canary to prove 5.1 smoke goes red" This reverts commit 0d32dbd. Signed-off-by: TMHSDigital <154358121+TMHSDigital@users.noreply.github.com> --------- Signed-off-by: TMHSDigital <154358121+TMHSDigital@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent f9d2d7f commit 13ea521

6 files changed

Lines changed: 76 additions & 9 deletions

File tree

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Label every claim.
1717
- **live-run-proven:** exact binary path + the version that binary printed (`blender --version`). Headless harness only. Live MCP does not count.
1818
- **inspection-only:** read the skill / diff / RNA docs; no process ran.
1919

20-
`blender-smoke.yml` has no `push` trigger. Post-merge smoke evidence is the PR-head 5.2 + 4.5 jobs (state the versions from those logs).
20+
`blender-smoke.yml` has no `push` trigger. Post-merge smoke evidence is the PR-head 5.2 + 4.5 jobs (state the versions from those logs). Apply `needs-5.1` when 5.1 must be CI-proven on the PR; default matrix does not include it.
2121

2222
## Release-owned fields — do not hand-edit
2323

.github/workflows/blender-smoke.yml

Lines changed: 55 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,37 +2,88 @@ name: Blender Smoke Test
22

33
# Executes the snippets' and skills' headline examples inside REAL Blender, headless,
44
# on the current stable (5.2.x LTS) and the fallback LTS (4.5.x) on every PR,
5-
# plus 5.1.x on the weekly cron, and fails on any error or
5+
# plus 5.1.x on the weekly cron, the opt-in `needs-5.1` PR label, or a
6+
# workflow_dispatch series input, and fails on any error or
67
# empty-output assertion. Shipped examples go through tests/smoke/run_example.py
78
# (catalog.json): SKIP is exit 77 + SMOKE_SKIP below --min-version, never exit 0.
89
# Post-exit sidecars are opt-in. A leg with zero PASSes is red.
910
# py_compile (in validate.yml) cannot catch API-level regressions
1011
# like the EEVEE-id inversion, the slotted-actions boundary, the driver TypeError, or the
1112
# dead SDF link -- this gate runs the code so those surface in CI, not in users' files.
13+
#
14+
# Default PR matrix stays 5.2 + 4.5. `labeled` is in pull_request.types so
15+
# applying `needs-5.1` starts a 5.1 job; other labels are ignored and must
16+
# not cancel an in-progress default run. Auto-label does not apply needs-5.1.
17+
# Manual dispatch: Actions > Blender Smoke Test > Run workflow > pick series.
1218

1319
on:
14-
workflow_dispatch: {}
20+
workflow_dispatch:
21+
inputs:
22+
series:
23+
description: Blender series to smoke (single version, on-demand)
24+
required: true
25+
type: choice
26+
options:
27+
- "5.2"
28+
- "5.1"
29+
- "4.5"
30+
default: "5.2"
1531
schedule:
1632
- cron: "0 7 * * 1" # weekly, Monday 07:00 UTC
1733
pull_request:
1834
branches: [main]
35+
types: [opened, synchronize, reopened, labeled]
1936

2037
permissions:
2138
contents: read
2239

2340
concurrency:
24-
group: blender-smoke-${{ github.ref }}
41+
# Isolate labeled runs so auto-label (`ci`, `documentation`, ...) does not
42+
# cancel the default 4.5/5.2 jobs. synchronize still cancels the previous
43+
# synchronize on the same PR.
44+
group: blender-smoke-${{ github.event.pull_request.number || github.ref }}${{ github.event.action == 'labeled' && format('-label-{0}', github.event.label.name) || '' }}
2545
cancel-in-progress: true
2646

2747
jobs:
48+
resolve-matrix:
49+
name: Resolve smoke matrix
50+
runs-on: ubuntu-latest
51+
if: github.event.action != 'labeled' || github.event.label.name == 'needs-5.1'
52+
outputs:
53+
series: ${{ steps.set.outputs.series }}
54+
steps:
55+
- id: set
56+
env:
57+
EVENT_NAME: ${{ github.event_name }}
58+
EVENT_ACTION: ${{ github.event.action }}
59+
DISPATCH_SERIES: ${{ github.event.inputs.series }}
60+
PR_LABELS: ${{ join(github.event.pull_request.labels.*.name, ',') }}
61+
run: |
62+
set -euo pipefail
63+
if [ "$EVENT_NAME" = "schedule" ]; then
64+
json='["5.2","5.1","4.5"]'
65+
elif [ "$EVENT_NAME" = "workflow_dispatch" ]; then
66+
json=$(printf '["%s"]' "$DISPATCH_SERIES")
67+
elif [ "$EVENT_ACTION" = "labeled" ]; then
68+
json='["5.1"]'
69+
elif echo ",$PR_LABELS," | grep -q ",needs-5.1,"; then
70+
json='["5.2","5.1","4.5"]'
71+
else
72+
json='["5.2","4.5"]'
73+
fi
74+
echo "series=$json" >> "$GITHUB_OUTPUT"
75+
echo "Smoke matrix: $json"
76+
2877
smoke:
2978
name: Blender ${{ matrix.series }} smoke
79+
needs: resolve-matrix
80+
if: needs.resolve-matrix.result == 'success'
3081
runs-on: ubuntu-latest
3182
timeout-minutes: 45
3283
strategy:
3384
fail-fast: false
3485
matrix:
35-
series: ${{ github.event_name == 'schedule' && fromJSON('["5.2","5.1","4.5"]') || fromJSON('["5.2","4.5"]') }}
86+
series: ${{ fromJSON(needs.resolve-matrix.outputs.series) }}
3687
steps:
3788
- uses: actions/checkout@v7
3889

AGENTS.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,10 @@ way, and a one-paragraph rationale. 30 to 80 lines is the right size.
157157
the manifest `version` line (see `release.yml` below) — never hand-edit it.
158158
- `blender-smoke.yml` executes every shipped example (check-only, no render)
159159
plus snippet/template smoke tests inside REAL headless Blender, on
160-
5.2 LTS and 4.5 LTS for every PR (5.1 on the weekly cron). Examples run
160+
5.2 LTS and 4.5 LTS for every PR. 5.1 is weekly cron, the opt-in
161+
`needs-5.1` PR label (`pull_request` types include `labeled`), or
162+
`workflow_dispatch` with a `series` input. Auto-label does not apply
163+
`needs-5.1`. Contributor-facing notes live in CONTRIBUTING.md. Examples run
161164
through `tests/smoke/run_example.py` (catalog: `tests/smoke/catalog.json`).
162165
SKIP is exit 77 plus a `SMOKE_SKIP:` reason, and only when `--min-version`
163166
is above this Blender; exit 0 with that marker is a vacuous pass and fails.

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ AI asset pipeline track: `decimate_to_budget.py`, `convex_hull_collider.py`, `lo
102102

103103
Runnable scripts at `examples/<name>/`, each asserting a real API contract with
104104
deterministic checks (exit non-zero on failure) and optionally rendering a still via
105-
`--output`. All of them run headless on Blender 5.2 LTS and 4.5 LTS in `blender-smoke.yml` (5.1 on the weekly cron);
105+
`--output`. All of them run headless on Blender 5.2 LTS and 4.5 LTS in `blender-smoke.yml` (5.1 on the weekly cron, the `needs-5.1` PR label, or manual dispatch);
106106
their renders ship in the site gallery at `docs/gallery/`. `examples/gallery.json` is the
107107
gallery's source of truth. When authoring a new one, copy the anatomy of
108108
`examples/bmesh-gear/` (script structure, README shape, dark-studio render recipe) and

CONTRIBUTING.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,19 @@ else:
9999
...
100100
```
101101

102+
## Blender smoke on pull requests
103+
104+
Default PR smoke is Blender 5.2 and 4.5 (`.github/workflows/blender-smoke.yml`).
105+
5.1 is not in that matrix.
106+
107+
- Apply the `needs-5.1` label when the change can diverge on 5.1 (bake, UV
108+
RNA, version-branched API). That starts a 5.1 smoke job. Auto-label will
109+
not apply this; it is opt-in.
110+
- Run any series on demand: Actions > Blender Smoke Test > Run workflow,
111+
pick the branch and the `series` input.
112+
- Monday 07:00 UTC cron still runs 5.2, 5.1, and 4.5. Do not treat cron as
113+
PR evidence.
114+
102115
## Standards-version Markers
103116

104117
Files that participate in ecosystem drift checking must carry a `standards-version` marker matching the current meta-repo `STANDARDS_VERSION` (which is decoupled from this repo's `VERSION`):

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,13 @@ blender --background --python examples/bmesh-gear/bmesh_gear.py --
6666
| Version | Status |
6767
| --- | --- |
6868
| Blender 5.2 LTS | Primary target (current stable; all examples assume 5.2 unless a 4.5 path is shown) |
69-
| Blender 5.1 | Prior stable (weekly smoke only) |
69+
| Blender 5.1 | Prior stable (weekly cron; PR via `needs-5.1` or manual dispatch) |
7070
| Blender 4.5 LTS | Fallback supported (skills show both code paths where 4.x and 5.x APIs diverge) |
7171

7272
## Examples
7373

7474
Runnable, smoke-gated demos live in [`examples/`](examples/) — each is executed headless on
75-
Blender 5.2 LTS and 4.5 LTS by the `blender-smoke` workflow (5.1 on the weekly cron), so the screenshots reflect code
75+
Blender 5.2 LTS and 4.5 LTS by the `blender-smoke` workflow (5.1 on the weekly cron, the `needs-5.1` PR label, or manual dispatch), so the screenshots reflect code
7676
that actually runs. Browse them all with filters and full-size renders in the
7777
**[examples gallery](https://tmhsdigital.github.io/Blender-Developer-Tools/gallery/)**,
7878
or expand a category below.

0 commit comments

Comments
 (0)