Fix CI: do not omit optional dependencies
rollup ships its native binary as an optional dependency
(@rollup/rollup-linux-x64-gnu), so `npm ci --omit=optional` -- added to keep
the prebuilt Dawn binaries out of CI -- left vite unable to build. Install
everything, as before; the extra ~70 MB is the price of the benchmark being a
declared dependency. The README no longer suggests --omit=optional either,
since it breaks the build for the same reason.
3 changed files+9−7
.github/workflows/ci.ymlmodified+1−1View file
@@ -13,7 +13,7 @@ jobs:
1313 with:
1414 node-version: 24
1515 cache: npm
16- - run: npm ci --omit=optional # skip the prebuilt Dawn binaries; CI does not benchmark
16+ - run: npm ci
1717 - run: npm run test:node
1818 # headless Chrome + SwiftShader software WebGPU
1919 - run: npm run test:gpu
.github/workflows/deploy.ymlmodified+1−1View file
@@ -25,7 +25,7 @@ jobs:
2525 with:
2626 node-version: 24
2727 cache: npm
28- - run: npm ci --omit=optional # skip the prebuilt Dawn binaries; CI does not benchmark
28+ - run: npm ci
2929 - run: npm run test:node
3030 - run: npm run build
3131 - uses: actions/configure-pages@v5
README.mdmodified+7−5View file
@@ -90,11 +90,13 @@ directly, so `src/` is literally the same code in both places, down to the
9090 device request in `requestShtDevice()` (Dawn is installed under `navigator.gpu`
9191 and the WebGPU globals, and the rest runs unchanged).
9292
93-Desktop WebGPU comes from the optional `webgpu` package (prebuilt Dawn, ~70 MB).
94-A plain `npm install` picks it up; `npm install --omit=optional` skips it and
95-leaves `--backend cpu` working. Other flags: `--steps`, `--warmup`, `--json`,
96-`--help`; `DAWN_FLAGS='backend=vulkan'` (`;`-separated) passes Dawn options
97-through, e.g. to pick a backend or compare against Dawn's own software adapter.
93+Desktop WebGPU comes from the `webgpu` package (prebuilt Dawn, ~70 MB), listed
94+as an optional dependency so that a platform it has no binaries for fails the
95+install of that package alone rather than the whole tree. `npm install` picks it
96+up; without it, only `--backend cpu` runs and the benchmark says so. Other
97+flags: `--steps`, `--warmup`, `--json`, `--help`; `DAWN_FLAGS='backend=vulkan'`
98+(`;`-separated) passes Dawn options through, e.g. to pick a backend or to
99+compare against Dawn's own software adapter.
98100
99101 What the comparison does and does not control for:
100102