Skip to content

Commit

Permalink
Add PyPy wheels for Windows x64 (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
aminalaee committed Apr 3, 2023
1 parent 97958b3 commit b697362
Show file tree
Hide file tree
Showing 3 changed files with 104 additions and 88 deletions.
174 changes: 87 additions & 87 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,36 +69,36 @@ jobs:
matrix:
target: [aarch64, armv7, s390x, ppc64le]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
rust-toolchain: stable
target: ${{ matrix.target }}
manylinux: auto
args: --release --out dist -i 3.7 3.8 3.9 3.10 3.11 pypy3.8 pypy3.9
- uses: uraimo/run-on-arch-action@v2.3.0
if: matrix.target != 'ppc64'
name: Install built wheel
with:
arch: ${{ matrix.target }}
distro: ubuntu20.04
githubToken: ${{ github.token }}
install: |
apt-get update
apt-get install -y --no-install-recommends python3 python3-pip
pip3 install -U pip pytest
run: |
pip3 install uuid_utils --no-index --find-links dist/ --force-reinstall
pytest -v .
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
rust-toolchain: stable
target: ${{ matrix.target }}
manylinux: auto
args: --release --out dist -i 3.7 3.8 3.9 3.10 3.11 pypy3.8 pypy3.9
- uses: uraimo/run-on-arch-action@v2.3.0
if: matrix.target != 'ppc64'
name: Install built wheel
with:
arch: ${{ matrix.target }}
distro: ubuntu20.04
githubToken: ${{ github.token }}
install: |
apt-get update
apt-get install -y --no-install-recommends python3 python3-pip
pip3 install -U pip pytest
run: |
pip3 install uuid_utils --no-index --find-links dist/ --force-reinstall
pytest -v .
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist

musllinux:
name: "Linux: ${{ matrix.target }}"
Expand All @@ -109,34 +109,34 @@ jobs:
- x86_64-unknown-linux-musl
- i686-unknown-linux-musl
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
architecture: x64
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
rust-toolchain: stable
target: ${{ matrix.target }}
manylinux: musllinux_1_2
args: --release --out dist -i 3.7 3.8 3.9 3.10 3.11
- name: Install built wheel
if: matrix.target == 'x86_64-unknown-linux-musl'
uses: addnab/docker-run-action@v3
with:
image: alpine:latest
options: -v ${{ github.workspace }}:/io -w /io
run: |
apk add py3-pip
pip3 install -U pip pytest
pip3 install uuid_utils --no-index --find-links /io/dist/ --force-reinstall
python3 -m pytest -v
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.11"
architecture: x64
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
rust-toolchain: stable
target: ${{ matrix.target }}
manylinux: musllinux_1_2
args: --release --out dist -i 3.7 3.8 3.9 3.10 3.11
- name: Install built wheel
if: matrix.target == 'x86_64-unknown-linux-musl'
uses: addnab/docker-run-action@v3
with:
image: alpine:latest
options: -v ${{ github.workspace }}:/io -w /io
run: |
apk add py3-pip
pip3 install -U pip pytest
pip3 install uuid_utils --no-index --find-links /io/dist/ --force-reinstall
python3 -m pytest -v
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist

musllinux-cross:
name: "Linux: ${{ matrix.platform.target }}"
Expand All @@ -149,34 +149,34 @@ jobs:
- target: armv7-unknown-linux-musleabihf
arch: armv7
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
rust-toolchain: stable
target: ${{ matrix.platform.target }}
manylinux: musllinux_1_2
args: --release --out dist -i 3.7 3.8 3.9 3.10 3.11
- uses: uraimo/run-on-arch-action@v2.3.0
name: Install built wheel
with:
arch: ${{ matrix.platform.arch }}
distro: alpine_latest
githubToken: ${{ github.token }}
install: |
apk add py3-pip
pip3 install -U pip pytest
run: |
pip3 install uuid_utils --no-index --find-links dist/ --force-reinstall
python3 -m pytest -v .
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
rust-toolchain: stable
target: ${{ matrix.platform.target }}
manylinux: musllinux_1_2
args: --release --out dist -i 3.7 3.8 3.9 3.10 3.11
- uses: uraimo/run-on-arch-action@v2.3.0
name: Install built wheel
with:
arch: ${{ matrix.platform.arch }}
distro: alpine_latest
githubToken: ${{ github.token }}
install: |
apk add py3-pip
pip3 install -U pip pytest
run: |
pip3 install uuid_utils --no-index --find-links dist/ --force-reinstall
python3 -m pytest -v .
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist

windows:
name: "Windows: ${{ matrix.platform.target }}"
Expand All @@ -185,7 +185,7 @@ jobs:
matrix:
platform:
- target: x64
interpreter: 3.7 3.8 3.9 3.10 3.11
interpreter: 3.7 3.8 3.9 3.10 3.11 pypy3.8 pypy3.9
- target: x86
interpreter: 3.7 3.8 3.9 3.10 3.11
steps:
Expand Down
16 changes: 16 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ name = "uuid_utils"
crate-type = ["cdylib"]

[dependencies]
pyo3 = { version = "0.18.2", features = ["extension-module"] }
pyo3 = { version = "0.18.2", features = ["extension-module", "generate-import-lib"] }
uuid = { version = "1.3.0", features = ["v1", "v3", "v4", "v5", "v6", "v7", "v8", "fast-rng"]}

0 comments on commit b697362

Please sign in to comment.