From 0c31a504c075babb5afcdff7431317383e06dba1 Mon Sep 17 00:00:00 2001 From: Zuzu-Typ Date: Sun, 24 Nov 2024 11:27:46 +0100 Subject: [PATCH 1/3] Updated action verions --- .github/workflows/accelerate-manylinux.yml | 23 ++++++---------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/.github/workflows/accelerate-manylinux.yml b/.github/workflows/accelerate-manylinux.yml index 1b029cce..2a9c1b6c 100644 --- a/.github/workflows/accelerate-manylinux.yml +++ b/.github/workflows/accelerate-manylinux.yml @@ -67,7 +67,7 @@ jobs: python-version: 3.x - name: Set up QEMU if: runner.os == 'Linux' - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 with: platforms: all @@ -115,23 +115,12 @@ jobs: with: name: accel path: dist - - name: Download Accelerate Binary Windows - uses: actions/download-artifact@v4.1.7 - id: download-accelerate-bin-windows - with: - name: accel-binary-windows-latest - path: dist - - name: Download Accelerate Binary Ubuntu - uses: actions/download-artifact@v4.1.7 - id: download-accelerate-bin-ubuntu - with: - name: accel-binary-ubuntu-latest - path: dist - - name: Download Accelerate Binary MacOS - uses: actions/download-artifact@v4.1.7 - id: download-accelerate-bin-macOS + - name: Download Accelerate Binary + uses: actions/download-artifact@v4 + id: download-accelerate-bin with: - name: accel-binary-macOS-latest + pattern: accel-binary-* + merge-multiple: true path: dist # retrieve your distributions here From 5f50f5a787903d5de31f20c660db2ac0635542ba Mon Sep 17 00:00:00 2001 From: Zuzu-Typ Date: Mon, 3 Feb 2025 13:47:32 +0100 Subject: [PATCH 2/3] Squashed commit of the following: commit f0536875c739163693f979f3d621844c27b67ac8 Author: Zuzu-Typ Date: Mon Feb 3 13:43:02 2025 +0100 Removed temporary comments commit 839d1f7f6cf4ecbdf23971e761510f1fb09d4a09 Author: Zuzu-Typ Date: Mon Feb 3 12:59:28 2025 +0100 Fixed some oversights commit 35ac3eb5df9127b53c7401abf5756ed19a2b9a48 Author: Zuzu-Typ Date: Mon Feb 3 12:55:34 2025 +0100 Excluded ppc64le and s390x commit 7598bb6c09801d9d3a7d3928ffb62bfb25db3b05 Author: Zuzu-Typ Date: Mon Feb 3 12:43:45 2025 +0100 Try running Python 3.10 builds only for ppc64le and s390x commit 141e1885ab83ded3cf0ef2e1737eb89e326f0780 Author: Zuzu-Typ Date: Mon Feb 3 12:12:04 2025 +0100 Skipping outdated Python versions commit d53699212c061f4b8572145e261425689999f55a Author: Zuzu-Typ Date: Mon Feb 3 12:06:49 2025 +0100 Using ubuntu-latest with qemu for ppc64le and s390x commit 8384975ff633719b121163213195b29c6ca0a02c Author: Zuzu-Typ Date: Mon Feb 3 11:37:14 2025 +0100 Commented out ifs for testing purposes commit 7726b71d77531e3587ed8d4da82e85cb5a5d8087 Author: Zuzu-Typ Date: Mon Feb 3 11:32:52 2025 +0100 Fixed needs requirement in workflow commit e01989c4604bc7d6606074b5a0950a517d6928e7 Author: Zuzu-Typ Date: Mon Feb 3 11:31:33 2025 +0100 Fixed needs requirement in workflow commit 9cb660e1c3c86ebb3ea29ed74476fb35a490e431 Author: Zuzu-Typ Date: Mon Feb 3 11:27:53 2025 +0100 Fixed incorrect indentation commit 96ed215cffa72cb468e9f5d78194693cfc5cb813 Author: Zuzu-Typ Date: Mon Feb 3 11:25:21 2025 +0100 Add support for arm builds and runners --- .github/workflows/accelerate-manylinux.yml | 381 ++++++++++++++++++++- 1 file changed, 364 insertions(+), 17 deletions(-) diff --git a/.github/workflows/accelerate-manylinux.yml b/.github/workflows/accelerate-manylinux.yml index 2a9c1b6c..5303c359 100644 --- a/.github/workflows/accelerate-manylinux.yml +++ b/.github/workflows/accelerate-manylinux.yml @@ -1,10 +1,13 @@ -name: Build PyOpenGL-accelerate wheels with manylinux +name: Build PyOpenGL-accelerate wheels on different architectures on: push: branches: - "master" +env: + CIBW_SKIP: cp36-* cp37-* cp38-* pp* + jobs: tarballs: name: Build source tarballs and root wheels @@ -49,15 +52,256 @@ jobs: name: accel path: accelerate/dist/* - wheels: - name: Build architecture-specific wheels on ${{ matrix.os }} - runs-on: ${{ matrix.os }} + wheels_windows: + name: Wheels on windows ${{matrix.arch}} + runs-on: windows-latest + strategy: + matrix: + arch: [AMD64, x86, ARM64] + env: + CIBW_ARCHS: ${{matrix.arch}} + + steps: + - name: Check out repository + uses: actions/checkout@v4 + - name: Install Python + uses: actions/setup-python@v5 + with: + python-version: 3.x + + - name: Build wheels (develop) + uses: pypa/cibuildwheel@v2.22.0 + if: ${{ github.ref == 'refs/heads/develop' }} + with: + package-dir: "./accelerate" + output-dir: "./accelerate/dist" + env: + BUILD_EXTENSION: yes + + - name: Build wheels (master) + uses: pypa/cibuildwheel@v2.22.0 + if: ${{ github.ref == 'refs/heads/master' }} + with: + package-dir: "./accelerate" + output-dir: "./accelerate/dist" + env: + BUILD_EXTENSION: yes + + - name: Save wheels + uses: actions/upload-artifact@v4 + with: + name: accel-binary-windows-${{ matrix.arch }} + path: accelerate/dist/*.whl + + wheels_mac: + name: Wheels on MacOS ${{ matrix.arch }} + runs-on: macos-latest + strategy: + matrix: + arch: [x86_64, arm64] + + env: + CIBW_ARCHS: ${{ matrix.arch }} + + steps: + - name: Check out repository + uses: actions/checkout@v4 + - name: Install Python + uses: actions/setup-python@v5 + with: + python-version: 3.x + + - name: Build wheels (develop) + uses: pypa/cibuildwheel@v2.22.0 + if: ${{ github.ref == 'refs/heads/develop' }} + with: + package-dir: "./accelerate" + output-dir: "./accelerate/dist" + env: + BUILD_EXTENSION: yes + + - name: Build wheels (master) + uses: pypa/cibuildwheel@v2.22.0 + if: ${{ github.ref == 'refs/heads/master' }} + with: + package-dir: "./accelerate" + output-dir: "./accelerate/dist" + env: + BUILD_EXTENSION: yes + + - name: Save wheels + uses: actions/upload-artifact@v4 + with: + name: accel-binary-macos-${{ matrix.arch }} + path: accelerate/dist/*.whl + + wheels_manylinux_x86: + name: Wheels on ${{ matrix.distro }} ${{ matrix.arch }} + runs-on: ubuntu-latest + strategy: + matrix: + distro: [manylinux2014, manylinux_2_28] + arch: [x86_64] + include: + - distro: manylinux2014 + arch: i686 + + env: + CIBW_MANYLINUX_X86_64_IMAGE: ${{ matrix.distro }} + CIBW_MANYLINUX_I686_IMAGE: ${{ matrix.distro }} + CIBW_BUILD: cp3*-manylinux* + CIBW_ARCHS: ${{matrix.arch}} + + steps: + - name: Check out repository + uses: actions/checkout@v4 + - name: Install Python + uses: actions/setup-python@v5 + with: + python-version: 3.x + + - name: Build wheels (develop) + uses: pypa/cibuildwheel@v2.22.0 + if: ${{ github.ref == 'refs/heads/develop' }} + with: + package-dir: "./accelerate" + output-dir: "./accelerate/dist" + env: + BUILD_EXTENSION: yes + + - name: Build wheels (master) + uses: pypa/cibuildwheel@v2.22.0 + if: ${{ github.ref == 'refs/heads/master' }} + with: + package-dir: "./accelerate" + output-dir: "./accelerate/dist" + env: + BUILD_EXTENSION: yes + + - name: Save wheels + uses: actions/upload-artifact@v4 + with: + name: accel-binary-${{ matrix.distro }}-${{ matrix.arch }} + path: accelerate/dist/*.whl + + wheels_manylinux_arm: + name: Wheels on ${{ matrix.distro }} ${{ matrix.arch }} + + runs-on: ubuntu-24.04-arm + strategy: + matrix: + distro: [manylinux2014, manylinux_2_28] + arch: [aarch64, armv7l] + + env: + CIBW_MANYLINUX_AARCH64_IMAGE: ${{ matrix.distro }} + CIBW_MANYLINUX_S390X_IMAGE: ${{ matrix.distro }} + CIBW_MANYLINUX_PPC64LE_IMAGE: ${{ matrix.distro }} + CIBW_BUILD: cp3*-manylinux* + CIBW_ARCHS: ${{matrix.arch}} + + steps: + - name: Check out repository + uses: actions/checkout@v4 + - name: Install Python + uses: actions/setup-python@v5 + with: + python-version: 3.x + # - name: Set up QEMU + # if: ${{ matrix.arch != 'x86_64' && matrix.arch != 'i686' }} + # uses: docker/setup-qemu-action@v3 + + - name: Build wheels (develop) + uses: pypa/cibuildwheel@v2.22.0 + if: ${{ github.ref == 'refs/heads/develop' }} + with: + package-dir: "./accelerate" + output-dir: "./accelerate/dist" + env: + BUILD_EXTENSION: yes + + - name: Build wheels (master) + uses: pypa/cibuildwheel@v2.22.0 + if: ${{ github.ref == 'refs/heads/master' }} + with: + package-dir: "./accelerate" + output-dir: "./accelerate/dist" + env: + BUILD_EXTENSION: yes + + - name: Save wheels + uses: actions/upload-artifact@v4 + with: + name: accel-binary-${{ matrix.distro }}-${{ matrix.arch }} + path: accelerate/dist/*.whl + + # Broken because NumPy does not have wheels for these architectures: + + # wheels_manylinux_arm_ex: + # name: Wheels on ${{ matrix.distro }} ${{ matrix.arch }} + + # runs-on: ubuntu-latest + # strategy: + # matrix: + # distro: [manylinux2014, manylinux_2_28] + # arch: [ppc64le, s390x] + + # env: + # CIBW_MANYLINUX_AARCH64_IMAGE: ${{ matrix.distro }} + # CIBW_MANYLINUX_S390X_IMAGE: ${{ matrix.distro }} + # CIBW_MANYLINUX_PPC64LE_IMAGE: ${{ matrix.distro }} + # CIBW_BUILD: cp3*-manylinux* + # CIBW_ARCHS: ${{matrix.arch}} + + # steps: + # - name: Check out repository + # uses: actions/checkout@v4 + # - name: Install Python + # uses: actions/setup-python@v5 + # with: + # python-version: 3.x + + # - name: Set up QEMU + # uses: docker/setup-qemu-action@v3 + + # - name: Build wheels (develop) + # uses: pypa/cibuildwheel@v2.22.0 + # if: ${{ github.ref == 'refs/heads/develop' }} + # with: + # package-dir: "./accelerate" + # output-dir: "./accelerate/dist" + # env: + # BUILD_EXTENSION: yes + + # - name: Build wheels (master) + # uses: pypa/cibuildwheel@v2.22.0 + # if: ${{ github.ref == 'refs/heads/master' }} + # with: + # package-dir: "./accelerate" + # output-dir: "./accelerate/dist" + # env: + # BUILD_EXTENSION: yes + + # - name: Save wheels + # uses: actions/upload-artifact@v4 + # with: + # name: accel-binary-${{ matrix.distro }}-${{ matrix.arch }} + # path: accelerate/dist/*.whl + + wheels_musllinux_x86: + name: Wheels on ${{ matrix.distro }} ${{ matrix.arch }} + runs-on: ubuntu-latest strategy: matrix: - os: - - ubuntu-latest - - windows-latest - - macOS-latest + distro: [musllinux_1_2] + arch: [x86_64, i686] + + env: + CIBW_MUSLLINUX_X86_64_IMAGE: ${{ matrix.distro }} + CIBW_MUSLLINUX_I686_IMAGE: ${{ matrix.distro }} + CIBW_BUILD: cp3*-musllinux* + CIBW_ARCHS: ${{matrix.arch}} + steps: - name: Check out repository uses: actions/checkout@v4 @@ -65,11 +309,52 @@ jobs: uses: actions/setup-python@v5 with: python-version: 3.x - - name: Set up QEMU - if: runner.os == 'Linux' - uses: docker/setup-qemu-action@v3 + + - name: Build wheels (develop) + uses: pypa/cibuildwheel@v2.22.0 + if: ${{ github.ref == 'refs/heads/develop' }} + with: + package-dir: "./accelerate" + output-dir: "./accelerate/dist" + env: + BUILD_EXTENSION: yes + + - name: Build wheels (master) + uses: pypa/cibuildwheel@v2.22.0 + if: ${{ github.ref == 'refs/heads/master' }} + with: + package-dir: "./accelerate" + output-dir: "./accelerate/dist" + env: + BUILD_EXTENSION: yes + + - name: Save wheels + uses: actions/upload-artifact@v4 + with: + name: accel-binary-${{ matrix.distro }}-${{ matrix.arch }} + path: accelerate/dist/*.whl + + wheels_musllinux_arm: + name: Wheels on ${{ matrix.distro }} ${{ matrix.arch }} + runs-on: ubuntu-24.04-arm + strategy: + matrix: + distro: [musllinux_1_2] + arch: [aarch64, armv7l] + + env: + CIBW_MUSLLINUX_AARCH64_IMAGE: ${{ matrix.distro }} + CIBW_MUSLLINUX_ARMV7L_IMAGE: ${{ matrix.distro }} + CIBW_BUILD: cp3*-musllinux* + CIBW_ARCHS: ${{matrix.arch}} + + steps: + - name: Check out repository + uses: actions/checkout@v4 + - name: Install Python + uses: actions/setup-python@v5 with: - platforms: all + python-version: 3.x - name: Build wheels (develop) uses: pypa/cibuildwheel@v2.22.0 @@ -79,7 +364,6 @@ jobs: output-dir: "./accelerate/dist" env: BUILD_EXTENSION: yes - CIBW_SKIP: "pp*" - name: Build wheels (master) uses: pypa/cibuildwheel@v2.22.0 @@ -89,20 +373,76 @@ jobs: output-dir: "./accelerate/dist" env: BUILD_EXTENSION: yes - CIBW_SKIP: "pp*" - name: Save wheels uses: actions/upload-artifact@v4 with: - name: accel-binary-${{ matrix.os }} + name: accel-binary-${{ matrix.distro }}-${{ matrix.arch }} path: accelerate/dist/*.whl + # Broken because NumPy does not have wheels for these architectures: + + # wheels_musllinux_arm_ex: + # name: Wheels on ${{ matrix.distro }} ${{ matrix.arch }} + # runs-on: ubuntu-latest + # strategy: + # matrix: + # distro: [musllinux_1_2] + # arch: [s390x, ppc64le] + # env: + # CIBW_MUSLLINUX_S390X_IMAGE: ${{ matrix.distro }} + # CIBW_MUSLLINUX_PPC64LE_IMAGE: ${{ matrix.distro }} + # CIBW_BUILD: cp3*-musllinux* + # CIBW_ARCHS: ${{matrix.arch}} + + # steps: + # - name: Check out repository + # uses: actions/checkout@v4 + # - name: Install Python + # uses: actions/setup-python@v5 + # with: + # python-version: 3.x + + # - name: Set up QEMU + # uses: docker/setup-qemu-action@v3 + + # - name: Build wheels (develop) + # uses: pypa/cibuildwheel@v2.22.0 + # if: ${{ github.ref == 'refs/heads/develop' }} + # with: + # package-dir: "./accelerate" + # output-dir: "./accelerate/dist" + # env: + # BUILD_EXTENSION: yes + + # - name: Build wheels (master) + # uses: pypa/cibuildwheel@v2.22.0 + # if: ${{ github.ref == 'refs/heads/master' }} + # with: + # package-dir: "./accelerate" + # output-dir: "./accelerate/dist" + # env: + # BUILD_EXTENSION: yes + + # - name: Save wheels + # uses: actions/upload-artifact@v4 + # with: + # name: accel-binary-${{ matrix.distro }}-${{ matrix.arch }} + # path: accelerate/dist/*.whl + pypi-publish-accel: name: Upload Accelerate ${{matrix.repo}} runs-on: ubuntu-latest if: ${{ github.ref == 'refs/heads/master' }} needs: - - wheels + - wheels_windows + - wheels_mac + - wheels_manylinux_x86 + - wheels_manylinux_arm + # - wheels_manylinux_arm_ex + - wheels_musllinux_x86 + - wheels_musllinux_arm + # - wheels_musllinux_arm_ex - tarballs # TODO: should be choosing the repo URL based on master/develop permissions: @@ -137,7 +477,14 @@ jobs: runs-on: ubuntu-latest if: ${{ github.ref == 'refs/heads/master' }} needs: - - wheels + - wheels_windows + - wheels_mac + - wheels_manylinux_x86 + - wheels_manylinux_arm + # - wheels_manylinux_arm_ex + - wheels_musllinux_x86 + - wheels_musllinux_arm + # - wheels_musllinux_arm_ex - tarballs # TODO: should be choosing the repo URL based on master/develop permissions: From 9f460600ce0668bcae19fdc26c137f1ff23ee4ed Mon Sep 17 00:00:00 2001 From: Zuzu-Typ Date: Mon, 3 Feb 2025 15:24:28 +0100 Subject: [PATCH 3/3] Fixed duplicate build on manylinux armv7l --- .github/workflows/accelerate-manylinux.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/accelerate-manylinux.yml b/.github/workflows/accelerate-manylinux.yml index 5303c359..4aa3eff0 100644 --- a/.github/workflows/accelerate-manylinux.yml +++ b/.github/workflows/accelerate-manylinux.yml @@ -191,12 +191,15 @@ jobs: strategy: matrix: distro: [manylinux2014, manylinux_2_28] - arch: [aarch64, armv7l] + arch: [aarch64] + include: + - distro: manylinux_2_31 + arch: armv7l + env: CIBW_MANYLINUX_AARCH64_IMAGE: ${{ matrix.distro }} - CIBW_MANYLINUX_S390X_IMAGE: ${{ matrix.distro }} - CIBW_MANYLINUX_PPC64LE_IMAGE: ${{ matrix.distro }} + CIBW_MANYLINUX_ARMV7L_IMAGE: ${{ matrix.distro }} CIBW_BUILD: cp3*-manylinux* CIBW_ARCHS: ${{matrix.arch}} @@ -247,7 +250,6 @@ jobs: # arch: [ppc64le, s390x] # env: - # CIBW_MANYLINUX_AARCH64_IMAGE: ${{ matrix.distro }} # CIBW_MANYLINUX_S390X_IMAGE: ${{ matrix.distro }} # CIBW_MANYLINUX_PPC64LE_IMAGE: ${{ matrix.distro }} # CIBW_BUILD: cp3*-manylinux*