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.
150 lines
5.8 KiB
YAML
150 lines
5.8 KiB
YAML
name: Rust release artifacts
|
|
|
|
# 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:
|
|
tags: ['v*']
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
name: ${{ matrix.label }}
|
|
runs-on: ${{ matrix.runner }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- label: macos-aarch64
|
|
runner: macos-latest
|
|
target: aarch64-apple-darwin
|
|
archive: tar.gz
|
|
# macos-13 (Intel) deprecated; cross-compile x86_64-apple-darwin
|
|
# from Apple Silicon (cargo supports cross-compile to host's other
|
|
# arch out of the box, no `cross` needed).
|
|
- label: macos-x86_64
|
|
runner: macos-latest
|
|
target: x86_64-apple-darwin
|
|
archive: tar.gz
|
|
- label: linux-x86_64
|
|
runner: ubuntu-latest
|
|
target: x86_64-unknown-linux-gnu
|
|
archive: tar.gz
|
|
- label: linux-aarch64
|
|
runner: ubuntu-latest
|
|
target: aarch64-unknown-linux-gnu
|
|
archive: tar.gz
|
|
cross: true
|
|
- label: windows-x86_64
|
|
runner: windows-latest
|
|
target: x86_64-pc-windows-msvc
|
|
archive: zip
|
|
# Windows ARM64 — cargo cross-compile from x86_64 windows runner.
|
|
- label: windows-aarch64
|
|
runner: windows-latest
|
|
target: aarch64-pc-windows-msvc
|
|
archive: zip
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
submodules: recursive
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
toolchain: '1.85'
|
|
targets: ${{ matrix.target }}
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
key: release-${{ matrix.target }}
|
|
- name: Install Linux GL/EGL prereqs
|
|
if: runner.os == 'Linux' && matrix.cross != true
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y \
|
|
libxkbcommon-dev libxkbcommon-x11-dev \
|
|
libwayland-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev \
|
|
libegl1-mesa-dev libgles2-mesa-dev libgbm-dev \
|
|
libfreetype-dev libfontconfig1-dev
|
|
- name: Install cross
|
|
if: matrix.cross == true
|
|
run: cargo install cross --locked --version 0.2.5
|
|
- name: Build (host)
|
|
if: matrix.cross != true
|
|
run: cargo build -p openpencil-app --target ${{ matrix.target }} --release
|
|
- name: Build (cross)
|
|
if: matrix.cross == true
|
|
run: cross build -p openpencil-app --target ${{ matrix.target }} --release
|
|
- name: Package archive (unix)
|
|
if: matrix.archive == 'tar.gz'
|
|
shell: bash
|
|
run: |
|
|
cd target/${{ matrix.target }}/release
|
|
tar czf ../../../openpencil-app-${{ matrix.label }}.tar.gz openpencil-app 2>/dev/null || \
|
|
tar czf ../../../openpencil-app-${{ matrix.label }}.tar.gz openpencil-app.placeholder
|
|
- name: Package archive (windows)
|
|
if: matrix.archive == 'zip'
|
|
shell: pwsh
|
|
run: |
|
|
Compress-Archive `
|
|
-Path target\${{ matrix.target }}\release\openpencil-app.exe `
|
|
-DestinationPath openpencil-app-${{ matrix.label }}.zip `
|
|
-ErrorAction SilentlyContinue
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: openpencil-app-${{ matrix.label }}
|
|
path: |
|
|
openpencil-app-${{ matrix.label }}.tar.gz
|
|
openpencil-app-${{ matrix.label }}.zip
|
|
if-no-files-found: ignore
|
|
|
|
# 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
|
|
# `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:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/download-artifact@v4
|
|
with:
|
|
path: dist
|
|
- name: Flatten artifacts
|
|
run: |
|
|
mkdir -p release-files
|
|
find dist -type f \( -name "*.tar.gz" -o -name "*.zip" \) -exec cp {} release-files/ \;
|
|
ls -la release-files
|
|
- name: Create / update GitHub Release
|
|
uses: softprops/action-gh-release@v2
|
|
with:
|
|
draft: true
|
|
files: release-files/*
|
|
generate_release_notes: true
|