Skip to content

Commit

Permalink
Move to github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
tgarc committed Apr 14, 2024
1 parent 71ed4bc commit e439b48
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 7 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Build

on: [push, pull_request]

jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-13, macos-latest]

steps:
- uses: actions/checkout@v4
with:
submodules: recursive

# Used to host cibuildwheel
- uses: actions/setup-python@v3

- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.17.0 twine

- if: ${{ startsWith(runner.os, 'macos') }}
run: brew install libffi

- if: ${{ runner.os == 'ubuntu-latest' }}
run: apt install -y libffi-devel

- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_BEFORE_BUILD: '{pip} install -r setup-requirements.txt'

- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ include README.rst
include src/*.c src/*.h
include build_pastream.py
include portaudio/include/portaudio.h portaudio/src/common/pa_ringbuffer.h portaudio/src/common/pa_memorybarrier.h
include setup-requirements.txt dev-requirements.txt
include requirements.txt setup-requirements.txt dev-requirements.txt
include docs/requirements.txt docs/*.rst docs/Makefile docs/make.bat docs/*.py
include etc/README.rst
include examples/requirements.txt examples/README.rst
Expand Down
4 changes: 4 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
pa_ringbuffer>=0.1.2
cffi>=1.0.0
soundfile>=0.9.0
sounddevice>=0.3.9
7 changes: 1 addition & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,7 @@
entry_points={'console_scripts': ['pastream = pastream:_main']},
cffi_modules=["build_pastream.py:ffibuilder"],
setup_requires=open(os.path.join(dirname, 'setup-requirements.txt')).readlines(),
install_requires=[
'pa_ringbuffer>=0.1.2',
'cffi>=1.0.0',
'soundfile>=0.9.0',
'sounddevice>=0.3.9',
],
install_requires=open(os.path.join(dirname, 'requirements.txt')).readlines(),
tests_require=open(os.path.join(dirname, 'tests', 'requirements.txt')).readlines(),
extras_require={
'numpy': 'numpy',
Expand Down

0 comments on commit e439b48

Please sign in to comment.