Skip to content
Merged
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
23 changes: 23 additions & 0 deletions .github/workflows/integration-mobile-test-tts-ggml.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,26 @@ jobs:
ios-provisioning-profile-base64: ${{ secrets.TEST_APP_APPLE_PROVISIONING_PROFILE }}
apple-team-id: ${{ secrets.APPLE_TEAM_ID }}

# Benchmark runs (run_rtf_benchmarks=true): the benchmark runners are
# intentionally NOT in test-groups.json, so they never run on normal PRs.
# For a benchmark run, build the device-farm test-groups from the addon's
# perf-tests.json so ONLY the benchmarks execute. To add a benchmark, add
# its function name to perf-tests.json β€” no workflow changes needed. On a
# normal run this step is skipped, the output is empty, and the action
# falls back to auto-detecting test-groups.json (the functional tests).
- name: Resolve benchmark test-groups from perf-tests.json
id: perf_groups
if: ${{ inputs.run_rtf_benchmarks }}
working-directory: addon/${{ inputs.workdir || 'packages/tts-ggml' }}
run: |
GREP=$(jq -r 'join("|")' test/mobile/perf-tests.json)
if [ -z "$GREP" ]; then
echo "::error::perf-tests.json is empty β€” no benchmarks to run"
exit 1
fi
echo "Benchmark grep: $GREP"
printf 'groups=[{"name":"perf","grep":"%s"}]\n' "$GREP" >> "$GITHUB_OUTPUT"

- name: Upload to Device Farm
id: upload
uses: ./.github/actions/run-mobile-integration-tests/upload-to-devicefarm
Expand All @@ -165,6 +185,9 @@ jobs:
app-name: ${{ steps.build.outputs.app-name }}
aws-role-to-assume: ${{ secrets.AWS_OIDC_ROLE_ARN }}
device-farm-project-arn: ${{ secrets.AWS_DEVICE_FARM_PROJECT_ARN_TTS_GGML || secrets.AWS_DEVICE_FARM_PROJECT_ARN_ONNX_TTS }}
# Empty on normal runs => action auto-detects test-groups.json
# (functional tests). Set on benchmark runs => only the benchmarks.
test-groups: ${{ steps.perf_groups.outputs.groups }}
enables-perf: ${{ inputs.run_rtf_benchmarks && 'true' || 'false' }}
mocha-timeout-ms: '2700000'
wdio-waitfor-timeout-ms: '600000'
Expand Down
4 changes: 4 additions & 0 deletions packages/tts-ggml/test/mobile/perf-tests.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[
"runRtfBenchmarkTest",
"runStreamingBenchmarkTest"
]
31 changes: 31 additions & 0 deletions packages/tts-ggml/test/mobile/test-groups.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"_comment": "Mobile test sharding for @qvac/tts-ggml. The mobile CI action auto-detects this file and runs ONLY the tests listed here (Mocha --grep per group). The perf benchmarks (runRtfBenchmarkTest, runStreamingBenchmarkTest) are intentionally NOT listed: they must not run on normal mobile runs, so they can never produce a 0/0 result. The benchmark list lives in perf-tests.json; a benchmark run (run_rtf_benchmarks=true, e.g. via benchmark-rtf-tts-ggml.yml) builds its test-groups from that file and runs only those. To add/remove a benchmark, edit perf-tests.json β€” no workflow or this-file changes needed. Only the 'ios' and 'android' keys are consumed by the action; this _comment is ignored.",
"ios": {
"functional": [
"runAddonTest",
"runChatterboxJaMecabTest",
"runChatterboxKvCacheGpuTest",
"runChatterboxMtlTest",
"runChatterboxSpeedTest",
"runGpuSmokeTest",
"runMultipleRunsTest",
"runSupertonicMtlTest",
"runSupertonicTest",
"runSupertonic3QuantTest"
]
},
"android": {
"functional": [
"runAddonTest",
"runChatterboxJaMecabTest",
"runChatterboxKvCacheGpuTest",
"runChatterboxMtlTest",
"runChatterboxSpeedTest",
"runGpuSmokeTest",
"runMultipleRunsTest",
"runSupertonicMtlTest",
"runSupertonicTest",
"runSupertonic3QuantTest"
]
}
}
Loading