-
-
Notifications
You must be signed in to change notification settings - Fork 159
68 lines (59 loc) · 2.09 KB
/
Copy pathtests.yml
File metadata and controls
68 lines (59 loc) · 2.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-and-test:
runs-on: macos-15
timeout-minutes: 45
# The virtualized runner has no usable Neural Engine AND its paravirtual
# GPU can't JIT CoreML's first-load Metal program for stateful graphs, so
# both ANE and cpuAndGPU loads hang. Force cpuOnly — no ANE/GPU codegen,
# deterministic, and fine for correctness assertions. On-device keeps ANE.
env:
SPEECH_COREML_COMPUTE_UNITS: cpuOnly
steps:
- uses: actions/checkout@v5
- name: Cache SwiftPM
uses: actions/cache@v5
with:
path: .build
key: spm-${{ runner.os }}-${{ hashFiles('Package.swift') }}
restore-keys: spm-${{ runner.os }}-
- name: Build debug
run: swift build --build-tests --disable-sandbox
- name: Build metallib
run: ./scripts/build_mlx_metallib.sh debug
- name: Copy metallib to test bundle
run: |
ARCH="$(uname -m)-apple-macosx"
for BUNDLE in .build/$ARCH/debug/*.xctest/Contents/MacOS; do
[ -d "$BUNDLE" ] && cp .build/debug/mlx.metallib "$BUNDLE/" 2>/dev/null || true
done
- name: Run unit tests (skip E2E — those require model downloads)
run: >
swift test --skip-build
--skip E2E
--skip StreamingASRTests
--skip ForcedAlignerTests
--skip SileroVADTests
--skip SpeechVADTests
--skip WeSpeakerTests
--skip SortformerTests
--skip PersonaPlexTests
--skip ParakeetASRTests
--skip CosyVoiceTTSTests
--skip KokoroTTSTests
--skip StreamingAudioPlayerTests
- name: Build demo apps (release only)
if: startsWith(github.ref, 'refs/tags/v')
run: |
for demo in Examples/SpeechDemo Examples/PersonaPlexDemo; do
echo "Building $demo..."
(cd "$demo" && swift build --disable-sandbox) || exit 1
done