From 3d0ca86d3776d511e1843b8609eac608728db3f6 Mon Sep 17 00:00:00 2001 From: Sam Greenbury Date: Tue, 10 Sep 2024 07:22:44 +0100 Subject: [PATCH] Add more platforms, fix pip install --- .github/workflows/python.yml | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index a183b43..4e1d045 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -29,10 +29,10 @@ jobs: - runner: ubuntu-latest target: x86_64 # TODO: currently fails with: "Could not find directory of OpenSSL installation..." - # - runner: ubuntu-latest - # target: x86 - # - runner: ubuntu-latest - # target: aarch64 + - runner: ubuntu-latest + target: x86 + - runner: ubuntu-latest + target: aarch64 # - runner: ubuntu-latest # target: armv7 # - runner: ubuntu-latest @@ -58,9 +58,22 @@ jobs: # sudo apt-get update # sudo apt-get install -y pkg-config libssl-dev # https://github.com/PyO3/maturin-action/discussions/162#discussioncomment-7978369 + # TODO: Try dropping find interpreter + # TODO: Try using the full case version from discussion + # TODO: try the other linux one before-script-linux: | - yum update -y - yum install -y openssl openssl-devel + case "${{ matrix.platform.target }}" in + "aarch64" | "armv7" | "s390x" | "ppc64le") + # NOTE: pypa/manylinux docker images are Debian based + sudo apt-get update + sudo apt-get install -y pkg-config libssl-dev + ;; + "x86" | "x86_64") + # NOTE: rust-cross/manylinux docker images are CentOS based + yum update -y + yum install -y openssl openssl-devel + ;; + esac # TODO: fix CI to run with manylinux, see: # https://github.com/PyO3/maturin?tab=readme-ov-file#manylinux-and-auditwheel manylinux: auto @@ -69,7 +82,7 @@ jobs: - name: Test wheel if: matrix.platform.target == 'x86_64' run: | - pip install --force-reinstall --verbose dist/*.whl + pip install --force-reinstall --verbose --find-links dist/ python -c 'import popgetter' - name: Upload wheels uses: actions/upload-artifact@v4 @@ -88,8 +101,6 @@ jobs: # - runner: ubuntu-latest # target: x86 # - runner: ubuntu-latest - # target: x86 - # - runner: ubuntu-latest # target: aarch64 # - runner: ubuntu-latest # target: armv7 @@ -105,11 +116,12 @@ jobs: args: --release --out dist --find-interpreter --manifest-path popgetter_py/Cargo.toml sccache: "true" before-script-linux: | - sudo apt-get update - sudo apt-get install -y pkg-config libssl-dev + # NOTE: rust-cross/manylinux docker images are CentOS based + yum update -y + yum install -y openssl openssl-devel # TODO: fix CI to run with manylinux, see: # https://github.com/PyO3/maturin?tab=readme-ov-file#manylinux-and-auditwheel - # manylinux: musllinux_1_2 + manylinux: musllinux_1_2 - name: Upload wheels uses: actions/upload-artifact@v4 with: