Skip to content

ci: split Wasm build from cross-OS native checks - #121

Merged
byteland-app merged 3 commits into
mainfrom
stitch/ci-split-wasm-cross-os-checks-jm0-de807871-47e5-49b8-bd18-9b33ee965077
Nov 26, 2026
Merged

byteland-app merged 3 commits into
mainfrom
stitch/ci-split-wasm-cross-os-checks-jm0-de807871-47e5-49b8-bd18-9b33ee965077

Conversation

@google-labs-stitch

@google-labs-stitch google-labs-stitch Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Split .github/workflows/ci.yml into build-wasm (ubuntu-latest via ./.github/actions/setup-wasm with node-cache: ""), check-os (ubuntu-latest, macos-latest and windows-latest with fail-fast: false), msrv (rust-version 1.88 from #120) and verify (needs: [build-wasm, check-os, msrv], if: always()) while read-only permissions, pull-request concurrency cancellation, cargo package --locked and commit-SHA action pins stay intact.
  • Add optional node-cache input (default: "npm") to .github/actions/setup-wasm/action.yml so release.yml retains cache: "npm" unchanged while build-wasm avoids saving an empty ~/.npm cache on ubuntu-latest ahead of check-os.
  • Upload pkg/tunelet.js, pkg/tunelet.d.ts and pkg/tunelet_bg.wasm from build-wasm as a short-lived artifact (wasm-pkg, retention-days: 1) and download it in check-os with digest-mismatch: error.
  • Build locked native release dynamic libraries (libtunelet.so, libtunelet.dylib and tunelet.dll), compile TypeScript 7.0.2 and run npm run verify:pack -- --ignore-scripts on each OS runner (with Node.js configured from .node-version) without a second Wasm build.
  • Add --ignore-scripts support (parseCliOptions and verifyPrebuiltFiles) to scripts/verify-pack.mjs so both tunelet and @bytelandtechnology/tunelet archives are verified using process.env.npm_execpath supplied automatically by npm run.
  • Document cross-OS CI checks (including msrv) and cross-shell (sh, PowerShell and cmd.exe) local verification commands in AGENTS.md.

Verification

  • Checked .github/actions/setup-wasm/action.yml, .github/workflows/ci.yml and .github/workflows/release.yml with actionlint -verbose.
  • Ran cargo build --locked --release, cargo fmt --check, cargo clippy --locked --lib -- -D warnings, RUSTDOCFLAGS="-D warnings" cargo doc --locked --no-deps, cargo package --locked and RUSTDOCFLAGS="-D warnings" npm run check:wasm.
  • Verified npm run verify:pack -- --out-dir (sha256sum --check --strict SHA256SUMS.txt) and the split artifact flow (npm run build:wasm, npm run build:ts and npm run verify:pack -- --ignore-scripts without wasm-pack on PATH) for both tunelet and @bytelandtechnology/tunelet.

Automated PR initiated by user @byteland-app via Stitch Loop.

- Check lints, rustdoc and the crate list in build-wasm on Linux
- Upload pkg/ from build-wasm as a short-lived artifact
- Verify native release libraries and npm archives on three OS runners
- Keep verify as the final gate job for branch protection
- Add --ignore-scripts and Windows npm lookup to verify-pack.mjs
- Document the cross-OS checks and shell commands in AGENTS.md
@byteland-app

Copy link
Copy Markdown
Contributor

Review: Preferred over #88 for cross-OS CI (builds Wasm once on Linux and runs native checks on all three OS runners). Please simplify before merge: invoke 'npm run verify:pack -- --ignore-scripts' in ci.yml so process.env.npm_execpath is provided automatically, allowing removal of the ~230 lines of heuristic Windows npm path discovery in scripts/verify-pack.mjs. Also rebase onto #118.

- Merge main into the cross-OS CI branch
- Run npm run verify:pack -- --ignore-scripts in ci.yml
- Remove the Windows path heuristics from verify-pack.mjs
- Add --ignore-scripts to parseCliOptions in verify-pack.mjs
- Update the verify:pack instructions in AGENTS.md
@google-labs-stitch

Copy link
Copy Markdown
Contributor Author

Addressed in 0893486:

  • Synced the branch with main (incorporating ci(release): verify and publish unscoped and scoped archives #118 dual-scope tunelet / @bytelandtechnology/tunelet archive verification and fix(cargo): include the README diagrams and check the crate archive #91 cargo package --locked; note: merged origin/main rather than force-pushing since fast-forward-only pushes are enforced here).
  • Updated check-os in .github/workflows/ci.yml to run npm run verify:pack -- --ignore-scripts so process.env.npm_execpath is provided automatically on all runners.
  • Removed the ~230 lines of heuristic Windows npm path discovery (resolveWindowsNpm and helpers) from scripts/verify-pack.mjs, leaving only --ignore-scripts in parseCliOptions and verifyPrebuiltFiles().
  • Updated AGENTS.md and the PR description to match, and verified all 5 CI jobs (build-wasm, check-os on Linux/macOS/Windows, and verify) pass.

@byteland-app

Copy link
Copy Markdown
Contributor

Round 2 review: Approved — removing the Windows npm path heuristics simplified scripts/verify-pack.mjs nicely while preserving #118 and the 'verify' gate job. Please rebase onto updated main after #90 and #120.

- Merge main through v0.3.4 with #90 and #120.
- Use ./.github/actions/setup-wasm in the build-wasm job.
- Add the optional node-cache input to setup-wasm.
- Read .node-version in the check-os job.
- Include the msrv job in the verify status check.
- Update AGENTS.md for the --release flag and the msrv job.
@google-labs-stitch

Copy link
Copy Markdown
Contributor Author

Synced with updated main (v0.3.4, including #90 and #120) in 3690029 (merged origin/main as fast-forward-only pushes are enforced here):

@byteland-app
byteland-app merged commit e15d322 into main Nov 26, 2026
7 checks passed
@byteland-app
byteland-app deleted the stitch/ci-split-wasm-cross-os-checks-jm0-de807871-47e5-49b8-bd18-9b33ee965077 branch November 26, 2026 03:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant