Skip to content

Refactor CMakeLists.txt, pyproject.toml, setup.py, and src/whisper_wr… #5

Refactor CMakeLists.txt, pyproject.toml, setup.py, and src/whisper_wr…

Refactor CMakeLists.txt, pyproject.toml, setup.py, and src/whisper_wr… #5

Workflow file for this run

name: Build and Test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
# Windows builds
- os: windows-latest
platform: win64
acceleration: cpu
- os: windows-latest
platform: win64
acceleration: cuda
- os: windows-latest
platform: win64
acceleration: hipblas
- os: windows-latest
platform: win64
acceleration: vulkan
# macOS builds
- os: macos-latest
platform: x86_64
- os: macos-latest
platform: arm64
# Linux build
- os: ubuntu-latest
platform: x86_64
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install numpy cmake wheel setuptools build
- name: Build wheel
env:
SIMPLER_WHISPER_ACCELERATION: ${{ matrix.acceleration }}
SIMPLER_WHISPER_PLATFORM: ${{ matrix.platform }}
run: |
python -m build --wheel
- name: Install built wheel
run: |
pip install dist/*.whl
- name: Test import
run: |
python -c "import simpler_whisper; print(simpler_whisper.__file__)"
- name: Upload wheel
uses: actions/upload-artifact@v4
with:
name: wheel-${{ matrix.os }}-${{ matrix.platform }}-${{ matrix.acceleration }}
path: dist/*.whl