Skip to content

fix building python wheels #22

fix building python wheels

fix building python wheels #22

Workflow file for this run

name: CI Build & Test
on:
push:
branches: [main, dev]
pull_request:
branches: [main]
workflow_dispatch: # Allow manual triggering
jobs:
build-and-test:
name: Build & Test (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
cmake_generator: "Unix Makefiles"
- os: macos-latest
cmake_generator: "Unix Makefiles"
- os: windows-latest
cmake_generator: "Visual Studio 17 2022"
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Install dependencies (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y build-essential cmake
- name: Configure CMake
run: |
cmake -B build -G "${{ matrix.cmake_generator }}" -DRS_BUILD_TESTS=ON
- name: Build (Unix)
if: runner.os != 'Windows'
run: cmake --build build --config Release
- name: Build (Windows)
if: runner.os == 'Windows'
run: cmake --build build --config Release
- name: Run CTest
working-directory: build
run: ctest --output-on-failure -C Release
- name: Verify binary exists (Unix)
if: runner.os != 'Windows'
run: |
ls -la build/rs-asr-offline || ls -la build/Release/rs-asr-offline
- name: Verify binary exists (Windows)
if: runner.os == 'Windows'
run: |
dir build\Release\rs-asr-offline.exe
python-bindings-test:
name: Python Bindings (${{ matrix.os }}, Python ${{ matrix.python-version }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install pybind11 cmake setuptools setuptools_scm wheel numpy
- name: Build and install Python package
run: |
pip install . -v
- name: Verify Python import
run: |
python -c "import rapidspeech; print('rapidspeech imported successfully')"