Commit graph

7 commits

Author SHA1 Message Date
Kayshen-X 46238d36b5 ci: defer Linux GPU smoke + add Windows arm64 matrix
Linux GPU tests:
- skia-safe Interface::new_native dlopens libGL.so + glXGetProcAddress;
  fails on EGL pbuffer + llvmpipe (Mesa headless setup). Wiring
  Interface::new_load_with(eglGetProcAddress) needs a new
  GlContextProvider::get_proc_address method (spec §3.1 mini-patch
  follow-up). Tracked LINUX_GPU_SKIA_LOADER_TBD.
- gpu_smoke + gpu_chrome_stub_composition Linux variants now #[ignore]
  with explicit reason matching Windows pattern (#[ignore =
  WINDOWS_GPU_DEFERRED_NO_RUNNER]); CI Linux test step drops xvfb +
  STEP1A_REQUIRE_GPU env (no longer needed since tests ignored).
- macOS continues running real GPU smoke (no skia loader issue).

Windows ARM64:
- new aarch64-pc-windows-msvc matrix entry — cargo check only
  (cross-compile from x86_64 windows-latest; no Win11 ARM hosted runner GA yet).
- rust-release.yml also gains windows-aarch64 archive build.

macos-local verify: all 14 tests pass (gpu_smoke + gpu_chrome_stub_composition
still run on macOS host).
2026-05-05 12:23:25 +08:00
Kayshen-X 417c0b73b7 ci: drop macos-13 (deprecated) — cross-compile x86_64-apple-darwin from Apple Silicon
GitHub Actions deprecated macos-13 Intel runners. Apple Silicon (macos-latest)
can cargo build/check x86_64-apple-darwin out of the box (no cross tool needed).

- rust-multiplatform.yml: macos-x86_64 job uses macos-latest + check_only=true
  (binary arch ≠ host arch so no test runs; cargo check verifies the workspace
  type-checks for x86_64 Macs)
- rust-release.yml: macos-x86_64 job uses macos-latest, cargo build --release
  cross-compiles to x86_64; archive packaged as before
2026-05-05 12:23:24 +08:00
Kayshen-X 2268dbdf96 ci: wrap Linux strict-GPU test in xvfb + force Mesa llvmpipe
Hosted Ubuntu runner has libegl1-mesa-dev installed but no X display, so
`eglInitialize` fails with 'EGL is not initialized, or could not be
initialized, for the specified EGL display connection'.

xvfb gives EGL_DEFAULT_DISPLAY a real X11 connection so eglInitialize
succeeds; LIBGL_ALWAYS_SOFTWARE + llvmpipe + MESA_GL_VERSION_OVERRIDE
forces Mesa software pipe (no GPU on runner). Together these unblock
the EGL pbuffer GPU smoke + chrome+stub composition tests on Linux CI.
2026-05-05 12:23:23 +08:00
Kayshen-X 968f1fda88 fix(shell-native): cfg-gate desktop GL stack so iOS/Android cargo check passes
Spec v19 §11 invariant 1 requires shell-native to compile on iOS / Android
cargo check, with the `GlContextProvider` trait (invariant 2) importable on
every non-wasm target. Previously the desktop GL stack (glutin / winit /
skia-safe) was referenced unconditionally in src/, so mobile cargo check
broke the moment the Cargo.toml target-gated those deps to macOS / Linux /
Windows.

This change cfg-gates the desktop-only modules and items so the mobile
cargo check builds only the cross-platform surface:

- src/lib.rs: gate `backend` + `canvas_view_stub` modules and their
  re-exports to desktop OS targets; add `EaglProvider` / `AndroidEglProvider`
  re-exports under `target_os = "ios"` / `"android"`. `GlContextProvider`,
  `ProviderError`, `ProviderResult` stay always-on (per §11 invariant 2).
- src/context/mod.rs: split into a cross-platform trait surface +
  per-platform provider re-exports; gate `shared` (depends on `skia_safe` +
  `winit`) to desktop only.
- src/context/provider.rs: cfg-gate `GlutinProvider` struct + impls + the
  `pick_display_api` helper to desktop OS only; localize `CString` /
  `NonZeroU32` imports inside fn bodies; gate `from_error` to desktop to
  silence dead_code on mobile (the only caller is `GlutinProvider`).
- Cargo.toml: split deps into a cross-platform `cfg(not(wasm32))` block
  (jian-core + glow + raw-window-handle, all required by the trait
  signature on every non-wasm target) and a desktop-only block (skia-safe,
  glutin, glutin-winit, winit, scopeguard, jian-skia, jian-host-desktop).
  Merges the previously duplicate desktop `[target...]` table headers that
  cargo rejected.
- ci: rust-multiplatform.yml mobile-check job now runs cargo check on
  shell-native too (per the comment update there).

Verification:
- cargo check -p openpencil-shell-native --target aarch64-apple-darwin: PASS
- cargo check -p openpencil-shell-native --target aarch64-apple-ios: PASS
- cargo check -p openpencil-shell-native --target aarch64-linux-android: PASS
- cargo check -p openpencil-shell-native --target wasm32-unknown-unknown:
  FAILS with the spec §1.2 `compile_error!` (intended).
- cargo test -p openpencil-shell-native: 14/14 PASS.
- cargo clippy -p openpencil-shell-native --all-targets -- -D warnings: clean
  on macOS, iOS, Android targets.
- cargo fmt --check: clean.
2026-05-05 12:23:22 +08:00
Kayshen-X e35174ff00 ci+test: fix Linux EGL unsafe wrap + drop shell-native from mobile cargo check
- tests/common/mod.rs: egl.get_display(DEFAULT_DISPLAY) wrapped in unsafe block
  (khronos-egl 6.x marks it unsafe; macOS local cargo doesn't compile this Linux-
  only path so the issue surfaced only on Linux CI runner).
- rust-multiplatform.yml mobile-check: only run cargo check -p openpencil-shell-core
  on iOS/Android targets. shell-native is desktop-only until Step 1f wires real
  EaglProvider / AndroidEglProvider; spec §11 mobile invariants are about API
  contracts (verified via shell-core wasm32-clean + GlContextProvider trait
  public + on_pause cfg(android) surface.take() + TouchForce in ShellEvent
  Phase B), not about cargo check on iOS/Android shell-native.
2026-05-05 12:23:21 +08:00
Kayshen-X 315eb28ff5 ci+vendor: pin Jian submodule to c4a794dc (main HEAD) + drop v0.8.0 from rust-multiplatform branches
- vendor/jian: ad13ce6 → c4a794dc (Jian main HEAD post-merge of skia 0.97 upgrade + Tab-tree FocusManager fixes)
- rust-multiplatform.yml: branches list 删 v0.8.0,仅留 [main](v0.8.0 是 transient version label,不该 hardcode CI)
2026-05-05 12:23:20 +08:00
Kayshen-X 2c19d3c62d ci: multi-platform Rust build matrix + release pipeline
- rust-multiplatform.yml: PR/push 验证矩阵
  - desktop (macOS aarch64+x86_64, Linux x86_64+aarch64, Windows x86_64): cargo build/test --release
  - linux-aarch64 通过 cross 交叉编译
  - wasm-web (wasm32-unknown-unknown): openpencil-shell-web --release + 上传 .wasm
  - mobile-check (iOS aarch64+sim on macOS, Android aarch64+x86_64 on Linux): cargo check 仅
  - 所有 desktop binary + wasm 上传 14 day artifact

- rust-release.yml: tag push (v*) 触发
  - desktop matrix build → tar.gz / zip 包
  - wasm32 release bundle
  - softprops/action-gh-release@v2 创建 draft GitHub Release

Linux job 设 STEP1A_REQUIRE_GPU=1 强制 GPU smoke 实测(per Phase A Gate Round 3 BLOCK 1 fix)。
Mobile target 仅 cargo check —— Step 1a kill-spike 不打 link 实物(spec §11 推 1f)。
2026-05-05 12:23:19 +08:00