Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 22 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ jobs:
- name: Frontend unit tests
run: yarn test:frontend
- name: Install Chromium
run: yarn test:ui:install --with-deps
run: |
sudo apt-get -o APT::Update::Error-Mode=any -o Acquire::Retries=3 update
yarn test:ui:install --with-deps
- name: Browser interaction tests
run: yarn test:ui && yarn test:desktop-ui
- name: Upload browser evidence
Expand Down Expand Up @@ -108,7 +110,7 @@ jobs:
- name: Native Linux libraries
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get -o APT::Update::Error-Mode=any -o Acquire::Retries=3 update
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev libdbus-1-dev xvfb
- name: Setup Rust
uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659
Expand Down Expand Up @@ -202,7 +204,9 @@ jobs:
- name: Install Chromium
if: github.event_name != 'schedule'
timeout-minutes: 10
run: yarn playwright install --with-deps chromium
run: |
sudo apt-get -o APT::Update::Error-Mode=any -o Acquire::Retries=3 update
yarn playwright install --with-deps chromium

- name: Install cross-browser engines
if: github.event_name == 'schedule'
Expand Down Expand Up @@ -320,15 +324,29 @@ jobs:
timeout-minutes: 5
run: uv pip install packaging==24.1

- name: Prepare macOS OpenFst GRM prerequisites
if: runner.os == 'macOS'
timeout-minutes: 15
run: node dependencies/macos_prerequisites.cjs --github-env

- name: Install requirements
timeout-minutes: 20
# macOS has no upstream Pynini wheel; expose the real OpenFst GRM SDK.
# Keep the full lock installation and native build isolation below.
run: uv pip install -r dependencies/${{ steps.runtime.outputs.lock }} --index-strategy unsafe-best-match --build-constraint dependencies/build-constraints.txt

- name: Verify macOS native inference dependencies
if: runner.os == 'macOS'
timeout-minutes: 5
run: |
runtime_target=$(node -p "require('./dependencies/runtime.cjs').getRuntime().id")
python scripts/check_runtime.py --target "$runtime_target"

- name: Install system dependencies
if: ${{ matrix.platform == 'linux' }}
timeout-minutes: 30
run: |
sudo apt-get -o Acquire::Retries=3 update
sudo apt-get -o APT::Update::Error-Mode=any -o Acquire::Retries=3 update
sudo apt-get -o Acquire::Retries=3 install -y --no-install-recommends libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf libglib2.0-dev pkg-config gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-libav

- name: Restore Rust compilation cache
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/macos-intel-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,15 @@ jobs:
run: node dependencies/native_wheels.cjs native-wheels
- name: Verify portable native libraries
run: python scripts/verify_macos_wheels.py
- name: Prepare macOS OpenFst GRM prerequisites
timeout-minutes: 15
run: node dependencies/macos_prerequisites.cjs --github-env
- name: Resolve the Intel dependency lock with the native wheels
env:
MACOSX_DEPLOYMENT_TARGET: '14.0'
run: |
cp dependencies/macosx-x86_64.lock native-wheels/macosx-x86_64.lock
uv pip compile dependencies/requirements-macosx-x86_64.txt --find-links native-wheels --python-version 3.12.8 --python-platform x86_64-apple-darwin --index-strategy unsafe-best-match --emit-index-url -o native-wheels/macosx-x86_64.lock
uv pip compile dependencies/requirements-macosx-x86_64.txt --find-links native-wheels --python-version 3.12.8 --python-platform x86_64-apple-darwin --index-strategy unsafe-best-match --build-constraints dependencies/build-constraints.txt --emit-index-url -o native-wheels/macosx-x86_64.lock
- name: Preserve native wheels
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ jobs:
- name: Install Linux build and runtime dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get -o APT::Update::Error-Mode=any -o Acquire::Retries=3 update
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf libglib2.0-dev pkg-config xvfb libgl1-mesa-dev libx11-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-libav

- name: Download native Intel macOS wheels
Expand All @@ -182,8 +182,14 @@ jobs:
if: matrix.id == 'macos-x86_64'
run: |
node dependencies/native_wheels.cjs "$RUNNER_TEMP/native-wheels"
cp "$RUNNER_TEMP/native-wheels/macosx-x86_64.lock" dependencies/macosx-x86_64.lock
echo "SSUI_NATIVE_WHEELHOUSE=$RUNNER_TEMP/native-wheels" >> "$GITHUB_ENV"

- name: Prepare native OpenFst GRM prerequisites
if: runner.os == 'macOS' || matrix.id == 'linux-arm64'
timeout-minutes: 15
run: node dependencies/native_prerequisites.cjs --github-env

- name: Install requirements
timeout-minutes: 30
shell: bash
Expand Down Expand Up @@ -360,7 +366,7 @@ jobs:
- name: Prepare Linux display
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get -o APT::Update::Error-Mode=any -o Acquire::Retries=3 update
sudo apt-get install -y xvfb libwebkit2gtk-4.1-0 libayatana-appindicator3-1 librsvg2-2 gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-libav
- name: Smoke test installed app (NSIS)
if: runner.os == 'Windows'
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/windows-arm64-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ jobs:
- name: Install Linux native build dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get -o APT::Update::Error-Mode=any -o Acquire::Retries=3 update
sudo apt-get install -y libgl1-mesa-dev libx11-dev
- name: Download verified Intel wheels
if: matrix.id == 'macos-x86_64'
Expand All @@ -121,7 +121,13 @@ jobs:
path: native-wheels
- name: Check Intel wheel manifest
if: matrix.id == 'macos-x86_64'
run: node dependencies/native_wheels.cjs native-wheels
run: |
node dependencies/native_wheels.cjs native-wheels
cp native-wheels/macosx-x86_64.lock dependencies/macosx-x86_64.lock
- name: Prepare native OpenFst GRM prerequisites
if: runner.os == 'macOS' || matrix.id == 'linux-arm64'
timeout-minutes: 15
run: node dependencies/native_prerequisites.cjs --github-env
- name: Install the full native dependency lock
timeout-minutes: 25
env:
Expand Down
14 changes: 14 additions & 0 deletions dependencies/dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,20 @@ common:
fastapi[standard]: ">=0.115.6"
gguf: ">=0.14.0"
huggingface_hub[hf-transfer,hf_xet]: ">=0.31"
# CosyVoice2 inference (cosyvoice and matcha sources are vendored in Voice).
HyperPyYAML: "==1.2.2"
# HyperPyYAML 1.2.2 combines PyYAML's Loader with ruamel internals.
ruamel.yaml: ">=0.17.28,<0.19"
conformer: ">=0.3.2"
inflect: ">=7.3,<8"
librosa: "==0.11.0"
modelscope: "==1.26.0"
omegaconf: ">=2.3,<3"
openai-whisper: "==20240930"
soundfile: ">=0.12.1"
tiktoken: ">=0.9.0"
WeTextProcessing: "@ https://github.com/sunxfancy/pynini-2.1.6.post1/releases/download/2.1.6.post1/WeTextProcessing-1.0.4-py3-none-any.whl"
pynini: ">=2.1.6,<2.2"
igraph: ">=0.11.8"
kornia: ">=0.8.0"
matplotlib: ">=3.10.1"
Expand Down
14 changes: 14 additions & 0 deletions dependencies/dependency_config.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,19 @@ const { loadConfig, validateConfig, resolveDependencies, renderRequirements, gen
const { extensionRequirements } = require('./combine_requirements.cjs');
const { parseArgs, compileArgs, parseLockFile } = require('./update_lock.cjs');
const { main: generate } = require('./generate_requirements.cjs');
const { prepare: prepareMacos } = require('./macos_prerequisites.cjs');

test('macOS native Pynini build preserves caller flags and requires GRM libraries', () => {
const env = { CPLUS_INCLUDE_PATH: '/custom/include', LIBRARY_PATH: '/custom/lib', LDFLAGS: '-Wl,-rpath,/custom/lib' };
const run = (_command, args) => args[0] === '--prefix' ? '/opt/homebrew/opt/openfst\n' : 'openfst 1.8.4\n';
const result = prepareMacos({ platform: 'darwin', env, run, exists: () => true });
assert.equal(result.CPLUS_INCLUDE_PATH, '/opt/homebrew/opt/openfst/include:/custom/include');
assert.equal(result.LIBRARY_PATH, '/opt/homebrew/opt/openfst/lib:/custom/lib');
assert.equal(result.LDFLAGS, '-L/opt/homebrew/opt/openfst/lib -Wl,-rpath,/custom/lib');
assert.throws(() => prepareMacos({ platform: 'darwin', env, run,
exists: file => !file.endsWith('libfstfar.dylib') }), /GRM prerequisite missing/);
assert.deepEqual(prepareMacos({ platform: 'win32', env, run: () => { throw new Error('must not run brew'); } }), env);
});

function sample() {
return {
Expand Down Expand Up @@ -110,6 +123,7 @@ test('lock compilation uses the requested target, Python version and unchanged l
assert.throws(() => parseArgs(['--target']), /缺少/);
assert.throws(() => parseArgs(['--target', 'linux-arm64-qnn']), /尚未提供/);
const args = compileArgs('macosx', 'in file.txt', 'macosx.lock', true);
assert.equal(args[args.indexOf('--build-constraints') + 1], path.join(__dirname, 'build-constraints.txt'));
assert.equal(args[args.indexOf('--python-platform') + 1], 'aarch64-apple-darwin');
assert.equal(args[args.indexOf('--python-version') + 1], config.python.version);
assert.ok(args.includes('in file.txt'));
Expand Down
3 changes: 2 additions & 1 deletion dependencies/install_requirements.cjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const { resolveConfig, root, executable } = require('./dev_config.cjs');
const devEnv = resolveConfig();
let devEnv = resolveConfig();
const { execSync, execFileSync } = require('child_process');
const path = require('path');
const fs = require('fs');
Expand All @@ -17,6 +17,7 @@ function getRequirementsFile() {
}

try {
devEnv = require('./native_prerequisites.cjs').prepare({ env: devEnv });
const requirementsFile = getRequirementsFile();
const pythonRuntime = JSON.parse(execFileSync(executable('python', devEnv), [
'-c', 'import json, platform, sys; print(json.dumps({"os": sys.platform, "arch": platform.machine()}))'
Expand Down
Loading
Loading