Update build.yaml workflow to include 'build' package installation op… #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |