Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 9 additions & 15 deletions .github/workflows/main.yml → .github/workflows/development.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
name: Build sdist and wheel and publish to PyPI and TestPyPI
name: Build sdist and wheel and publish to TestPyPI

#on: [push, pull_request]
on:
push:
branches:
- master
- develop
pull_request:
branches:
- master
- develop

jobs:
build_sdist:
Expand Down Expand Up @@ -36,6 +35,7 @@ jobs:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
Expand All @@ -45,7 +45,7 @@ jobs:
submodules: true

- name: Build wheels
uses: pypa/cibuildwheel@v2.11.4
uses: pypa/cibuildwheel@v2.12.3

- uses: actions/upload-artifact@v3
with:
Expand All @@ -67,7 +67,7 @@ jobs:
with:
platforms: all

- uses: pypa/cibuildwheel@v2.11.3
- uses: pypa/cibuildwheel@v2.12.3
env:
CIBW_ARCHS: ${{ matrix.arch }}

Expand All @@ -84,9 +84,8 @@ jobs:
needs: [build_arch_wheels, build_wheels, build_sdist]
runs-on: ubuntu-latest
environment: PyPI release
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v')
if: github.ref == 'refs/heads/develop'
steps:

- uses: actions/download-artifact@v3
with:
# unpacks default artifact into dist/
Expand All @@ -95,16 +94,11 @@ jobs:
path: dist

- name: Publish distribution to Test PyPI
uses: pypa/gh-action-pypi-publish@v1.6.4
uses: pypa/gh-action-pypi-publish@v1.8.6
with:
skip_existing: true
user: __token__
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
verify-metadata: false

- name: Publish distribution to PyPI
if: startsWith(github.ref, 'refs/tags/v')
uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
100 changes: 100 additions & 0 deletions .github/workflows/production.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
name: Build sdist and wheel and publish to PyPI

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
build_sdist:
name: Build sdist
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@v3
with:
submodules: true

- name: Install ninja
run: pipx install ninja

- name: Build sdist
run: pipx run build --sdist

- name: Check metadata
run: pipx run twine check --strict dist/*

- uses: actions/upload-artifact@v3
with:
path: dist/*.tar.gz

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

- uses: actions/checkout@v3
with:
submodules: true

- name: Build wheels
uses: pypa/[email protected]

- uses: actions/upload-artifact@v3
with:
path: wheelhouse/*.whl

build_arch_wheels:
name: Build wheels on Linux ${{ matrix.arch }}
runs-on: ubuntu-20.04
strategy:
matrix:
arch: [aarch64]
steps:

- uses: actions/checkout@v3
with:
submodules: true

- uses: docker/setup-qemu-action@v2
with:
platforms: all

- uses: pypa/[email protected]
env:
CIBW_ARCHS: ${{ matrix.arch }}

- name: Verify clean directory
run: git diff --exit-code
shell: bash

- name: Upload wheels
uses: actions/upload-artifact@v3
with:
path: wheelhouse/*.whl

upload_pypi:
needs: [build_arch_wheels, build_wheels, build_sdist]
runs-on: ubuntu-latest
environment: PyPI release
if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/download-artifact@v3
with:
# unpacks default artifact into dist/
# if `name: artifact` is omitted, the action will create extra parent dir
name: artifact
path: dist

- name: Publish distribution to PyPI
uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
verify-metadata: false
81 changes: 81 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: Build sdist and wheel for testing purposes

on:
push:
branches:
- rtmidi-5.0.0
pull_request:
branches:
- rtmidi-5.0.0

jobs:
build_sdist:
name: Build sdist
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@v3
with:
submodules: true

- name: Install ninja
run: pipx install ninja

- name: Build sdist
run: pipx run build --sdist

- name: Check metadata
run: pipx run twine check --strict dist/*

- uses: actions/upload-artifact@v3
with:
path: dist/*.tar.gz

build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:

- uses: actions/checkout@v3
with:
submodules: true

- name: Build wheels
uses: pypa/[email protected]

- uses: actions/upload-artifact@v3
with:
path: wheelhouse/*.whl

build_arch_wheels:
name: Build wheels on Linux ${{ matrix.arch }}
runs-on: ubuntu-20.04
strategy:
matrix:
arch: [aarch64]
steps:

- uses: actions/checkout@v3
with:
submodules: true

- uses: docker/setup-qemu-action@v2
with:
platforms: all

- uses: pypa/[email protected]
env:
CIBW_ARCHS: ${{ matrix.arch }}

- name: Verify clean directory
run: git diff --exit-code
shell: bash

- name: Upload wheels
uses: actions/upload-artifact@v3
with:
path: wheelhouse/*.whl
7 changes: 6 additions & 1 deletion meson.build
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
project(
'python-rtmidi',
'cpp',
version: '1.5.0rc1',
version: '1.5.0',
license: 'MIT',
default_options: [
'warning_level=2'
Expand Down Expand Up @@ -29,6 +29,11 @@ if host_machine.system() == 'windows' and cpp.get_id() == 'gcc'
endif
##

if host_machine.system() == 'darwin'
# Enable c++11 support
add_project_arguments('-std=c++11', language: ['cpp'])
endif

# Dependencies
jack2_dep = dependency('jack', version: '>=1.9.11', required: false)
jack1_dep = dependency('jack', version: ['>=0.125.0', '<1.0'], required: false)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ file = "LICENSE.md"
[tool.black]
line-length = 99
target-version = [
"py37",
"py38",
"py39",
"py310",
Expand Down Expand Up @@ -103,6 +102,7 @@ before-all = [
[tool.cibuildwheel.macos]
build = "cp3{8,9,10,11}-macosx*"
archs = ["universal2"]
environment = { MACOSX_DEPLOYMENT_TARGET = "10.14" }
before-all = [
"pipx install ninja",
]
Expand Down