Repository navigation
ci(web): publish the web simulator to Cloudflare Workers - #7964
Merged
Merged
Conversation
Build all WASM modules every night and deploy main as a Worker with static assets, replacing the manual upload to Cloudflare Pages. Move the module build into a reusable workflow shared with Companion. Its targets now come from fw.json, which adds the T18 H7 module that was missing from the Companion matrix. The deploy job runs separately from the build, in a GitHub environment limited to main, so that the Cloudflare token is only exposed to wrangler.
GitHub allows 5 concurrent macOS jobs on the Free plan, shared with the macOS Companion build. With 9 module groups, the last ones wait for a free runner. Linux runners have 4 cores instead of 3, and a limit of 20 concurrent jobs.
raphaelcoeffic
marked this pull request as ready for review
November 1, 2026 09:26
raphaelcoeffic
force-pushed
the
ci-web-simulator-workers
branch
from
November 1, 2026 09:26
0cacf48 to
68de430
Compare
raphaelcoeffic
marked this pull request as draft
November 1, 2026 09:35
This was referenced Nov 1, 2026
Modules of radios with an aux serial port import simuAuxSerial* since #7284, and could not be instantiated by the page: 25 of the 47 radios failed to start with "function import requires a callable".
Only for visitors without a previous selection or a radio in the URL.
Checking that the modules are served did not notice that most of them could not start. Each radio now has to get past its splash screen without page errors, or the deploy job does not run.
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 of changes:
The online web simulator is uploaded by hand and is out of date: only 6 of the 38 radios it lists have a module. This builds every module each night and deploys
mainautomatically.wasm_modules.yml, which both Companion and the newweb_simulator.ymlcall.fw.json: the hand-kept matrix is gone. This also adds the T18 H7 module, which was missing from Companion's matrix. Companion now runs whenfw.jsonchanges, since adding a radio no longer touchescompanion.yml.web/wrangler.jsonc.web/scripts/check-deployment.jschecks the live site after each deploy. PRs touchingweb/**only get a build check.simuAuxSerial*imports added in fix(simulator): restore host serial port bridge in WASM simulator #7284 as no-ops. Without them, 25 of the 47 radios fail to start with "function import requires a callable".web/scripts/smoke-test.jsstarts every radio in Chromium before deploying. Each must get past its splash screen without page errors, or the deploy job does not run.Linux runners
The second commit moves the module builds from macOS to Linux. The Free plan allows 5 concurrent macOS jobs, so in a recent Companion run the 9 module groups took about 25 minutes, with the last ones starting about 13 minutes late. Linux allows 20 concurrent jobs and has 4 cores instead of 3.
The Linux build passed in this PR's Companion run. It used more runner time than macOS (163 against 93 runner-minutes, and 28 against 25 minutes wall time in the runs I measured), so that commit can still be dropped on its own.
Deployment security
The deploy job runs apart from the build, in the
web-simulatorenvironment, which only acceptsmain. The Cloudflare token is only set on the wrangler step, and is limited to this one Worker. PRs and other branches can't reach it.Testing
check-deployment.jspasses there for all 47 radios. The version deployed there fails on 25 of the 47 radios, because of the missing aux serial imports.actionlintreports nothing on the new workflows, apart from missing metadata in existing actions.workflow_dispatch, which need the workflow onmain.After merging
edgetx-simulator.pages.devto the final URL.