From 4a9722c79c527a9851805c47e4e0a72991c23215 Mon Sep 17 00:00:00 2001 From: Bruno Enten Date: Sun, 21 May 2023 17:34:54 +0300 Subject: [PATCH 1/6] use rtmidi release 5.0.0 --- .gitmodules | 2 +- src/rtmidi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index b8bb8550..f9278128 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +1,4 @@ [submodule "src/rtmidi"] path = src/rtmidi url = https://github.com/SpotlightKid/rtmidi.git - branch = python-rtmidi + branch = python-rtmidi-5.0.0 diff --git a/src/rtmidi b/src/rtmidi index dd84db9a..687f68fd 160000 --- a/src/rtmidi +++ b/src/rtmidi @@ -1 +1 @@ -Subproject commit dd84db9a04c2d19fa744d2d4da705eaabaedcf07 +Subproject commit 687f68fda7bad10002325d897db3ce36a20155ca From d0ae1ca077a9b20cdf7aa60a3a0a46c0bb4cb21d Mon Sep 17 00:00:00 2001 From: Bruno Enten Date: Sun, 21 May 2023 17:47:18 +0300 Subject: [PATCH 2/6] split actions into tests, dev, prod --- .github/workflows/development.yml | 103 ++++++++++++++++++ .../workflows/{main.yml => production.yml} | 3 +- .github/workflows/tests.yml | 80 ++++++++++++++ 3 files changed, 184 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/development.yml rename .github/workflows/{main.yml => production.yml} (96%) create mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/development.yml b/.github/workflows/development.yml new file mode 100644 index 00000000..691dc203 --- /dev/null +++ b/.github/workflows/development.yml @@ -0,0 +1,103 @@ +name: Build sdist and wheel and publish to TestPyPI + +on: + push: + branches: + - develop + pull_request: + branches: + - develop + +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.11.4 + + - 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.11.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.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v') + 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 Test PyPI + uses: pypa/gh-action-pypi-publish@v1.6.4 + with: + skip_existing: true + user: __token__ + password: ${{ secrets.TEST_PYPI_API_TOKEN }} + repository_url: https://test.pypi.org/legacy/ + diff --git a/.github/workflows/main.yml b/.github/workflows/production.yml similarity index 96% rename from .github/workflows/main.yml rename to .github/workflows/production.yml index 2202b6f9..2d422b66 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/production.yml @@ -1,6 +1,5 @@ -name: Build sdist and wheel and publish to PyPI and TestPyPI +name: Build sdist and wheel and publish to PyPI -#on: [push, pull_request] on: push: branches: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 00000000..fb3ca6f4 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,80 @@ +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: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + steps: + + - uses: actions/checkout@v3 + with: + submodules: true + + - name: Build wheels + uses: pypa/cibuildwheel@v2.11.4 + + - 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.11.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 From cbd59bdf1655e41dca55942e9b6bffa9daedcbc9 Mon Sep 17 00:00:00 2001 From: Bruno Enten Date: Sun, 21 May 2023 18:09:30 +0300 Subject: [PATCH 3/6] upgrade cibuildwheel gh action --- .github/workflows/tests.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index fb3ca6f4..43c4ffd1 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -35,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: @@ -44,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: From 7f00fcef346e0a03dcdcf65e3d62e9e7ec79c289 Mon Sep 17 00:00:00 2001 From: Bruno Enten Date: Mon, 22 May 2023 19:12:39 +0300 Subject: [PATCH 4/6] hopefully fix osx wheel build or not someday it will work --- .github/workflows/tests.yml | 2 +- meson.build | 5 +++++ pyproject.toml | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 43c4ffd1..9ac9ba54 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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 }} diff --git a/meson.build b/meson.build index 3520e54f..ad0ef409 100644 --- a/meson.build +++ b/meson.build @@ -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..0bb06c12 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -103,6 +103,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", ] From b06e4572b5de85160a56ca65a01dab9155574353 Mon Sep 17 00:00:00 2001 From: Bruno Enten Date: Mon, 22 May 2023 19:15:47 +0300 Subject: [PATCH 5/6] update wheel build actions --- .github/workflows/development.yml | 11 ++++++----- .github/workflows/production.yml | 19 +++++-------------- 2 files changed, 11 insertions(+), 19 deletions(-) diff --git a/.github/workflows/development.yml b/.github/workflows/development.yml index 691dc203..cf69a8d0 100644 --- a/.github/workflows/development.yml +++ b/.github/workflows/development.yml @@ -35,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: @@ -44,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: @@ -66,7 +67,7 @@ jobs: with: platforms: all - - uses: pypa/cibuildwheel@v2.11.3 + - uses: pypa/cibuildwheel@v2.12.3 env: CIBW_ARCHS: ${{ matrix.arch }} @@ -83,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/ @@ -94,10 +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 diff --git a/.github/workflows/production.yml b/.github/workflows/production.yml index 2d422b66..b0c1dc7a 100644 --- a/.github/workflows/production.yml +++ b/.github/workflows/production.yml @@ -44,7 +44,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: @@ -66,7 +66,7 @@ jobs: with: platforms: all - - uses: pypa/cibuildwheel@v2.11.3 + - uses: pypa/cibuildwheel@v2.12.3 env: CIBW_ARCHS: ${{ matrix.arch }} @@ -83,9 +83,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.event_name == 'release' && github.event.action == 'published' steps: - - uses: actions/download-artifact@v3 with: # unpacks default artifact into dist/ @@ -93,17 +92,9 @@ jobs: name: artifact path: dist - - name: Publish distribution to Test PyPI - uses: pypa/gh-action-pypi-publish@v1.6.4 - with: - skip_existing: true - user: __token__ - password: ${{ secrets.TEST_PYPI_API_TOKEN }} - repository_url: https://test.pypi.org/legacy/ - - name: Publish distribution to PyPI - if: startsWith(github.ref, 'refs/tags/v') - uses: pypa/gh-action-pypi-publish@v1.6.4 + uses: pypa/gh-action-pypi-publish@v1.8.6 with: user: __token__ password: ${{ secrets.PYPI_API_TOKEN }} + verify-metadata: false From 01c99d1adb7943350756a6a970954905cc67416f Mon Sep 17 00:00:00 2001 From: Bruno Enten Date: Mon, 22 May 2023 19:39:58 +0300 Subject: [PATCH 6/6] prepare for release 1.5.0 --- .gitmodules | 2 +- meson.build | 2 +- pyproject.toml | 1 - src/rtmidi | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.gitmodules b/.gitmodules index f9278128..b8bb8550 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +1,4 @@ [submodule "src/rtmidi"] path = src/rtmidi url = https://github.com/SpotlightKid/rtmidi.git - branch = python-rtmidi-5.0.0 + branch = python-rtmidi diff --git a/meson.build b/meson.build index ad0ef409..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' diff --git a/pyproject.toml b/pyproject.toml index 0bb06c12..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", diff --git a/src/rtmidi b/src/rtmidi index 687f68fd..f00b2e6d 160000 --- a/src/rtmidi +++ b/src/rtmidi @@ -1 +1 @@ -Subproject commit 687f68fda7bad10002325d897db3ce36a20155ca +Subproject commit f00b2e6d221dba46fd01c8288bedc4d1b582c222