Skip to content

CI: build every template for the browser with emcc - #23

Merged
dmjio merged 1 commit into
mainfrom
ci-browser-templates
Oct 22, 2026
Merged

dmjio merged 1 commit into
mainfrom
ci-browser-templates

Conversation

@dmjio

@dmjio dmjio commented Oct 22, 2026

Copy link
Copy Markdown
Member

The smoke test builds native programs only: it switches each project to target: native and replaces its Main.hs. Nothing in CI compiles a template or builds anything for the browser, so a release could ship templates that don't build, or a broken browser or miso dev build, and CI would stay green.

What this adds

  • scripts/template-test.sh does what a new user does:
    • miso new with each template (counter, router, canvas)
    • miso build for target: browser (WebAssembly) and browser_js (JavaScript), checking that public/ gets index.js and index.html
    • miso build --dev, which is miso dev's build: combinators plus the runtime that runs them, built with emcc
  • A templates job runs it on Linux and Apple Silicon, using the emscripten from the nixpkgs miso is built with (read from flake.lock).
  • The release job now waits for it, so a tag can't publish a release whose templates don't build.

Not run yet: I couldn't run the browser builds outside CI (no emcc or package database there), so this PR's own templates run is the first one. If it fails, that's a real finding about the current templates or browser builds. I did check the template list parsing and the miso.yml rewrite against a built miso.


Generated by Claude Code

The smoke test builds native programs only: it switches each project to
target: native and replaces its Main.hs.  Nothing compiled a template, or
built anything for the browser, so a release could ship templates that do
not build, or a browser build (or miso dev's) that does not work.

scripts/template-test.sh does what a new user does: miso new with each
template, miso build for target: browser (WebAssembly) and browser_js
(JavaScript), and miso build --dev (miso dev's build: combinators, and the
runtime that runs them, built with emcc).  The templates job runs it on
Linux and Apple Silicon, with the emscripten of the nixpkgs miso is built
with (from flake.lock), and the release waits for it.
@dmjio
dmjio merged commit 0ae80a8 into main Oct 22, 2026
8 checks passed
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