Repository navigation
CI: build every template for the browser with emcc - #23
Merged
Merged
Conversation
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.
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.
The smoke test builds native programs only: it switches each project to
target: nativeand replaces itsMain.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 ormiso devbuild, and CI would stay green.What this adds
scripts/template-test.shdoes what a new user does:miso newwith each template (counter, router, canvas)miso buildfortarget: browser(WebAssembly) andbrowser_js(JavaScript), checking thatpublic/getsindex.jsandindex.htmlmiso build --dev, which ismiso dev's build: combinators plus the runtime that runs them, built with emcctemplatesjob runs it on Linux and Apple Silicon, using the emscripten from the nixpkgs miso is built with (read fromflake.lock).releasejob 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
templatesrun 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 themiso.ymlrewrite against a builtmiso.Generated by Claude Code