Conversation
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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
web/vercel.jsonwith explicitContent-Type: application/wasmand long-livedCache-Control: immutableheaders — without this Vercel serves the WASM binary astext/htmland the visualizer silently breaks in productiongen-og-image.mjsthat would have failed Web CI on the very first runv0.9-rcon this commit: Phase 9 gate fully metType of Change
ci— GitHub Actions changechore— repo maintenance, CI, toolingfix— bug fixdocs— documentation onlyWhat Was Changed and Why
Key decisions
cocotb2.x requires Verilator >= 5.036; Ubuntu 24.04 apt only ships 5.020. Pinned tov5.036tag and cached by that key — only the first CI run pays the ~9 min compile cost, all subsequent runs hit the cache.SIM_BUILDdirectories per cocotb suite: cocotb does not detect TOPLEVEL changes across runs sharingsim_build/. PE test compiledVtopforpe; the systolic array step would reuse that binary and crash at runtime (root handle systolic_array != pe). Fixed by giving each suite its ownSIM_BUILD=sim_build/<suite>path.verilator --cc→em++path has no cocotb version gate, so the faster apt install is correct and sufficient there.vercel.jsonlives inweb/: Vercel root is set toweb/, so it reads config from there. MIME header for.wasmis required — without it the browser rejects the WASM module with a type error.scripts/: Addedglobals.nodeonly forscripts/**/*.mjsto preserve browser-only type safety for all source files.Phase 9 Gate Check
vercel.jsonwith correct WASM MIMEv0.9-rctaggedRTL 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 builtTesting
All three CI workflows confirmed green on GitHub Actions.
Branching Checklist
dev(integration branch)main(protected)devfollow Conventional Commitsweb/public/tiny_tpu.wasmv0.9-rcannotated tag pushedReviewer Notes
web/, deploy, and verify Lighthouse scores.