From 8e9d57c7160d700f16db5abd3adc3b55b9c1bcdf Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Fri, 6 Oct 2023 13:47:40 -0400 Subject: [PATCH 01/17] Add support for Python 3.12 and musllinux to main As part of the 0.13.2 release we added support for Python 3.12 and musllinux to rustworkx. However, these changes did not happen on main yet. This commit applies the necessary changes to the main branch for the 0.14.0 and future releases. Also to simplify the configuration of the cibuildwheel jobs this combines #753 into this PR so that the configuration is centralized in the pyproject.toml. --- .github/workflows/main.yml | 15 +--- .github/workflows/wheels.yml | 77 +++---------------- docs/source/install.rst | 8 ++ pyproject.toml | 22 +++++- .../platform-updates-e9b296144e633c95.yaml | 4 + setup.py | 1 + 6 files changed, 46 insertions(+), 81 deletions(-) create mode 100644 releasenotes/notes/platform-updates-e9b296144e633c95.yaml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f9d0b1c76..b03b7a8e7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -57,7 +57,7 @@ jobs: strategy: matrix: rust: [stable] - python-version: [3.8, 3.9, "3.10", "3.11"] + python-version: [3.8, 3.9, "3.10", "3.11", "3.12"] platform: [ { os: "macOS-latest", python-architecture: "x64", rust-target: "x86_64-apple-darwin" }, { os: "ubuntu-latest", python-architecture: "x64", rust-target: "x86_64-unknown-linux-gnu" }, @@ -76,19 +76,6 @@ jobs: with: python-version: ${{ matrix.python-version }} architecture: ${{ matrix.platform.python-architecture }} - if: runner.os != 'Windows' - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: 3.7 - architecture: ${{ matrix.platform.python-architecture }} - if: ${{ runner.os == 'Windows' && matrix.python-version == '3.7.16' }} - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - architecture: ${{ matrix.platform.python-architecture }} - if: ${{ runner.os == 'Windows' && matrix.python-version != '3.7.16' }} - name: Install Rust toolchain uses: dtolnay/rust-toolchain@master diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 4312f16de..93920665a 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -55,20 +55,10 @@ jobs: - uses: dtolnay/rust-toolchain@stable - name: Install cibuildwheel run: | - python -m pip install cibuildwheel==2.10.1 twine + python -m pip install cibuildwheel==2.16.2 twine - name: Build wheels run: | python -m cibuildwheel --output-dir wheelhouse - env: - CIBW_BEFORE_ALL_LINUX: "yum install -y wget && {package}/tools/install_rust.sh" - CIBW_ENVIRONMENT_LINUX: 'PATH="$PATH:$HOME/.cargo/bin"' - CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET=10.9 - CIBW_MANYLINUX_X86_64_IMAGE: quay.io/pypa/manylinux2014_x86_64:latest - CIBW_MANYLINUX_I686_IMAGE: quay.io/pypa/manylinux2014_i686:latest - CIBW_SKIP: cp36-* cp37-* pp* *win32 *musl* - CIBW_BEFORE_BUILD: pip install -U setuptools-rust - CIBW_TEST_REQUIRES: networkx testtools fixtures - CIBW_TEST_COMMAND: python -m unittest discover {project}/tests/rustworkx_tests - uses: actions/upload-artifact@v3 with: path: ./wheelhouse/*.whl @@ -97,20 +87,11 @@ jobs: platforms: all - name: Install cibuildwheel run: | - python -m pip install cibuildwheel==2.10.1 twine + python -m pip install cibuildwheel==2.16.2 twine - name: Build wheels run: | python -m cibuildwheel --output-dir wheelhouse env: - CIBW_BEFORE_ALL_LINUX: "yum install -y wget && {package}/tools/install_rust.sh" - CIBW_ENVIRONMENT_LINUX: 'PATH="$PATH:$HOME/.cargo/bin" CARGO_NET_GIT_FETCH_WITH_CLI="true"' - CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET=10.9 - CIBW_MANYLINUX_X86_64_IMAGE: quay.io/pypa/manylinux2014_x86_64:latest - CIBW_MANYLINUX_I686_IMAGE: quay.io/pypa/manylinux2014_i686:latest - CIBW_SKIP: cp36-* cp37-* pp* *win32 *musl* - CIBW_BEFORE_BUILD: pip install -U setuptools-rust - CIBW_TEST_REQUIRES: networkx scipy testtools fixtures - CIBW_TEST_COMMAND: python -m unittest discover {project}/tests/rustworkx_tests CIBW_ARCHS_LINUX: aarch64 - uses: actions/upload-artifact@v3 with: @@ -140,20 +121,12 @@ jobs: platforms: all - name: Install cibuildwheel run: | - python -m pip install cibuildwheel==2.10.1 twine + python -m pip install cibuildwheel==2.16.2 twine - name: Build wheels run: | python -m cibuildwheel --output-dir wheelhouse env: - CIBW_BEFORE_ALL_LINUX: "yum install -y wget && {package}/tools/install_rust.sh" - CIBW_ENVIRONMENT_LINUX: 'PATH="$PATH:$HOME/.cargo/bin" CARGO_NET_GIT_FETCH_WITH_CLI="true"' - CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET=10.9 - CIBW_MANYLINUX_X86_64_IMAGE: quay.io/pypa/manylinux2014_x86_64:latest - CIBW_MANYLINUX_I686_IMAGE: quay.io/pypa/manylinux2014_i686:latest - CIBW_SKIP: cp36-* cp37-* cp39-* cp310-* cp311-* pp* *win32 *musl* - CIBW_BEFORE_BUILD: pip install -U setuptools-rust - CIBW_TEST_REQUIRES: networkx testtools fixtures - CIBW_TEST_COMMAND: python -m unittest discover {project}/tests/rustworkx_tests + CIBW_SKIP: cp36-* cp37-* cp39-* cp310-* cp311-* pp* *win32 CIBW_ARCHS_LINUX: ppc64le - uses: actions/upload-artifact@v3 with: @@ -183,20 +156,12 @@ jobs: platforms: all - name: Install cibuildwheel run: | - python -m pip install cibuildwheel==2.10.1 twine + python -m pip install cibuildwheel==2.16.2 twine - name: Build wheels run: | python -m cibuildwheel --output-dir wheelhouse env: - CIBW_BEFORE_ALL_LINUX: "yum install -y wget && {package}/tools/install_rust.sh" - CIBW_ENVIRONMENT_LINUX: 'PATH="$PATH:$HOME/.cargo/bin" CARGO_NET_GIT_FETCH_WITH_CLI="true"' - CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET=10.9 - CIBW_MANYLINUX_X86_64_IMAGE: quay.io/pypa/manylinux2014_x86_64:latest - CIBW_MANYLINUX_I686_IMAGE: quay.io/pypa/manylinux2014_i686:latest - CIBW_SKIP: cp36-* cp37-* cp38-* pp* *win32 *musl* - CIBW_BEFORE_BUILD: pip install -U setuptools-rust - CIBW_TEST_REQUIRES: networkx testtools fixtures - CIBW_TEST_COMMAND: python -m unittest discover {project}/tests/rustworkx_tests + CIBW_SKIP: cp36-* cp37-* cp38-* cp312-* pp* *win32 *musl* CIBW_ARCHS_LINUX: ppc64le - uses: actions/upload-artifact@v3 with: @@ -226,20 +191,12 @@ jobs: platforms: all - name: Install cibuildwheel run: | - python -m pip install cibuildwheel==2.10.1 twine + python -m pip install cibuildwheel==2.16.2 twine - name: Build wheels run: | python -m cibuildwheel --output-dir wheelhouse env: - CIBW_BEFORE_ALL_LINUX: "yum install -y wget && {package}/tools/install_rust.sh" - CIBW_ENVIRONMENT_LINUX: 'PATH="$PATH:$HOME/.cargo/bin" CARGO_NET_GIT_FETCH_WITH_CLI="true"' - CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET=10.9 - CIBW_MANYLINUX_X86_64_IMAGE: quay.io/pypa/manylinux2014_x86_64:latest - CIBW_MANYLINUX_I686_IMAGE: quay.io/pypa/manylinux2014_i686:latest CIBW_SKIP: cp36-* cp37-* cp39-* cp310-* cp311-* pp* *win32 *musl* - CIBW_BEFORE_BUILD: pip install -U setuptools-rust - CIBW_TEST_REQUIRES: networkx testtools fixtures - CIBW_TEST_COMMAND: python -m unittest discover {project}/tests/rustworkx_tests CIBW_ARCHS_LINUX: s390x CIBW_TEST_SKIP: "*-*linux_s390x" - uses: actions/upload-artifact@v3 @@ -270,20 +227,12 @@ jobs: platforms: all - name: Install cibuildwheel run: | - python -m pip install cibuildwheel==2.10.1 twine + python -m pip install cibuildwheel==2.16.2 twine - name: Build wheels run: | python -m cibuildwheel --output-dir wheelhouse env: - CIBW_BEFORE_ALL_LINUX: "yum install -y wget && {package}/tools/install_rust.sh" - CIBW_ENVIRONMENT_LINUX: 'PATH="$PATH:$HOME/.cargo/bin" CARGO_NET_GIT_FETCH_WITH_CLI="true"' - CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET=10.9 - CIBW_MANYLINUX_X86_64_IMAGE: quay.io/pypa/manylinux2014_x86_64:latest - CIBW_MANYLINUX_I686_IMAGE: quay.io/pypa/manylinux2014_i686:latest - CIBW_SKIP: cp36-* cp37-* cp38-* pp* *win32 *musl* - CIBW_BEFORE_BUILD: pip install -U setuptools-rust - CIBW_TEST_REQUIRES: networkx testtools fixtures - CIBW_TEST_COMMAND: python -m unittest discover {project}/tests/rustworkx_tests + CIBW_SKIP: cp36-* cp37-* cp38-* cp312-* pp* *win32 *musl* CIBW_ARCHS_LINUX: s390x CIBW_TEST_SKIP: "*-*linux_s390x" - uses: actions/upload-artifact@v3 @@ -300,7 +249,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: Build wheels - uses: joerick/cibuildwheel@v2.10.1 + uses: joerick/cibuildwheel@v2.16.2 env: CIBW_BEFORE_ALL: rustup target add aarch64-apple-darwin CIBW_ARCHS_MACOS: arm64 universal2 @@ -338,16 +287,12 @@ jobs: run: rustup default stable-i686-pc-windows-msvc - name: Install cibuildwheel run: | - python -m pip install cibuildwheel==2.10.1 twine + python -m pip install cibuildwheel==2.16.2 twine - name: Build wheels run: | python -m cibuildwheel --output-dir wheelhouse env: - CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET=10.9 CIBW_SKIP: cp36-* cp37-* pp* *amd64 *musl* - CIBW_BEFORE_BUILD: pip install -U setuptools-rust - CIBW_TEST_REQUIRES: networkx testtools fixtures - CIBW_TEST_COMMAND: python -m unittest discover {project}/tests/rustworkx_tests - uses: actions/upload-artifact@v3 with: path: ./wheelhouse/*.whl diff --git a/docs/source/install.rst b/docs/source/install.rst index 0b44823f7..e7b36926e 100644 --- a/docs/source/install.rst +++ b/docs/source/install.rst @@ -89,6 +89,14 @@ source. - s390x - :ref:`tier-4` - Distributions compatible with the `manylinux 2014`_ packaging specification + * - Linux (musl) + - x86_64 + - :ref:`tier-3` + - + * - Linux (musl) + - aarch64 + - :ref:`tier-3` + - * - macOS (10.9 or newer) - x86_64 - :ref:`tier-1` diff --git a/pyproject.toml b/pyproject.toml index c348b0338..7c5d3241a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,4 +4,24 @@ build-backend = "setuptools.build_meta" [tool.black] line-length = 100 -target-version = ['py37', 'py38', 'py39', 'py310'] +target-version = ['py38', 'py39', 'py310', 'py311'] + +[tool.cibuildwheel] +manylinux-x86_64-image = "manylinux2014" +manylinux-i686-image = "manylinux2014" +skip = "pp* cp36-* cp37-* *win32" +test-requires = "networkx testtools fixtures" +test-command = "python -m unittest discover {project}/tests/rustworkx_tests" +before-build = "pip install -U setuptools-rust" + +[tool.cibuildwheel.linux] +before-all = "yum install -y wget && {package}/tools/install_rust.sh" +environment = 'PATH="$PATH:$HOME/.cargo/bin" CARGO_NET_GIT_FETCH_WITH_CLI="true"' + +[[tool.cibuildwheel.overrides]] +select = "*-musllinux*" +before-all = "apk add apk add --no-cache curl gcc && curl https://sh.rustup.rs -sSf | sh -s -- -y && source $HOME/.cargo/env && rustup install stable && rustup default stable" +test-skip = "cp37-* cp38-*" + +[tool.cibuildwheel.macos] +environment = "MACOSX_DEPLOYMENT_TARGET=10.9" diff --git a/releasenotes/notes/platform-updates-e9b296144e633c95.yaml b/releasenotes/notes/platform-updates-e9b296144e633c95.yaml new file mode 100644 index 000000000..78166052b --- /dev/null +++ b/releasenotes/notes/platform-updates-e9b296144e633c95.yaml @@ -0,0 +1,4 @@ +--- +features: + - | + Added support for musl Linux platforms on x86_64 and aarch64 at :ref:`tier 3`. diff --git a/setup.py b/setup.py index 815f17538..e734d8be1 100644 --- a/setup.py +++ b/setup.py @@ -68,6 +68,7 @@ def readme(): "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Operating System :: MacOS :: MacOS X", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX :: Linux", From 57dd451087e285044d53ccd28194c78215775b57 Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Fri, 6 Oct 2023 15:09:53 -0400 Subject: [PATCH 02/17] DNM: Test wheel build configuration --- .github/workflows/wheels.yml | 84 +----------------------------------- 1 file changed, 2 insertions(+), 82 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 93920665a..4e406314b 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -1,44 +1,9 @@ --- name: Wheel Builds on: - push: - tags: - - '*' + pull_request: + branches: [ main, 'stable/*' ] jobs: - rustworkx-core: - name: Publish rustworkx-core - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: dtolnay/rust-toolchain@stable - - name: Run cargo publish - run: | - cd rustworkx-core - cargo publish - env: - CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} - sdist: - name: Build sdist - runs-on: ubuntu-latest - needs: ["build_wheels", "build-win32-wheels"] - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - name: Install Python - with: - python-version: '3.8' - - name: Install deps - run: pip install -U twine setuptools-rust - - name: Build sdist - run: python setup.py sdist - - uses: actions/upload-artifact@v3 - with: - path: ./dist/* - - name: Upload to PyPI - run: twine upload ./dist/* - env: - TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} - TWINE_USERNAME: retworkx-ci build_wheels: name: Build wheels on ${{ matrix.os }} runs-on: ${{ matrix.os }} @@ -62,11 +27,6 @@ jobs: - uses: actions/upload-artifact@v3 with: path: ./wheelhouse/*.whl - - name: Upload to PyPI - run: twine upload ./wheelhouse/*.whl - env: - TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} - TWINE_USERNAME: retworkx-ci build_wheels_aarch64: name: Build wheels on ${{ matrix.os }} runs-on: ${{ matrix.os }} @@ -96,11 +56,6 @@ jobs: - uses: actions/upload-artifact@v3 with: path: ./wheelhouse/*.whl - - name: Upload to PyPI - run: twine upload ./wheelhouse/*.whl - env: - TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} - TWINE_USERNAME: retworkx-ci build_wheels_ppc64le: name: Build wheels on ${{ matrix.os }} runs-on: ${{ matrix.os }} @@ -131,11 +86,6 @@ jobs: - uses: actions/upload-artifact@v3 with: path: ./wheelhouse/*.whl - - name: Upload to PyPI - run: twine upload ./wheelhouse/*.whl - env: - TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} - TWINE_USERNAME: retworkx-ci build_wheels_ppc64le_part2: name: Build wheels on ${{ matrix.os }} runs-on: ${{ matrix.os }} @@ -166,11 +116,6 @@ jobs: - uses: actions/upload-artifact@v3 with: path: ./wheelhouse/*.whl - - name: Upload to PyPI - run: twine upload ./wheelhouse/*.whl - env: - TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} - TWINE_USERNAME: retworkx-ci build_wheels_s390x: name: Build wheels on ${{ matrix.os }} runs-on: ${{ matrix.os }} @@ -202,11 +147,6 @@ jobs: - uses: actions/upload-artifact@v3 with: path: ./wheelhouse/*.whl - - name: Upload to PyPI - run: twine upload ./wheelhouse/*.whl - env: - TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} - TWINE_USERNAME: retworkx-ci build_wheels_s390x_part2: name: Build wheels on ${{ matrix.os }} runs-on: ${{ matrix.os }} @@ -238,11 +178,6 @@ jobs: - uses: actions/upload-artifact@v3 with: path: ./wheelhouse/*.whl - - name: Upload to PyPI - run: twine upload ./wheelhouse/*.whl - env: - TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} - TWINE_USERNAME: retworkx-ci build-mac-arm-wheels: name: Build wheels on macos for arm and universal2 runs-on: macos-latest @@ -265,11 +200,6 @@ jobs: - name: Install twine run: | python -m pip install twine - - name: Upload to PyPI - run: twine upload ./wheelhouse/*.whl - env: - TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} - TWINE_USERNAME: retworkx-ci build-win32-wheels: name: Build wheels on win32 runs-on: windows-latest @@ -296,11 +226,6 @@ jobs: - uses: actions/upload-artifact@v3 with: path: ./wheelhouse/*.whl - - name: Upload to PyPI - run: twine upload ./wheelhouse/*.whl - env: - TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} - TWINE_USERNAME: retworkx-ci retworkx-compat-build: name: Build retworkx runs-on: ubuntu-latest @@ -320,8 +245,3 @@ jobs: - uses: actions/upload-artifact@v3 with: path: ./dist/* - - name: Upload to PyPI - run: twine upload ./dist/* - env: - TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} - TWINE_USERNAME: retworkx-ci From 95bae2e12a09586fc9850a0ad7175920ecfae490 Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Fri, 6 Oct 2023 15:39:58 -0400 Subject: [PATCH 03/17] Remove testtools usage from test suite --- pyproject.toml | 2 +- .../graph/test_max_weight_matching.py | 12 ++---------- .../graph/test_max_weight_matching.py | 12 ++---------- 3 files changed, 5 insertions(+), 21 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 7c5d3241a..97c270d0c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,7 +10,7 @@ target-version = ['py38', 'py39', 'py310', 'py311'] manylinux-x86_64-image = "manylinux2014" manylinux-i686-image = "manylinux2014" skip = "pp* cp36-* cp37-* *win32" -test-requires = "networkx testtools fixtures" +test-requires = "networkx" test-command = "python -m unittest discover {project}/tests/rustworkx_tests" before-build = "pip install -U setuptools-rust" diff --git a/tests/retworkx_backwards_compat/graph/test_max_weight_matching.py b/tests/retworkx_backwards_compat/graph/test_max_weight_matching.py index 79e4d7041..091626da3 100644 --- a/tests/retworkx_backwards_compat/graph/test_max_weight_matching.py +++ b/tests/retworkx_backwards_compat/graph/test_max_weight_matching.py @@ -14,10 +14,9 @@ # https://github.com/networkx/networkx/blob/3351206a3ce5b3a39bb2fc451e93ef545b96c95b/networkx/algorithms/tests/test_matching.py import random +import unittest -import fixtures import networkx -import testtools import retworkx @@ -26,14 +25,7 @@ def match_dict_to_set(match): return {(u, v) for (u, v) in set(map(frozenset, match.items()))} -class TestMaxWeightMatching(testtools.TestCase): - def setUp(self): - super().setUp() - stdout = self.useFixture(fixtures.StringStream("stdout")).stream - self.useFixture(fixtures.MonkeyPatch("sys.stdout", stdout)) - stderr = self.useFixture(fixtures.StringStream("stderr")).stream - self.useFixture(fixtures.MonkeyPatch("sys.stderr", stderr)) - +class TestMaxWeightMatching(unittest.TestCase): def compare_match_sets(self, rx_match, expected_match): for (u, v) in rx_match: if (u, v) not in expected_match and (v, u) not in expected_match: diff --git a/tests/rustworkx_tests/graph/test_max_weight_matching.py b/tests/rustworkx_tests/graph/test_max_weight_matching.py index 89bc468f0..29e5a3382 100644 --- a/tests/rustworkx_tests/graph/test_max_weight_matching.py +++ b/tests/rustworkx_tests/graph/test_max_weight_matching.py @@ -14,10 +14,9 @@ # https://github.com/networkx/networkx/blob/3351206a3ce5b3a39bb2fc451e93ef545b96c95b/networkx/algorithms/tests/test_matching.py import random +import unittest -import fixtures import networkx -import testtools import rustworkx @@ -26,14 +25,7 @@ def match_dict_to_set(match): return {(u, v) for (u, v) in set(map(frozenset, match.items()))} -class TestMaxWeightMatching(testtools.TestCase): - def setUp(self): - super().setUp() - stdout = self.useFixture(fixtures.StringStream("stdout")).stream - self.useFixture(fixtures.MonkeyPatch("sys.stdout", stdout)) - stderr = self.useFixture(fixtures.StringStream("stderr")).stream - self.useFixture(fixtures.MonkeyPatch("sys.stderr", stderr)) - +class TestMaxWeightMatching(unittest.TestCase): def compare_match_sets(self, rx_match, expected_match): for (u, v) in rx_match: if (u, v) not in expected_match and (v, u) not in expected_match: From 7621ca1bec914f7c5d4eac6a5f33d23c955cd775 Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Fri, 6 Oct 2023 17:03:13 -0400 Subject: [PATCH 04/17] Don't require blas on numpy install --- pyproject.toml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 97c270d0c..6c1ece59c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,5 +23,13 @@ select = "*-musllinux*" before-all = "apk add apk add --no-cache curl gcc && curl https://sh.rustup.rs -sSf | sh -s -- -y && source $HOME/.cargo/env && rustup install stable && rustup default stable" test-skip = "cp37-* cp38-*" +[[tool.cibuildwheel.overrides]] +select = "*i686*" +before_test = 'python -m pip install numpy --config-settings=setup-args="-Dallow-noblas=true"' + +[[tool.cibuildwheel.overrides]] +select = "*ppc64le*" +before_test = 'python -m pip install numpy --config-settings=setup-args="-Dallow-noblas=true"' + [tool.cibuildwheel.macos] environment = "MACOSX_DEPLOYMENT_TARGET=10.9" From 11cb8afc72d72e7dbd716542f2033e801bc4d689 Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Fri, 6 Oct 2023 17:04:14 -0400 Subject: [PATCH 05/17] Fix docs typo --- releasenotes/notes/platform-updates-e9b296144e633c95.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/releasenotes/notes/platform-updates-e9b296144e633c95.yaml b/releasenotes/notes/platform-updates-e9b296144e633c95.yaml index 78166052b..526aef3fb 100644 --- a/releasenotes/notes/platform-updates-e9b296144e633c95.yaml +++ b/releasenotes/notes/platform-updates-e9b296144e633c95.yaml @@ -1,4 +1,4 @@ --- features: - | - Added support for musl Linux platforms on x86_64 and aarch64 at :ref:`tier 3`. + Added support for musl Linux platforms on x86_64 and aarch64 at :ref:`tier-3`. From d68bcf613c794811a1f02cac044fc93ffa6c1629 Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Sat, 7 Oct 2023 07:43:09 -0400 Subject: [PATCH 06/17] Drop musl on aarch64 --- .github/workflows/wheels.yml | 1 + docs/source/install.rst | 4 ---- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 4e406314b..2fc45ca0a 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -53,6 +53,7 @@ jobs: python -m cibuildwheel --output-dir wheelhouse env: CIBW_ARCHS_LINUX: aarch64 + CIBW_SKIP: cp36-* cp37-* pp* *musl* - uses: actions/upload-artifact@v3 with: path: ./wheelhouse/*.whl diff --git a/docs/source/install.rst b/docs/source/install.rst index e7b36926e..87c4ed24b 100644 --- a/docs/source/install.rst +++ b/docs/source/install.rst @@ -93,10 +93,6 @@ source. - x86_64 - :ref:`tier-3` - - * - Linux (musl) - - aarch64 - - :ref:`tier-3` - - * - macOS (10.9 or newer) - x86_64 - :ref:`tier-1` From a57590bf7c5090870c1787c7ad745edfa806caa5 Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Sat, 7 Oct 2023 07:48:50 -0400 Subject: [PATCH 07/17] Try installing openblas to fix numpy build --- pyproject.toml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 6c1ece59c..4c6c74dc5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,12 +24,13 @@ before-all = "apk add apk add --no-cache curl gcc && curl https://sh.rustup.rs - test-skip = "cp37-* cp38-*" [[tool.cibuildwheel.overrides]] -select = "*i686*" -before_test = 'python -m pip install numpy --config-settings=setup-args="-Dallow-noblas=true"' +select = "*i686" +skip = "pp* cp36-* cp37-* *win32" "*-musllinux*" +before_test = 'yum install openblas-devel' [[tool.cibuildwheel.overrides]] -select = "*ppc64le*" -before_test = 'python -m pip install numpy --config-settings=setup-args="-Dallow-noblas=true"' +select = "*ppc64le" +before_test = 'yum install openblas-devel' [tool.cibuildwheel.macos] environment = "MACOSX_DEPLOYMENT_TARGET=10.9" From d352a645a3e98125db3b0cd9a0cf9eb521eb263b Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Sat, 7 Oct 2023 07:59:55 -0400 Subject: [PATCH 08/17] Fix toml syntax --- pyproject.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 4c6c74dc5..3828af493 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,12 +25,12 @@ test-skip = "cp37-* cp38-*" [[tool.cibuildwheel.overrides]] select = "*i686" -skip = "pp* cp36-* cp37-* *win32" "*-musllinux*" -before_test = 'yum install openblas-devel' +skip = "pp* cp36-* cp37-* *win32 *-musllinux*" +before_test = "yum install openblas-devel" [[tool.cibuildwheel.overrides]] select = "*ppc64le" -before_test = 'yum install openblas-devel' +before_test = "yum install openblas-devel" [tool.cibuildwheel.macos] environment = "MACOSX_DEPLOYMENT_TARGET=10.9" From 6d455a50164d91070af55d511aa8cedf2eba2475 Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Mon, 9 Oct 2023 09:15:34 -0400 Subject: [PATCH 09/17] Adjust override to use allowed fields only --- pyproject.toml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 3828af493..ef03ca033 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,10 +9,11 @@ target-version = ['py38', 'py39', 'py310', 'py311'] [tool.cibuildwheel] manylinux-x86_64-image = "manylinux2014" manylinux-i686-image = "manylinux2014" -skip = "pp* cp36-* cp37-* *win32" +skip = "pp* cp36-* cp37-* *win32" "*musllinux*i686" test-requires = "networkx" test-command = "python -m unittest discover {project}/tests/rustworkx_tests" before-build = "pip install -U setuptools-rust" +test-skip = "cp38-*musllinux*" [tool.cibuildwheel.linux] before-all = "yum install -y wget && {package}/tools/install_rust.sh" @@ -21,16 +22,14 @@ environment = 'PATH="$PATH:$HOME/.cargo/bin" CARGO_NET_GIT_FETCH_WITH_CLI="true" [[tool.cibuildwheel.overrides]] select = "*-musllinux*" before-all = "apk add apk add --no-cache curl gcc && curl https://sh.rustup.rs -sSf | sh -s -- -y && source $HOME/.cargo/env && rustup install stable && rustup default stable" -test-skip = "cp37-* cp38-*" [[tool.cibuildwheel.overrides]] select = "*i686" -skip = "pp* cp36-* cp37-* *win32 *-musllinux*" -before_test = "yum install openblas-devel" +before-all = "yum install openblas-devel" [[tool.cibuildwheel.overrides]] select = "*ppc64le" -before_test = "yum install openblas-devel" +before-all = "yum install openblas-devel" [tool.cibuildwheel.macos] environment = "MACOSX_DEPLOYMENT_TARGET=10.9" From a37c740bf871a21c330c22cab72d6d2524f6876c Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Mon, 9 Oct 2023 09:48:58 -0400 Subject: [PATCH 10/17] Fix toml syntax again --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index ef03ca033..368330ded 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,7 +9,7 @@ target-version = ['py38', 'py39', 'py310', 'py311'] [tool.cibuildwheel] manylinux-x86_64-image = "manylinux2014" manylinux-i686-image = "manylinux2014" -skip = "pp* cp36-* cp37-* *win32" "*musllinux*i686" +skip = "pp* cp36-* cp37-* *win32 *musllinux*i686" test-requires = "networkx" test-command = "python -m unittest discover {project}/tests/rustworkx_tests" before-build = "pip install -U setuptools-rust" From 714c1f2019856421d09b2fa29e950f76210cd123 Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Mon, 9 Oct 2023 10:04:19 -0400 Subject: [PATCH 11/17] Switch back to pip command --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 368330ded..ffd018385 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,11 +25,11 @@ before-all = "apk add apk add --no-cache curl gcc && curl https://sh.rustup.rs - [[tool.cibuildwheel.overrides]] select = "*i686" -before-all = "yum install openblas-devel" +before-test = 'python -m pip install numpy --config-settings=setup-args="-Dallow-noblas=true"' [[tool.cibuildwheel.overrides]] select = "*ppc64le" -before-all = "yum install openblas-devel" +before-test = 'python -m pip install numpy --config-settings=setup-args="-Dallow-noblas=true"' [tool.cibuildwheel.macos] environment = "MACOSX_DEPLOYMENT_TARGET=10.9" From a27e79fc1ef3946d4388e5d969f58df291f02558 Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Mon, 9 Oct 2023 11:01:50 -0400 Subject: [PATCH 12/17] Downgrade pp64le to tier 4 and skip tests --- .github/workflows/wheels.yml | 2 -- pyproject.toml | 6 +----- .../notes/platform-updates-e9b296144e633c95.yaml | 12 ++++++++++++ 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 2fc45ca0a..3ed52b56c 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -144,7 +144,6 @@ jobs: env: CIBW_SKIP: cp36-* cp37-* cp39-* cp310-* cp311-* pp* *win32 *musl* CIBW_ARCHS_LINUX: s390x - CIBW_TEST_SKIP: "*-*linux_s390x" - uses: actions/upload-artifact@v3 with: path: ./wheelhouse/*.whl @@ -175,7 +174,6 @@ jobs: env: CIBW_SKIP: cp36-* cp37-* cp38-* cp312-* pp* *win32 *musl* CIBW_ARCHS_LINUX: s390x - CIBW_TEST_SKIP: "*-*linux_s390x" - uses: actions/upload-artifact@v3 with: path: ./wheelhouse/*.whl diff --git a/pyproject.toml b/pyproject.toml index ffd018385..2e34bc96d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,7 +13,7 @@ skip = "pp* cp36-* cp37-* *win32 *musllinux*i686" test-requires = "networkx" test-command = "python -m unittest discover {project}/tests/rustworkx_tests" before-build = "pip install -U setuptools-rust" -test-skip = "cp38-*musllinux*" +test-skip = "cp38-*musllinux* *-*linux_s390x -*linux_ppc64le" [tool.cibuildwheel.linux] before-all = "yum install -y wget && {package}/tools/install_rust.sh" @@ -27,9 +27,5 @@ before-all = "apk add apk add --no-cache curl gcc && curl https://sh.rustup.rs - select = "*i686" before-test = 'python -m pip install numpy --config-settings=setup-args="-Dallow-noblas=true"' -[[tool.cibuildwheel.overrides]] -select = "*ppc64le" -before-test = 'python -m pip install numpy --config-settings=setup-args="-Dallow-noblas=true"' - [tool.cibuildwheel.macos] environment = "MACOSX_DEPLOYMENT_TARGET=10.9" diff --git a/releasenotes/notes/platform-updates-e9b296144e633c95.yaml b/releasenotes/notes/platform-updates-e9b296144e633c95.yaml index 526aef3fb..a4e105382 100644 --- a/releasenotes/notes/platform-updates-e9b296144e633c95.yaml +++ b/releasenotes/notes/platform-updates-e9b296144e633c95.yaml @@ -2,3 +2,15 @@ features: - | Added support for musl Linux platforms on x86_64 and aarch64 at :ref:`tier-3`. +upgrade: + - | + Support for the Linux ppc64le pllatform has changed from tier 3 to tier 4 + (as documented in :ref:`platform-suppport`). This is a result of no longer + being able to run tests during the pre-compiled wheel publishing jobs due + to constraints in the available CI infrastructure. There hopefully + shouldn't be any meaningful impact resulting from this change, but as there + are no longer tests being run to validate the binaries prior to publishing + them there are no longer guarantees that the wheels for ppc64le are fully + functional (although the likelihood they are is still high as it works on + other platforms). If any issues are encountered with ppc64le Linux please + open an issue. From d506725c895b78266f25753fc957e515170d5ad4 Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Mon, 9 Oct 2023 11:02:52 -0400 Subject: [PATCH 13/17] Fix apk command copy paste error --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 2e34bc96d..e8186fc29 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,7 +21,7 @@ environment = 'PATH="$PATH:$HOME/.cargo/bin" CARGO_NET_GIT_FETCH_WITH_CLI="true" [[tool.cibuildwheel.overrides]] select = "*-musllinux*" -before-all = "apk add apk add --no-cache curl gcc && curl https://sh.rustup.rs -sSf | sh -s -- -y && source $HOME/.cargo/env && rustup install stable && rustup default stable" +before-all = "apk add --no-cache curl gcc && curl https://sh.rustup.rs -sSf | sh -s -- -y && source $HOME/.cargo/env && rustup install stable && rustup default stable" [[tool.cibuildwheel.overrides]] select = "*i686" From 07badf15ce2f2b6c52fba23656a59e697d8da57f Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Mon, 9 Oct 2023 12:19:56 -0400 Subject: [PATCH 14/17] Raise minimum supported macOS version to 10.12 In Rust 1.74 the Rust programming language is raising their minimum support macOS version to 10.12, so rustworkx is raising it's supported version of macOS to match this. --- docs/source/install.rst | 2 +- pyproject.toml | 2 +- .../notes/platform-updates-e9b296144e633c95.yaml | 10 ++++++++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/docs/source/install.rst b/docs/source/install.rst index 87c4ed24b..61c854f94 100644 --- a/docs/source/install.rst +++ b/docs/source/install.rst @@ -93,7 +93,7 @@ source. - x86_64 - :ref:`tier-3` - - * - macOS (10.9 or newer) + * - macOS (10.12 or newer) - x86_64 - :ref:`tier-1` - diff --git a/pyproject.toml b/pyproject.toml index e8186fc29..be55c74c9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,4 +28,4 @@ select = "*i686" before-test = 'python -m pip install numpy --config-settings=setup-args="-Dallow-noblas=true"' [tool.cibuildwheel.macos] -environment = "MACOSX_DEPLOYMENT_TARGET=10.9" +environment = "MACOSX_DEPLOYMENT_TARGET=10.12" diff --git a/releasenotes/notes/platform-updates-e9b296144e633c95.yaml b/releasenotes/notes/platform-updates-e9b296144e633c95.yaml index a4e105382..876fabbc8 100644 --- a/releasenotes/notes/platform-updates-e9b296144e633c95.yaml +++ b/releasenotes/notes/platform-updates-e9b296144e633c95.yaml @@ -14,3 +14,13 @@ upgrade: functional (although the likelihood they are is still high as it works on other platforms). If any issues are encountered with ppc64le Linux please open an issue. + - | + For macOS the minimum version of macOS is now 10.12. Previously, the + precompiled binary wheel packages for macOS x86_64 were published with + support for >=10.9. However, because of changes in the + `support policy `__ + for the Rust programming language the minimum version needed to raised + to macOS 10.12. If you're using Qiskit on macOS 10.9 you can probably + build Qiskit from source while the rustworkx MSRV (minimum supported Rust + version) is < 1.74, but the precompiled binaries published to PyPI will + only be compatible with macOS >= 10.12. From 9d4641014e024fab880a3bf775fc8effdb228d5e Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Mon, 9 Oct 2023 12:22:13 -0400 Subject: [PATCH 15/17] Tweak test skip regex --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index be55c74c9..4aee0fecb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,7 +13,7 @@ skip = "pp* cp36-* cp37-* *win32 *musllinux*i686" test-requires = "networkx" test-command = "python -m unittest discover {project}/tests/rustworkx_tests" before-build = "pip install -U setuptools-rust" -test-skip = "cp38-*musllinux* *-*linux_s390x -*linux_ppc64le" +test-skip = "cp38-*musllinux* *linux_s390x *ppc64le" [tool.cibuildwheel.linux] before-all = "yum install -y wget && {package}/tools/install_rust.sh" From 0dc1a0158f39a67bb68d285e25910159c0440c38 Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Mon, 9 Oct 2023 18:54:49 -0400 Subject: [PATCH 16/17] Split arm into 2 jobs --- .github/workflows/wheels.yml | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 3ed52b56c..a7ef49d43 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -53,7 +53,37 @@ jobs: python -m cibuildwheel --output-dir wheelhouse env: CIBW_ARCHS_LINUX: aarch64 - CIBW_SKIP: cp36-* cp37-* pp* *musl* + CIBW_SKIP: cp36-* cp37-* cp311-* cp312-* pp* *musl* + - uses: actions/upload-artifact@v3 + with: + path: ./wheelhouse/*.whl + build_wheels_aarch64_part_2: + name: Build wheels on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest] + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + name: Install Python + with: + python-version: '3.8' + - uses: dtolnay/rust-toolchain@stable + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + with: + platforms: all + - name: Install cibuildwheel + run: | + python -m pip install cibuildwheel==2.16.2 twine + - name: Build wheels + run: | + python -m cibuildwheel --output-dir wheelhouse + env: + CIBW_ARCHS_LINUX: aarch64 + CIBW_SKIP: cp36-* cp37-* cp38-* cp39-* cp310-* pp* *musl* - uses: actions/upload-artifact@v3 with: path: ./wheelhouse/*.whl From f1546ee15d89ba8474ee75cf3afaa1ab701d48bc Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Tue, 10 Oct 2023 08:04:50 -0400 Subject: [PATCH 17/17] Revert "DNM: Test wheel build configuration" This reverts commit 57dd451087e285044d53ccd28194c78215775b57. --- .github/workflows/wheels.yml | 84 +++++++++++++++++++++++++++++++++++- 1 file changed, 82 insertions(+), 2 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index a7ef49d43..c942df586 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -1,9 +1,44 @@ --- name: Wheel Builds on: - pull_request: - branches: [ main, 'stable/*' ] + push: + tags: + - '*' jobs: + rustworkx-core: + name: Publish rustworkx-core + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: dtolnay/rust-toolchain@stable + - name: Run cargo publish + run: | + cd rustworkx-core + cargo publish + env: + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} + sdist: + name: Build sdist + runs-on: ubuntu-latest + needs: ["build_wheels", "build-win32-wheels"] + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + name: Install Python + with: + python-version: '3.8' + - name: Install deps + run: pip install -U twine setuptools-rust + - name: Build sdist + run: python setup.py sdist + - uses: actions/upload-artifact@v3 + with: + path: ./dist/* + - name: Upload to PyPI + run: twine upload ./dist/* + env: + TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} + TWINE_USERNAME: retworkx-ci build_wheels: name: Build wheels on ${{ matrix.os }} runs-on: ${{ matrix.os }} @@ -27,6 +62,11 @@ jobs: - uses: actions/upload-artifact@v3 with: path: ./wheelhouse/*.whl + - name: Upload to PyPI + run: twine upload ./wheelhouse/*.whl + env: + TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} + TWINE_USERNAME: retworkx-ci build_wheels_aarch64: name: Build wheels on ${{ matrix.os }} runs-on: ${{ matrix.os }} @@ -87,6 +127,11 @@ jobs: - uses: actions/upload-artifact@v3 with: path: ./wheelhouse/*.whl + - name: Upload to PyPI + run: twine upload ./wheelhouse/*.whl + env: + TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} + TWINE_USERNAME: retworkx-ci build_wheels_ppc64le: name: Build wheels on ${{ matrix.os }} runs-on: ${{ matrix.os }} @@ -117,6 +162,11 @@ jobs: - uses: actions/upload-artifact@v3 with: path: ./wheelhouse/*.whl + - name: Upload to PyPI + run: twine upload ./wheelhouse/*.whl + env: + TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} + TWINE_USERNAME: retworkx-ci build_wheels_ppc64le_part2: name: Build wheels on ${{ matrix.os }} runs-on: ${{ matrix.os }} @@ -147,6 +197,11 @@ jobs: - uses: actions/upload-artifact@v3 with: path: ./wheelhouse/*.whl + - name: Upload to PyPI + run: twine upload ./wheelhouse/*.whl + env: + TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} + TWINE_USERNAME: retworkx-ci build_wheels_s390x: name: Build wheels on ${{ matrix.os }} runs-on: ${{ matrix.os }} @@ -177,6 +232,11 @@ jobs: - uses: actions/upload-artifact@v3 with: path: ./wheelhouse/*.whl + - name: Upload to PyPI + run: twine upload ./wheelhouse/*.whl + env: + TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} + TWINE_USERNAME: retworkx-ci build_wheels_s390x_part2: name: Build wheels on ${{ matrix.os }} runs-on: ${{ matrix.os }} @@ -207,6 +267,11 @@ jobs: - uses: actions/upload-artifact@v3 with: path: ./wheelhouse/*.whl + - name: Upload to PyPI + run: twine upload ./wheelhouse/*.whl + env: + TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} + TWINE_USERNAME: retworkx-ci build-mac-arm-wheels: name: Build wheels on macos for arm and universal2 runs-on: macos-latest @@ -229,6 +294,11 @@ jobs: - name: Install twine run: | python -m pip install twine + - name: Upload to PyPI + run: twine upload ./wheelhouse/*.whl + env: + TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} + TWINE_USERNAME: retworkx-ci build-win32-wheels: name: Build wheels on win32 runs-on: windows-latest @@ -255,6 +325,11 @@ jobs: - uses: actions/upload-artifact@v3 with: path: ./wheelhouse/*.whl + - name: Upload to PyPI + run: twine upload ./wheelhouse/*.whl + env: + TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} + TWINE_USERNAME: retworkx-ci retworkx-compat-build: name: Build retworkx runs-on: ubuntu-latest @@ -274,3 +349,8 @@ jobs: - uses: actions/upload-artifact@v3 with: path: ./dist/* + - name: Upload to PyPI + run: twine upload ./dist/* + env: + TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} + TWINE_USERNAME: retworkx-ci