Skip to content

Commit

Permalink
Add more platforms, fix pip install
Browse files Browse the repository at this point in the history
  • Loading branch information
sgreenbury committed Sep 10, 2024
1 parent 618bb39 commit 6f34019
Showing 1 changed file with 56 additions and 45 deletions.
101 changes: 56 additions & 45 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ jobs:
platform:
- runner: ubuntu-latest
target: x86_64
- runner: ubuntu-latest
target: x86
# 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: aarch64
# - runner: ubuntu-latest
# target: armv7
# - runner: ubuntu-latest
Expand All @@ -58,9 +58,21 @@ 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
pacman -S openssl
;;
"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
Expand All @@ -69,52 +81,51 @@ jobs:
- name: Test wheel
if: matrix.platform.target == 'x86_64'
run: |
pip install --force-reinstall --verbose dist/*.whl
pip install popgetter --force-reinstall --verbose --find-links dist/
python -c 'import popgetter'
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-linux-${{ matrix.platform.target }}
path: dist

musllinux:
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
platform:
- 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: x86
# - runner: ubuntu-latest
# target: aarch64
# - runner: ubuntu-latest
# target: armv7
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
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
# TODO: fix CI to run with manylinux, see:
# https://github.com/PyO3/maturin?tab=readme-ov-file#manylinux-and-auditwheel
# manylinux: musllinux_1_2
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-musllinux-${{ matrix.platform.target }}
path: dist
# # TODO: fix CI to run with manylinux, see:
# # https://github.com/PyO3/maturin?tab=readme-ov-file#manylinux-and-auditwheel
# musllinux:
# runs-on: ${{ matrix.platform.runner }}
# strategy:
# matrix:
# platform:
# - runner: ubuntu-latest
# target: x86_64
# - runner: ubuntu-latest
# target: x86
# - runner: ubuntu-latest
# target: aarch64
# - runner: ubuntu-latest
# target: armv7
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-python@v5
# with:
# python-version: ${{ env.PYTHON_VERSION }}
# - name: Build wheels
# uses: PyO3/maturin-action@v1
# with:
# target: ${{ matrix.platform.target }}
# args: --release --out dist --find-interpreter --manifest-path popgetter_py/Cargo.toml
# sccache: "true"
# before-script-linux: |
# # TODO: update with package instructions specific to target for openssl
# # See example: https://github.com/PyO3/maturin-action/discussions/162#discussioncomment-7978369
# sudo apt-get update
# sudo apt-get install -y pkg-config libssl-dev
# manylinux: musllinux_1_2
# - name: Upload wheels
# uses: actions/upload-artifact@v4
# with:
# name: wheels-musllinux-${{ matrix.platform.target }}
# path: dist

windows:
runs-on: ${{ matrix.platform.runner }}
Expand Down

0 comments on commit 6f34019

Please sign in to comment.