From 9daa640e7e21c1b8e65423cf6c4beb9b859541d2 Mon Sep 17 00:00:00 2001 From: Ivan Carvalho Date: Wed, 18 Oct 2023 17:55:18 -0400 Subject: [PATCH 1/7] Wheel build for aarch64 --- .github/workflows/wheels.yml | 96 ++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 0a1c2885a..0bc40f3df 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -154,6 +154,102 @@ jobs: uses: pypa/gh-action-pypi-publish@release/v1 with: packages-dir: wheelhouse/ + build_wheels_musl_aarch64: + name: Build wheels on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + environment: release + permissions: + id-token: write + 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 + - name: Build wheels + run: | + python -m cibuildwheel --output-dir wheelhouse + env: + CIBW_ARCHS_LINUX: aarch64 + CIBW_BEFORE_ALL_LINUX: 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 + CIBW_ENVIRONMENT_LINUX: PATH="$PATH:$HOME/.cargo/bin:$HOME/.cargo/env" + CARGO_NET_GIT_FETCH_WITH_CLI="true" + CIBW_SKIP: cp36-* pp* *win32 *macosx* *manylinux* *686* *s390x* *x86* cp37-* + cp311-* cp312-* + CIBW_BEFORE_BUILD: pip install -U setuptools-rust + CIBW_TEST_REQUIRES: networkx testtools fixtures + CIBW_BUILD_FRONTEND: pip + CIBW_TEST_COMMAND: python -m unittest discover {project}/tests/rustworkx_tests + CIBW_TEST_SKIP: cp37-* cp38-* cp39-* cp310-* cp311-* cp312-* + - uses: actions/upload-artifact@v3 + with: + path: ./wheelhouse/*.whl + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + packages-dir: wheelhouse/ + build_wheels_musl_aarch64_part_2: + name: Build wheels on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + environment: release + permissions: + id-token: write + 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 + - name: Build wheels + run: | + python -m cibuildwheel --output-dir wheelhouse + env: + CIBW_ARCHS_LINUX: aarch64 + CIBW_BEFORE_ALL_LINUX: 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 + CIBW_ENVIRONMENT_LINUX: PATH="$PATH:$HOME/.cargo/bin:$HOME/.cargo/env" + CARGO_NET_GIT_FETCH_WITH_CLI="true" + CIBW_SKIP: cp36-* pp* *win32 *macosx* *manylinux* *686* *s390x* *x86* cp37-* + cp38-* cp39-* cp310-* + CIBW_BEFORE_BUILD: pip install -U setuptools-rust + CIBW_TEST_REQUIRES: networkx testtools fixtures + CIBW_BUILD_FRONTEND: pip + CIBW_TEST_COMMAND: python -m unittest discover {project}/tests/rustworkx_tests + CIBW_TEST_SKIP: cp37-* cp38-* cp39-* cp310-* cp311-* cp312-* + - uses: actions/upload-artifact@v3 + with: + path: ./wheelhouse/*.whl + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + packages-dir: wheelhouse/ build_wheels_ppc64le: name: Build wheels on ${{ matrix.os }} runs-on: ${{ matrix.os }} From f82eae70771cbf9dd1679bac075b5e778d681e26 Mon Sep 17 00:00:00 2001 From: Ivan Carvalho Date: Wed, 18 Oct 2023 17:58:22 -0400 Subject: [PATCH 2/7] Add documentation for tier support --- docs/source/install.rst | 4 ++++ releasenotes/notes/platform-updates-e9b296144e633c95.yaml | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/source/install.rst b/docs/source/install.rst index f55bcb711..b2f961ec2 100644 --- a/docs/source/install.rst +++ b/docs/source/install.rst @@ -93,6 +93,10 @@ source. - x86_64 - :ref:`tier-3` - + * - Linux (musl) + - aarch64 + - :ref:`tier-4` + - * - macOS (10.12 or newer) - x86_64 - :ref:`tier-1` diff --git a/releasenotes/notes/platform-updates-e9b296144e633c95.yaml b/releasenotes/notes/platform-updates-e9b296144e633c95.yaml index 876fabbc8..adbf3bd27 100644 --- a/releasenotes/notes/platform-updates-e9b296144e633c95.yaml +++ b/releasenotes/notes/platform-updates-e9b296144e633c95.yaml @@ -1,7 +1,8 @@ --- 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 at :ref:`tier-3` + and aarch64 at :ref:`tier-4`. upgrade: - | Support for the Linux ppc64le pllatform has changed from tier 3 to tier 4 From 56bc9da1ea924a3170b3d62bb34126f330221bbe Mon Sep 17 00:00:00 2001 From: Ivan Carvalho <8753214+IvanIsCoding@users.noreply.github.com> Date: Thu, 26 Oct 2023 18:54:21 -0400 Subject: [PATCH 3/7] Apply suggestions from code review Co-authored-by: Matthew Treinish --- .github/workflows/wheels.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 0bc40f3df..9bcfb4455 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -188,12 +188,9 @@ jobs: stable && rustup default stable CIBW_ENVIRONMENT_LINUX: PATH="$PATH:$HOME/.cargo/bin:$HOME/.cargo/env" CARGO_NET_GIT_FETCH_WITH_CLI="true" - CIBW_SKIP: cp36-* pp* *win32 *macosx* *manylinux* *686* *s390x* *x86* cp37-* + CIBW_SKIP: cp36-* cp37-* cp311-* cp312-* - CIBW_BEFORE_BUILD: pip install -U setuptools-rust - CIBW_TEST_REQUIRES: networkx testtools fixtures CIBW_BUILD_FRONTEND: pip - CIBW_TEST_COMMAND: python -m unittest discover {project}/tests/rustworkx_tests CIBW_TEST_SKIP: cp37-* cp38-* cp39-* cp310-* cp311-* cp312-* - uses: actions/upload-artifact@v3 with: From 68689258bdefca9dead38e1673e5f098c98446c5 Mon Sep 17 00:00:00 2001 From: Ivan Carvalho <8753214+IvanIsCoding@users.noreply.github.com> Date: Thu, 26 Oct 2023 19:23:50 -0400 Subject: [PATCH 4/7] Update .github/workflows/wheels.yml Co-authored-by: Matthew Treinish --- .github/workflows/wheels.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 9bcfb4455..772933a46 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -183,11 +183,6 @@ jobs: python -m cibuildwheel --output-dir wheelhouse env: CIBW_ARCHS_LINUX: aarch64 - CIBW_BEFORE_ALL_LINUX: 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 - CIBW_ENVIRONMENT_LINUX: PATH="$PATH:$HOME/.cargo/bin:$HOME/.cargo/env" - CARGO_NET_GIT_FETCH_WITH_CLI="true" CIBW_SKIP: cp36-* cp37-* cp311-* cp312-* CIBW_BUILD_FRONTEND: pip From 30c13d6a2862365105e5a8a5ead0ab5bb5bd33a7 Mon Sep 17 00:00:00 2001 From: Ivan Carvalho Date: Sun, 29 Oct 2023 12:33:04 -0400 Subject: [PATCH 5/7] Simplify workflow pt2 --- .github/workflows/wheels.yml | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 772933a46..1e79f32bf 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -183,8 +183,7 @@ jobs: python -m cibuildwheel --output-dir wheelhouse env: CIBW_ARCHS_LINUX: aarch64 - CIBW_SKIP: cp36-* cp37-* - cp311-* cp312-* + CIBW_SKIP: cp36-* cp37-* cp311-* cp312-* CIBW_BUILD_FRONTEND: pip CIBW_TEST_SKIP: cp37-* cp38-* cp39-* cp310-* cp311-* cp312-* - uses: actions/upload-artifact@v3 @@ -223,17 +222,8 @@ jobs: python -m cibuildwheel --output-dir wheelhouse env: CIBW_ARCHS_LINUX: aarch64 - CIBW_BEFORE_ALL_LINUX: 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 - CIBW_ENVIRONMENT_LINUX: PATH="$PATH:$HOME/.cargo/bin:$HOME/.cargo/env" - CARGO_NET_GIT_FETCH_WITH_CLI="true" - CIBW_SKIP: cp36-* pp* *win32 *macosx* *manylinux* *686* *s390x* *x86* cp37-* - cp38-* cp39-* cp310-* - CIBW_BEFORE_BUILD: pip install -U setuptools-rust - CIBW_TEST_REQUIRES: networkx testtools fixtures + CIBW_SKIP: cp36-* cp37-* cp38-* cp39-* cp310-* CIBW_BUILD_FRONTEND: pip - CIBW_TEST_COMMAND: python -m unittest discover {project}/tests/rustworkx_tests CIBW_TEST_SKIP: cp37-* cp38-* cp39-* cp310-* cp311-* cp312-* - uses: actions/upload-artifact@v3 with: From a23b9b2340702136f8148d2fbefc53cbf886ed59 Mon Sep 17 00:00:00 2001 From: Ivan Carvalho Date: Sun, 29 Oct 2023 13:45:09 -0400 Subject: [PATCH 6/7] Skip manylinux on aarch64 build for musllinux --- .github/workflows/wheels.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 1e79f32bf..995109569 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -183,9 +183,8 @@ jobs: python -m cibuildwheel --output-dir wheelhouse env: CIBW_ARCHS_LINUX: aarch64 - CIBW_SKIP: cp36-* cp37-* cp311-* cp312-* - CIBW_BUILD_FRONTEND: pip - CIBW_TEST_SKIP: cp37-* cp38-* cp39-* cp310-* cp311-* cp312-* + CIBW_SKIP: *many* cp36-* cp37-* cp311-* cp312-* + CIBW_TEST_SKIP: *many* cp37-* cp38-* cp39-* cp310-* cp311-* cp312-* - uses: actions/upload-artifact@v3 with: path: ./wheelhouse/*.whl @@ -222,9 +221,8 @@ jobs: python -m cibuildwheel --output-dir wheelhouse env: CIBW_ARCHS_LINUX: aarch64 - CIBW_SKIP: cp36-* cp37-* cp38-* cp39-* cp310-* - CIBW_BUILD_FRONTEND: pip - CIBW_TEST_SKIP: cp37-* cp38-* cp39-* cp310-* cp311-* cp312-* + CIBW_SKIP: *many* cp36-* cp37-* cp38-* cp39-* cp310-* + CIBW_TEST_SKIP: *many* cp37-* cp38-* cp39-* cp310-* cp311-* cp312-* - uses: actions/upload-artifact@v3 with: path: ./wheelhouse/*.whl From 9824b4dc2dd395b94a73b42179f9a69d52357b5d Mon Sep 17 00:00:00 2001 From: Ivan Carvalho Date: Sun, 29 Oct 2023 13:47:07 -0400 Subject: [PATCH 7/7] Fix YAML shenanigans --- .github/workflows/wheels.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 995109569..29e175372 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -183,8 +183,8 @@ jobs: python -m cibuildwheel --output-dir wheelhouse env: CIBW_ARCHS_LINUX: aarch64 - CIBW_SKIP: *many* cp36-* cp37-* cp311-* cp312-* - CIBW_TEST_SKIP: *many* cp37-* cp38-* cp39-* cp310-* cp311-* cp312-* + CIBW_SKIP: cp36-* cp37-* cp311-* cp312-* *many* + CIBW_TEST_SKIP: cp37-* cp38-* cp39-* cp310-* cp311-* cp312-* *many* - uses: actions/upload-artifact@v3 with: path: ./wheelhouse/*.whl @@ -221,8 +221,8 @@ jobs: python -m cibuildwheel --output-dir wheelhouse env: CIBW_ARCHS_LINUX: aarch64 - CIBW_SKIP: *many* cp36-* cp37-* cp38-* cp39-* cp310-* - CIBW_TEST_SKIP: *many* cp37-* cp38-* cp39-* cp310-* cp311-* cp312-* + CIBW_SKIP: cp36-* cp37-* cp38-* cp39-* cp310-* *many* + CIBW_TEST_SKIP: cp37-* cp38-* cp39-* cp310-* cp311-* cp312-* *many* - uses: actions/upload-artifact@v3 with: path: ./wheelhouse/*.whl