From b9e5833d489d10f19ba690140c2fc24a7276aded Mon Sep 17 00:00:00 2001 From: Elgemp4 <69595917+Elgemp4@users.noreply.github.com> Date: Tue, 19 Nov 2024 23:09:19 +0100 Subject: [PATCH] Added linux aarch64/AMD64 build support (#129) --- .github/scripts/build-linux.sh | 1 + .github/workflows/ci.yml | 62 ++++++++++++++++++++++++++++++++-- 2 files changed, 61 insertions(+), 2 deletions(-) diff --git a/.github/scripts/build-linux.sh b/.github/scripts/build-linux.sh index 9bffec8..53ed08c 100755 --- a/.github/scripts/build-linux.sh +++ b/.github/scripts/build-linux.sh @@ -26,6 +26,7 @@ fi # install compile-time dependencies ${PYBIN}/pip install numpy==${NUMPY_VERSION} +${PYBIN}/pip install setuptools # List installed packages ${PYBIN}/pip freeze diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index db425d2..91c99cb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -61,6 +61,31 @@ jobs: python-arch: 'x86_64' python-version: '3.12' numpy-version: '2.0.*' + #ARM 64 + - os-image: ubuntu-latest + os-name: linux + docker-image: quay.io/pypa/manylinux_2_28_aarch64 + python-arch: 'aarch64' + python-version: '3.9' + numpy-version: '2.0.*' + - os-image: ubuntu-latest + os-name: linux + docker-image: quay.io/pypa/manylinux_2_28_aarch64 + python-arch: 'aarch64' + python-version: '3.10' + numpy-version: '2.0.*' + - os-image: ubuntu-latest + os-name: linux + docker-image: quay.io/pypa/manylinux_2_28_aarch64 + python-arch: 'aarch64' + python-version: '3.11' + numpy-version: '2.0.*' + - os-image: ubuntu-latest + os-name: linux + docker-image: quay.io/pypa/manylinux_2_28_aarch64 + python-arch: 'aarch64' + python-version: '3.12' + numpy-version: '2.0.*' - os-image: macos-12 os-name: mac @@ -139,7 +164,7 @@ jobs: - uses: actions/checkout@v4 with: submodules: true - + # - name: Initialize CodeQL # if: matrix.config.python-version == '3.10' # uses: github/codeql-action/init@v3 @@ -147,6 +172,10 @@ jobs: # languages: python, cpp # setup-python-dependencies: false + - name: Set up QEMU (Linux ARM64) + if: matrix.config.os-name == 'linux' && matrix.config.python-arch == 'aarch64' + uses: docker/setup-qemu-action@v3 + - name: Build wheel (Linux) if: matrix.config.os-name == 'linux' # See comment above. @@ -224,6 +253,31 @@ jobs: python-version: '3.12' numpy-version: '2.0.*' + - os-image: ubuntu-latest + os-name: linux + docker-image: quay.io/pypa/manylinux_2_28_aarch64 + python-arch: 'aarch64' + python-version: '3.9' + numpy-version: '2.0.*' + - os-image: ubuntu-latest + os-name: linux + docker-image: quay.io/pypa/manylinux_2_28_aarch64 + python-arch: 'aarch64' + python-version: '3.10' + numpy-version: '2.0.*' + - os-image: ubuntu-latest + os-name: linux + docker-image: quay.io/pypa/manylinux_2_28_aarch64 + python-arch: 'aarch64' + python-version: '3.11' + numpy-version: '2.0.*' + - os-image: ubuntu-latest + os-name: linux + docker-image: quay.io/pypa/manylinux_2_28_aarch64 + python-arch: 'aarch64' + python-version: '3.12' + numpy-version: '2.0.*' + - os-image: macos-12 os-name: mac python-arch: x86_64 @@ -305,6 +359,10 @@ jobs: name: wheel-${{ matrix.config.os-name }}-${{ matrix.config.python-arch }}-${{ matrix.config.python-version }} path: dist + - name: Set up QEMU (Linux ARM64) + if: matrix.config.os-name == 'linux' && matrix.config.python-arch == 'aarch64' + uses: docker/setup-qemu-action@v3 + - name: Test wheel (Linux) if: matrix.config.os-name == 'linux' # run: .github/scripts/test-linux.sh @@ -374,7 +432,7 @@ jobs: - name: Install from wheel run: | - pip install dist/pyvirtualcam*cp310-manylinux*.whl + pip install dist/pyvirtualcam*cp310-manylinux*_x86_64.whl pip install -r dev-requirements.txt - name: Build docs