diff --git a/.github/workflows/main.yml b/.github/workflows/development.yml similarity index 78% rename from .github/workflows/main.yml rename to .github/workflows/development.yml index 2202b6f9..cf69a8d0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/development.yml @@ -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: @@ -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: @@ -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: @@ -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 }} @@ -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/ @@ -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/gh-action-pypi-publish@v1.6.4 - with: - user: __token__ - password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/.github/workflows/production.yml b/.github/workflows/production.yml new file mode 100644 index 00000000..b0c1dc7a --- /dev/null +++ b/.github/workflows/production.yml @@ -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/cibuildwheel@v2.12.3 + + - 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/cibuildwheel@v2.12.3 + 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/gh-action-pypi-publish@v1.8.6 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }} + verify-metadata: false diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 00000000..9ac9ba54 --- /dev/null +++ b/.github/workflows/tests.yml @@ -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/cibuildwheel@v2.12.3 + + - 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/cibuildwheel@v2.12.3 + 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 diff --git a/meson.build b/meson.build index 3520e54f..dbe5a7da 100644 --- a/meson.build +++ b/meson.build @@ -1,7 +1,7 @@ project( 'python-rtmidi', 'cpp', - version: '1.5.0rc1', + version: '1.5.0', license: 'MIT', default_options: [ 'warning_level=2' @@ -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) diff --git a/pyproject.toml b/pyproject.toml index 6a58bd04..de3b099a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -60,7 +60,6 @@ file = "LICENSE.md" [tool.black] line-length = 99 target-version = [ - "py37", "py38", "py39", "py310", @@ -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", ] diff --git a/src/rtmidi b/src/rtmidi index dd84db9a..f00b2e6d 160000 --- a/src/rtmidi +++ b/src/rtmidi @@ -1 +1 @@ -Subproject commit dd84db9a04c2d19fa744d2d4da705eaabaedcf07 +Subproject commit f00b2e6d221dba46fd01c8288bedc4d1b582c222