Repository navigation
70 lines (57 loc) · 1.94 KB
/
Copy pathpython-compatibility.yml
File metadata and controls
70 lines (57 loc) · 1.94 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
69
70
name: Python Compatibility
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
permissions: {}
jobs:
test:
runs-on: macos-latest # Apple Silicon — required for mlx-whisper
permissions:
contents: read
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2
with:
python-version: ${{ matrix.python-version }}
- name: Check lockfile is up to date
run: uv lock --check
- name: Install the project
run: uv sync --all-extras
- name: Test import
run: uv run python -c "import whispermlx; print('Successfully imported whispermlx')"
install-from-metadata:
runs-on: macos-latest # Apple Silicon — required for mlx-whisper
permissions:
contents: read
strategy:
matrix:
python-version: ["3.10", "3.13"]
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2
with:
python-version: ${{ matrix.python-version }}
- name: Build wheel
run: uv build --wheel
- name: Install the wheel outside the project tree
run: |
workdir="$(mktemp -d)"
cd "$workdir"
uv venv --python "${{ matrix.python-version }}"
wheel="$(ls "$GITHUB_WORKSPACE"/dist/*.whl)"
uv pip install "$wheel[fast]"
uv run --no-project python -c "import whispermlx, numba, llvmlite; print('Successfully imported whispermlx, numba and llvmlite')"