Skip to content

release(v0.9-rc): CI/CD pipelines, Vercel deploy config, and quality gate#14

Merged
deaneeth merged 8 commits into
mainfrom
dev
Jun 5, 2026
Merged

release(v0.9-rc): CI/CD pipelines, Vercel deploy config, and quality gate#14
deaneeth merged 8 commits into
mainfrom
dev

Conversation

@deaneeth

@deaneeth deaneeth commented Jun 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds three GitHub Actions CI workflows that gate every RTL and frontend change: RTL CI (Verilator 5.036 built from source + full cocotb golden verification), Web CI (pnpm lint / typecheck / build with store cache), WASM Build CI (emsdk + artifact assertion)
  • Adds web/vercel.json with explicit Content-Type: application/wasm and long-lived Cache-Control: immutable headers — without this Vercel serves the WASM binary as text/html and the visualizer silently breaks in production
  • Fixes 4 pre-existing ESLint errors in gen-og-image.mjs that would have failed Web CI on the very first run
  • Adds live CI status badge row to README
  • Tags v0.9-rc on this commit: Phase 9 gate fully met

Type of Change

  • ci — GitHub Actions change
  • chore — repo maintenance, CI, tooling
  • fix — bug fix
  • docs — documentation only

What Was Changed and Why

Key decisions

  • Verilator 5.036 built from source in RTL CI: cocotb 2.x requires Verilator >= 5.036; Ubuntu 24.04 apt only ships 5.020. Pinned to v5.036 tag and cached by that key — only the first CI run pays the ~9 min compile cost, all subsequent runs hit the cache.
  • Isolated SIM_BUILD directories per cocotb suite: cocotb does not detect TOPLEVEL changes across runs sharing sim_build/. PE test compiled Vtop for pe; the systolic array step would reuse that binary and crash at runtime (root handle systolic_array != pe). Fixed by giving each suite its own SIM_BUILD=sim_build/<suite> path.
  • WASM CI uses apt Verilator 5.020: The verilator --ccem++ path has no cocotb version gate, so the faster apt install is correct and sufficient there.
  • vercel.json lives in web/: Vercel root is set to web/, so it reads config from there. MIME header for .wasm is required — without it the browser rejects the WASM module with a type error.
  • ESLint fix scoped to scripts/: Added globals.node only for scripts/**/*.mjs to preserve browser-only type safety for all source files.

Phase 9 Gate Check

Check Status
RTL CI green + catches regressions ✅ passing
Web CI: lint / typecheck / build ✅ passing
vercel.json with correct WASM MIME ✅ added
CI status badges in README ✅ added
v0.9-rc tagged ✅ pushed

RTL Changes

N/A — no RTL source files modified.

Frontend Changes

  • pnpm lint — clean (fixed 4 pre-existing errors)
  • pnpm typecheck — clean (0 errors, 0 warnings, 32 files)
  • pnpm build — clean, 7 pages built

Testing

verilator --lint-only -Wall rtl/*.sv    # clean, zero warnings
pytest sim/golden.py -q                 # 4 passed
cd web && pnpm lint                     # clean
cd web && pnpm typecheck                # 0 errors
cd web && pnpm build                    # 7 pages built

All three CI workflows confirmed green on GitHub Actions.

Branching Checklist

  • Source branch is dev (integration branch)
  • Target branch is main (protected)
  • All commits on dev follow Conventional Commits
  • No large binaries committed except the intentional web/public/tiny_tpu.wasm
  • No secrets or credentials committed
  • v0.9-rc annotated tag pushed

Reviewer Notes

  • The Vercel production deploy (P9-T2) is a manual step — import the repo at vercel.com with Root Directory set to web/, deploy, and verify Lighthouse scores.
  • Local Verilator (5.020) is below cocotb 2.x minimum — the full cocotb suite runs in CI; upgrade local Verilator from source to run it locally too.
  • This is the last integration PR before Phase 10 (public launch).

deaneeth added 8 commits June 5, 2026 21:21
Adds .github/workflows/rtl.yml, triggered on push/PR to rtl/** or sim/**.

Ubuntu 24.04 apt ships Verilator 5.020, but cocotb 2.x requires >= 5.036.
Build Verilator v5.036 from source on first run and cache the install prefix
by version tag so subsequent runs skip the ~5 min build step.

Steps:
  - Lint RTL with `verilator --lint-only -Wall rtl/*.sv`
  - Run `pytest sim/golden.py -q` (numpy golden reference)
  - cocotb test_pe, test_systolic_array, test_top via make (WAVES=0 for speed)

Removes .github/workflows/.gitkeep placeholder now that real files exist.
Adds .github/workflows/web.yml, triggered on push/PR to web/**.

Uses pnpm/action-setup@v4 (pnpm 11) + actions/setup-node@v4 (Node 22)
with `cache: pnpm` pointing at web/pnpm-lock.yaml to avoid full reinstalls
on unchanged dependencies.

Runs in order: pnpm install --frozen-lockfile, pnpm lint, pnpm typecheck,
pnpm build. All three must pass; build failure surfaces SSR/WASM import
errors that wouldn't otherwise be caught locally.
Adds .github/workflows/wasm.yml, triggered on push/PR to rtl/** or wasm/**.

Installs Verilator 5.020 from apt (sufficient for the WASM build path —
cocotb's version gate only applies to the simulation Makefile, not the
em++ compilation step) and Emscripten via mymindstorm/setup-emsdk@v14.

Runs wasm/build.sh and asserts both web/public/tiny_tpu.mjs and
web/public/tiny_tpu.wasm are produced. Does not commit artifacts from CI;
they must be committed manually after local rebuilds.
Adds a second badge row beneath the tech-stack badges with live status
links for the three new GitHub Actions workflows: RTL CI, Web CI, and
WASM Build. Badges link directly to the workflow run list so viewers
can inspect recent results without leaving the README.
Vercel may serve .wasm files as text/html without an explicit header rule,
which causes the browser to reject the module with a MIME type error and
shows a blank visualizer. The headers block pins Content-Type to
application/wasm for tiny_tpu.wasm and application/javascript for
tiny_tpu.mjs, ensuring correct browser parsing in production.

Also sets Cache-Control: immutable on both artifacts — they are content-
addressed by the WASM build process so long-lived caching is safe.

vercel.json is placed inside web/ (the configured Vercel root directory).
Two issues in the OG image generation script broke `pnpm lint`:

1. Unused variable: `fill` was computed in peCell() but the SVG template
   later switched to inline hardcoded hex values. Removed the dead
   declaration so no-unused-vars is satisfied.

2. Undeclared globals: `console` and `Buffer` are Node.js globals, but
   the ESLint config only injected browser + es2022 globals for .ts/.tsx
   files. Added a separate config block for scripts/**/*.mjs with
   globals.node so these built-ins are recognised without any
   eslint-disable comments.

`pnpm lint`, `pnpm typecheck`, and `pnpm build` all pass after this fix.
cocotb does not detect when TOPLEVEL changes between sequential make runs
sharing the same sim_build/ directory. The PE test compiled sim_build/Vtop
for module `pe`; the systolic array test then reused that binary and
crashed at runtime with "root handle systolic_array != pe".

Fix: pass SIM_BUILD=sim_build/<suite> to each make invocation so every
test suite compiles into its own isolated directory.
ci(actions): GitHub Actions RTL/Web/WASM pipelines + Vercel deploy config (Phase 9)
@deaneeth deaneeth added chore Maintenance and tooling ci GitHub Actions / CI changes docs Documentation only fix Bug fix phase-9 Phase 9: CI/CD & Quality Gate release Release to main labels Jun 5, 2026
@deaneeth deaneeth self-assigned this Jun 5, 2026
@deaneeth deaneeth changed the title release(phase-9): CI/CD pipelines, Vercel deploy config, and quality gate release(v0.9-rc): CI/CD pipelines, Vercel deploy config, and quality gate Jun 5, 2026
@deaneeth deaneeth merged commit 3890c50 into main Jun 5, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Maintenance and tooling ci GitHub Actions / CI changes docs Documentation only fix Bug fix phase-9 Phase 9: CI/CD & Quality Gate release Release to main

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant