chore(ci): defer wasm release artifact until C-hard pipeline automated

Updates the rust-multiplatform + rust-release workflows for the
post-C-hard.2 reality where the wasm32-unknown-unknown bundle IS
runtime-loadable locally but the CI side still needs more
automation before it can publish a release artifact.

rust-multiplatform.yml:
  - add `vendor/skia-safe-op/**` to push + pull_request path
    filters so changes inside the fork actually trigger CI
  - rename the wasm-web job → "wasm32-unknown-unknown / openpencil-
    shell-web (compile guard)" to make explicit that this is the
    --no-default-features --features web stub-mount baseline, not
    the real render bundle
  - drop the artifact upload from this job: the stub .wasm has no
    skia and would mislead downstream consumers

rust-release.yml:
  - delete the standalone `wasm` job for now and update the comment
    to a DEFERRED block listing the 6 CI-side automation steps
    still missing (brew emscripten install, EMSDK env var,
    .wasm.a → .a symlink hack, wasm-bindgen + wasm-opt, browser
    smoke). Re-add the job once the pipeline lands
  - update the workflow header copy so it stops claiming to build
    the WASM bundle alongside desktop binaries
  - drop `wasm` from the release-draft `needs:` list

This is an explicit deferral, NOT a silent drop — every removed
piece is annotated with the work item it is waiting on.

Step 1b §3.2 P0.5B Run path, sub-phase C-hard CI follow-up.
This commit is contained in:
Kayshen-X 2026-05-09 20:59:23 +08:00
parent c078b2a0e0
commit 250a6e4d69
2 changed files with 46 additions and 40 deletions

View file

@ -12,6 +12,7 @@ on:
- 'Cargo.lock'
- 'crates/**'
- 'vendor/jian/**'
- 'vendor/skia-safe-op/**'
- 'rust-toolchain.toml'
- 'deny.toml'
- '.github/workflows/rust-multiplatform.yml'
@ -21,6 +22,7 @@ on:
- 'Cargo.lock'
- 'crates/**'
- 'vendor/jian/**'
- 'vendor/skia-safe-op/**'
- '.github/workflows/rust-multiplatform.yml'
workflow_dispatch:
@ -124,7 +126,7 @@ jobs:
retention-days: 14
wasm-web:
name: wasm32-unknown-unknown / openpencil-shell-web
name: wasm32-unknown-unknown / openpencil-shell-web (compile guard)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
@ -137,14 +139,19 @@ jobs:
- uses: Swatinem/rust-cache@v2
with:
key: wasm32
- run: cargo build -p openpencil-shell-web --target wasm32-unknown-unknown --release
- name: Upload wasm bundle
uses: actions/upload-artifact@v4
with:
name: openpencil-shell-web-wasm
path: target/wasm32-unknown-unknown/release/openpencil_shell_web.wasm
if-no-files-found: warn
retention-days: 14
# Step 1b §1.2 wasm32-clean compile guard — without `skia` feature this
# is a stub mount (validates host canvas, does not paint). The real
# render artifact uses the SAME wasm32-unknown-unknown target plus
# `--features skia` (post C-hard.2 lock-in 2026-05-09) and ships
# via a separate Phase A job once the CI-side C-hard pipeline
# (brew emscripten install + EMSDK + .wasm.a symlink hack +
# wasm-bindgen + wasm-opt) lands. Until then this job only proves
# the public surface compiles wasm32-clean.
- run: cargo build -p openpencil-shell-web --target wasm32-unknown-unknown --release --no-default-features --features web
# Artifact upload deliberately removed: the stub `.wasm` from this
# path would mislead downstream consumers into thinking the shell can
# render. Restore the upload step once the skia-enabled build runs on
# this CI target.
mobile-check:
name: ${{ matrix.label }} (cargo check only)

View file

@ -1,9 +1,13 @@
name: Rust release artifacts
# Triggered on tag push (v*) — builds release binaries across desktop targets,
# the WASM bundle, and uploads them to a GitHub Release draft. Step 1a kill-spike
# only ships `openpencil-app` (a placeholder binary entry); real desktop apps
# (DMG / AppImage / EXE installer) come in Step 1f and replace this scaffolding.
# Triggered on tag push (v*) — builds release binaries across desktop targets
# and uploads them to a GitHub Release draft. The wasm web bundle is currently
# DEFERRED (see comment block above the removed `wasm` job below); when the
# CI-side C-hard pipeline (emscripten install + EMSDK + symlink hack +
# wasm-bindgen + wasm-opt) lands it will re-enter the matrix. Step 1a
# kill-spike only ships `openpencil-app` (a placeholder binary entry); real
# desktop apps (DMG / AppImage / EXE installer) come in Step 1f and replace
# this scaffolding.
on:
push:
@ -100,36 +104,31 @@ jobs:
openpencil-app-${{ matrix.label }}.zip
if-no-files-found: ignore
wasm:
name: wasm32 web bundle
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: '1.85'
targets: wasm32-unknown-unknown
- uses: Swatinem/rust-cache@v2
with:
key: release-wasm32
- run: cargo build -p openpencil-shell-web --target wasm32-unknown-unknown --release
- name: Package wasm artifact
run: |
cd target/wasm32-unknown-unknown/release
tar czf ../../../openpencil-shell-web-wasm.tar.gz \
openpencil_shell_web.wasm 2>/dev/null || true
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: openpencil-shell-web-wasm
path: openpencil-shell-web-wasm.tar.gz
if-no-files-found: warn
# Phase 1b release wasm artifact: explicitly DEFERRED (not silently
# dropped). The local C-hard pipeline (vendor/skia-safe-op fork +
# crates/wasm-libc-shim) does produce a runtime-loadable
# wasm32-unknown-unknown bundle today (verified 2026-05-09: 0 env.*
# imports, 597 KiB gzip). Re-introducing the release job requires
# CI-side automation that we have NOT yet built:
# 1. install brew emscripten 5.0.7 + EMSDK shim on ubuntu-latest
# 2. set EMSDK env var for the cargo build
# 3. run `cargo build … --features skia --release`
# 4. apply the `.wasm.a` → `.a` symlink hack in the
# skia-bindings out/ dir (manual today; tracked as a follow-up
# automation item — fold into `vendor/skia-safe-op` build.rs)
# 5. run `wasm-bindgen --target web` + `wasm-opt -Oz`
# 6. browser-side manual smoke (Phase E in spec) before publishing
#
# Until that pipeline lands, tagged releases ship desktop artifacts
# only. This is a CONSCIOUS choice — see plan §Cheat-sheet for the
# tracking item.
release-draft:
name: Create / update GitHub Release draft
needs: [build, wasm]
# `wasm` job deferred (see comment block above); when the
# CI-side C-hard pipeline lands, re-add the job and append its
# name to this `needs:` list.
needs: [build]
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
steps: