Skip to content

A lightweight 2.5D character player for the web, with lip sync and webcam face tracking.

CI: Firefox and WebKit run in their own job on macOS, not failing the run yet

LivLiv0ffb70f2b815
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 09d4635..bb0424f 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -23,5 +23,18 @@ jobs:
- run: npm run test:types
- run: npx playwright-core install --with-deps chromium-headless-shell
- run: npm run test:browser
- - run: npx playwright-core install --with-deps firefox webkit
+ # Firefox and WebKit: they start WebGL2 only where they find a GPU or a software GL, and the Linux runner gives them
+ # neither. Tried here first without failing the run, until it has been seen to pass on this runner.
+ engines:
+ runs-on: macos-latest
+ continue-on-error: true
+ timeout-minutes: 15
+ steps:
+ - uses: actions/checkout@v5
+ - uses: actions/setup-node@v5
+ with:
+ node-version: 24
+ - run: npm install --no-audit --no-fund
+ - run: npm run build
+ - run: npx playwright-core install firefox webkit
- run: npm run test:engines
diff --git a/README.ja.md b/README.ja.md
index 4690ef8..b335610 100644
--- a/README.ja.md
+++ b/README.ja.md
@@ -116,6 +116,7 @@ npm run check # 型チェック
npm run build # dist/:index.js、tracking.js、voice.js、body.js、png.js、vrm.js(ES モジュール)、chunks/ と types/
npm test # ユニットテストとファジング(Node 22.18 以降、ブラウザ不要)
npm run test:browser # ヘッドレス Chromium で全キャラクターを描画。最初に一度 npx playwright-core install chromium-headless-shell
+npm run test:engines # Firefox と WebKit で小さなサンプルを実行。WebGL2 が動く環境(GPU かソフトウェア GL)が必要。最初に一度 npx playwright-core install firefox webkit
```
`src/runtime/` は livliv.ai 自身が使っているレンダラーとモーションのコードで、このリポジトリはそこから公開しています。[CONTRIBUTING.md](CONTRIBUTING.md) もご覧ください。セキュリティの問題は [SECURITY.md](SECURITY.md) のとおりにご報告ください。
diff --git a/README.md b/README.md
index 62ef696..835771c 100644
--- a/README.md
+++ b/README.md
@@ -144,6 +144,7 @@ npm run check # types
npm run build # dist/: index.js, tracking.js, voice.js, body.js, png.js, vrm.js (ES modules), chunks/ and types/
npm test # unit and fuzz tests (Node 22.18 or newer, no browser)
npm run test:browser # every featured character drawn in headless Chromium; once: npx playwright-core install chromium-headless-shell
+npm run test:engines # a sample on Firefox and WebKit, where WebGL2 starts (a GPU or a software GL); once: npx playwright-core install firefox webkit
```
`src/runtime/` is the renderer and motion code livliv.ai runs; this repository is published from it. See
diff --git a/README.zh-CN.md b/README.zh-CN.md
index fd4a418..80ddeaa 100644
--- a/README.zh-CN.md
+++ b/README.zh-CN.md
@@ -118,6 +118,7 @@ npm run check # 类型检查
npm run build # dist/:index.js、tracking.js、voice.js、body.js、png.js、vrm.js(ES 模块)、chunks/ 和 types/
npm test # 单元测试和模糊测试(Node 22.18 及以上,不需要浏览器)
npm run test:browser # 在无头 Chromium 里画出每个精选角色;先执行一次 npx playwright-core install chromium-headless-shell
+npm run test:engines # 在 Firefox 和 WebKit 上跑一个小样本,机器要能启动 WebGL2(有 GPU 或软件 GL);先执行一次 npx playwright-core install firefox webkit
```
`src/runtime/` 是 livliv.ai 自己在用的渲染和动作代码,这个仓库从它发布。参见 [CONTRIBUTING.md](CONTRIBUTING.md)。安全问题请按 [SECURITY.md](SECURITY.md) 报告。
diff --git a/test/smoke.mjs b/test/smoke.mjs
index af526b4..2235fb5 100644
--- a/test/smoke.mjs
+++ b/test/smoke.mjs
@@ -122,6 +122,11 @@ if (engine) {
page.on('pageerror', (e) => errors.push(e.message))
await page.goto(`http://127.0.0.1:${server.address().port}/test/smoke.html`)
await page.waitForFunction(() => typeof window.run === 'function')
+ if (!await page.evaluate(async () => (await import('/dist/index.js')).Player.isSupported())) {
+ console.log(`FAIL ${engine}: no WebGL2 here. This sample needs a GPU or a software GL, which a Linux machine without a display may not have`)
+ await browser.close(); server.close()
+ process.exit(1)
+ }
const chosen = ids.slice(0, 3), nameIn = (id) => JSON.parse(readFileSync(join(chars, id, 'model.json'), 'utf8')).name
await page.evaluate((f) => window.setFiles(f), files)
const r = await page.evaluate((a) => window.runLoads(a), chosen)