@@ -63,20 +63,58 @@ jobs:
6363 run-id : ${{ inputs.run-id }}
6464 github-token : ${{ github.token }}
6565
66- - name : Create venv and install dependencies (Unix)
67- if : runner.os != 'Windows'
66+ - name : Select compatible wheel (macOS)
67+ if : runner.os == 'macOS'
68+ id : select-wheel-macos
69+ run : |
70+ # macOS artifacts contain both x86_64 and arm64 wheels, select the right one
71+ WHEEL=$(python3 -c "
72+ import glob
73+ import platform
74+ import sys
75+
76+ wheels = glob.glob('rtc-wheel/*.whl')
77+ machine = platform.machine().lower()
78+
79+ arch_map = {
80+ 'x86_64': ['x86_64'],
81+ 'arm64': ['arm64'],
82+ }
83+ patterns = arch_map.get(machine, [machine])
84+
85+ for wheel in wheels:
86+ wheel_lower = wheel.lower()
87+ if any(p in wheel_lower for p in patterns):
88+ print(wheel)
89+ sys.exit(0)
90+
91+ print(f'No matching wheel found for {machine}', file=sys.stderr)
92+ sys.exit(1)
93+ ")
94+ echo "wheel=$WHEEL" >> $GITHUB_OUTPUT
95+
96+ - name : Create venv and install dependencies (Linux)
97+ if : runner.os == 'Linux'
6898 run : |
6999 uv venv .test-venv
70100 source .test-venv/bin/activate
71101 uv pip install rtc-wheel/*.whl ./livekit-api ./livekit-protocol
72102 uv pip install pytest pytest-asyncio numpy matplotlib
73103
104+ - name : Create venv and install dependencies (macOS)
105+ if : runner.os == 'macOS'
106+ run : |
107+ uv venv .test-venv
108+ source .test-venv/bin/activate
109+ uv pip install "${{ steps.select-wheel-macos.outputs.wheel }}" ./livekit-api ./livekit-protocol
110+ uv pip install pytest pytest-asyncio numpy matplotlib
111+
74112 - name : Create venv and install dependencies (Windows)
75113 if : runner.os == 'Windows'
76114 run : |
77115 uv venv .test-venv
78116 .test-venv\Scripts\activate
79- uv pip install (Get-ChildItem rtc-wheel\*.whl).FullName .\livekit-api .\livekit-protocol
117+ uv pip install rtc-wheel\*.whl .\livekit-api .\livekit-protocol
80118 uv pip install pytest pytest-asyncio numpy matplotlib
81119 shell : pwsh
82120
0 commit comments