-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (51 loc) · 1.57 KB
/
build.yaml
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
name: Build and Test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_call:
jobs:
build:
strategy:
fail-fast: false
matrix:
os: ['windows-latest', 'macos-latest', 'ubuntu-latest']
acceleration: ['cpu'] # , 'cuda'
exclude:
- os: macos-latest
acceleration: cuda
- os: ubuntu-latest
acceleration: cuda
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install numpy cmake wheel setuptools build cibuildwheel
- name: Build wheel
env:
CIBW_ENVIRONMENT: "SIMPLER_WHISPER_ACCELERATION='${{ matrix.acceleration }}' MAOSX_DEPLOYMENT_TARGET=10.13"
CIBW_BUILD: "cp310-* cp311-* cp312-*"
CIBW_ARCHS_MACOS: "universal2"
CIBW_ARCHS_WINDOWS: "AMD64"
CIBW_ARCHS_LINUX: "x86_64"
CIBW_SKIP: "*-musllinux_*"
CIBW_BUILD_VERBOSITY: 1
run: |
python -m cibuildwheel --output-dir wheelhouse
- name: Test import
if: false
run: |
python -c "import sys; sys.path.pop(0); import simpler_whisper; print(simpler_whisper.__file__)"
- name: Upload wheel
uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.os }}-${{ matrix.acceleration }}
path: |
wheelhouse/*.whl