From d5f79fe5a6ea6239c7f62236d10e8f36fcc77ac2 Mon Sep 17 00:00:00 2001 From: Bas Zalmstra Date: Mon, 23 Sep 2024 10:08:59 +0200 Subject: [PATCH] chore: revert python release workflow --- .github/workflows/release-python.yml | 206 +++++++++++++++++++++++---- 1 file changed, 177 insertions(+), 29 deletions(-) diff --git a/.github/workflows/release-python.yml b/.github/workflows/release-python.yml index 2a3cad626..43da631c8 100644 --- a/.github/workflows/release-python.yml +++ b/.github/workflows/release-python.yml @@ -78,12 +78,20 @@ jobs: with: python-version: ${{ env.PYTHON_VERSION }} architecture: ${{ matrix.platform.arch }} - - name: "Build wheels" + - name: "Build wheels (rustls-tls)" uses: PyO3/maturin-action@v1 + if: ${{ !startsWith(matrix.platform.target, 'aarch64') }} with: working-directory: py-rattler target: ${{ matrix.platform.target }} args: --release --out dist --no-default-features --features rustls-tls + - name: "Build wheels (native-tls)" + uses: PyO3/maturin-action@v1 + if: ${{ startsWith(matrix.platform.target, 'aarch64') }} + with: + working-directory: py-rattler + target: ${{ matrix.platform.target }} + args: --release --out dist --no-default-features --features native-tls,vendored-openssl - name: "Test wheel" if: ${{ !startsWith(matrix.platform.target, 'aarch64') }} shell: bash @@ -97,23 +105,14 @@ jobs: path: py-rattler/dist linux: - runs-on: ${{ matrix.platform.runner }} - name: Build ${{ matrix.platform.target }} + runs-on: ubuntu-latest + name: Build ${{ matrix.target }} strategy: + fail-fast: false matrix: - platform: - - runner: ubuntu-latest - target: x86_64 - - runner: ubuntu-latest - target: x86 - - runner: ubuntu-latest - target: aarch64 - - runner: ubuntu-latest - target: armv7 - - runner: ubuntu-latest - target: s390x - - runner: ubuntu-latest - target: ppc64le + target: + - x86_64-unknown-linux-gnu + - i686-unknown-linux-gnu steps: - uses: actions/checkout@v4 with: @@ -121,13 +120,14 @@ jobs: - uses: actions/setup-python@v5 with: python-version: ${{ env.PYTHON_VERSION }} + architecture: x64 - name: "Build wheels" uses: PyO3/maturin-action@v1 with: working-directory: py-rattler - target: ${{ matrix.platform.target }} + target: ${{ matrix.target }} manylinux: auto - args: --release --out dist --zig --no-default-features --features rustls-tls + args: --release --out dist --no-default-features --features rustls-tls - name: "Test wheel" if: ${{ startsWith(matrix.target, 'x86_64') }} run: | @@ -139,20 +139,67 @@ jobs: name: linux-wheels-${{ matrix.target }} path: py-rattler/dist - musllinux: - name: Build musl ${{ matrix.platform.target }} - runs-on: ${{ matrix.platform.runner }} + linux-cross: + runs-on: ubuntu-latest + name: Build ${{ matrix.platform.target }} + strategy: + fail-fast: false + matrix: + platform: + - target: aarch64-unknown-linux-gnu + arch: aarch64 + - target: armv7-unknown-linux-gnueabihf + arch: armv7 + + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ inputs.sha }} + - uses: actions/setup-python@v5 + with: + python-version: ${{ env.PYTHON_VERSION }} + - name: "Build wheels" + uses: PyO3/maturin-action@v1 + with: + working-directory: py-rattler + target: ${{ matrix.platform.target }} + manylinux: '2_28' + docker-options: ${{ matrix.platform.maturin_docker_options }} + args: --release --out dist --no-default-features --features rustls-tls + - uses: uraimo/run-on-arch-action@v2 + if: matrix.platform.arch != 'ppc64' + name: Test wheel + with: + arch: ${{ matrix.platform.arch }} + distro: ubuntu20.04 + githubToken: ${{ github.token }} + install: | + apt-get update + apt-get install -y --no-install-recommends python3 python3-pip + pip3 install -U pip + run: | + pip3 install ${{ env.PACKAGE_NAME }} --no-index --find-links py-rattler/dist/ --force-reinstall + python3 -c "import rattler; print(rattler.__version__)" + - name: "Upload wheels" + uses: actions/upload-artifact@v4 + with: + name: linux-wheels-${{ matrix.platform.target }} + path: py-rattler/dist + + linux-cross-native-tls: + runs-on: ubuntu-latest + name: Build ${{ matrix.platform.target }} strategy: + fail-fast: false matrix: platform: - - runner: ubuntu-latest - target: x86_64 - - runner: ubuntu-latest - target: x86 - - runner: ubuntu-latest - target: aarch64 - - runner: ubuntu-latest - target: armv7 +# - target: s390x-unknown-linux-gnu +# arch: s390x + - target: powerpc64le-unknown-linux-gnu + arch: ppc64le + - target: powerpc64-unknown-linux-gnu + arch: ppc64 + steps: - uses: actions/checkout@v4 with: @@ -161,12 +208,66 @@ jobs: with: python-version: ${{ env.PYTHON_VERSION }} - name: "Build wheels" + uses: PyO3/maturin-action@v1 + with: + working-directory: py-rattler + target: ${{ matrix.platform.target }} + manylinux: auto + docker-options: ${{ matrix.platform.maturin_docker_options }} + args: --release --out dist --no-default-features --features native-tls,vendored-openssl + - uses: uraimo/run-on-arch-action@v2 + if: matrix.platform.arch != 'ppc64' + name: Test wheel + with: + arch: ${{ matrix.platform.arch }} + distro: ubuntu20.04 + githubToken: ${{ github.token }} + install: | + apt-get update + apt-get install -y --no-install-recommends python3 python3-pip + pip3 install -U pip + run: | + pip3 install ${{ env.PACKAGE_NAME }} --no-index --find-links py-rattler/dist/ --force-reinstall + python3 -c "import rattler; print(rattler.__version__)" + - name: "Upload wheels" + uses: actions/upload-artifact@v4 + with: + name: linux-wheels-${{ matrix.platform.target }} + path: py-rattler/dist + + musllinux: + runs-on: ubuntu-latest + name: Build ${{ matrix.target }} + strategy: + fail-fast: false + matrix: + target: + - x86_64-unknown-linux-musl + - i686-unknown-linux-musl + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ inputs.sha }} + - uses: actions/setup-python@v5 + with: + python-version: ${{ env.PYTHON_VERSION }} + architecture: x64 + - name: "Build wheels (rustls-tls)" + if: matrix.target == 'x86_64-unknown-linux-musl' uses: PyO3/maturin-action@v1 with: working-directory: py-rattler target: ${{ matrix.target }} manylinux: musllinux_1_2 args: --release --out dist --no-default-features --features rustls-tls + - name: "Build wheels (native-tls)" + if: matrix.target != 'x86_64-unknown-linux-musl' + uses: PyO3/maturin-action@v1 + with: + working-directory: py-rattler + target: ${{ matrix.target }} + manylinux: musllinux_1_2 + args: --release --out dist --no-default-features --features native-tls,vendored-openssl - name: "Test wheel" if: matrix.target == 'x86_64-unknown-linux-musl' uses: addnab/docker-run-action@v3 @@ -183,6 +284,50 @@ jobs: name: linux-wheels-${{ matrix.target }} path: py-rattler/dist + musllinux-cross: + runs-on: ubuntu-latest + name: Build ${{ matrix.platform.target }} + strategy: + fail-fast: false + matrix: + platform: + - target: aarch64-unknown-linux-musl + arch: aarch64 + - target: armv7-unknown-linux-musleabihf + arch: armv7 + + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ inputs.sha }} + - uses: actions/setup-python@v5 + with: + python-version: ${{ env.PYTHON_VERSION }} + - name: "Build wheels" + uses: PyO3/maturin-action@v1 + with: + working-directory: py-rattler + target: ${{ matrix.platform.target }} + manylinux: musllinux_1_2 + args: --release --out dist --no-default-features --features rustls-tls + docker-options: ${{ matrix.platform.maturin_docker_options }} + - uses: uraimo/run-on-arch-action@v2 + name: Test wheel + with: + arch: ${{ matrix.platform.arch }} + distro: alpine_latest + githubToken: ${{ github.token }} + install: | + apk add py3-pip + run: | + pip3 install ${{ env.PACKAGE_NAME }} --no-index --find-links py-rattler/dist/ --force-reinstall --break-system-packages + python3 -c "import rattler; print(rattler.__version__)" + - name: "Upload wheels" + uses: actions/upload-artifact@v4 + with: + name: linux-wheels-${{ matrix.platform.target }} + path: py-rattler/dist + macos-x86_64: runs-on: macos-13 # x86_64 runner name: Build x86_64-macos @@ -277,7 +422,10 @@ jobs: - macos-x86_64 - windows - linux + - linux-cross + - linux-cross-native-tls - musllinux + - musllinux-cross - validate-tag # If you don't set an input tag, it's a dry run (no uploads). if: ${{ inputs.tag }}