Skip to content

Commit

Permalink
pyo3 0.22 - v0.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
konstin committed Jul 30, 2024
1 parent 34f47d9 commit 3cc8997
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 97 deletions.
162 changes: 67 additions & 95 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
# This file is adapted from `maturin generate-ci github`
name: Release

on:
push:
tags:
- v*

permissions:
contents: read

jobs:
crates-io:
Expand All @@ -16,157 +19,126 @@ jobs:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: cargo publish

# :(
# Re-require in release once fixed.
#macos:
# runs-on: macos-latest
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-python@v5
# with:
# python-version: 3.9
# architecture: x64
# - name: Build wheels - x86_64
# uses: PyO3/maturin-action@v1
# with:
# target: x86_64
# args: --release --strip --out dist --sdist
# - name: Build wheels - universal2
# uses: PyO3/maturin-action@v1
# with:
# args: --release --strip --target universal2-apple-darwin --out dist
# - name: Upload wheels
# uses: actions/upload-artifact@v3
# with:
# name: wheels
# path: dist

windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
args: --release --strip --out dist
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist

linux:
runs-on: ubuntu-latest
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
target: [ x86_64 ]
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
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.9
architecture: x64
python-version: 3.x
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --strip --out dist
target: ${{ matrix.platform.target }}
args: --release --out dist
sccache: 'true'
manylinux: auto
- name: Upload wheels
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: wheels
name: wheels-linux-${{ matrix.platform.target }}
path: dist

linux-cross:
runs-on: ubuntu-latest
musllinux:
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
target: [ aarch64, armv7, s390x, ppc64le, ppc64 ]
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: 3.9
python-version: 3.x
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
rust-toolchain: nightly
target: ${{ matrix.target }}
args: --release --strip --out dist
target: ${{ matrix.platform.target }}
args: --release --out dist
sccache: 'true'
manylinux: musllinux_1_2
- name: Upload wheels
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: wheels
name: wheels-musllinux-${{ matrix.platform.target }}
path: dist

musllinux:
runs-on: ubuntu-latest
windows:
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
target:
- x86_64-unknown-linux-musl
- i686-unknown-linux-musl
platform:
- runner: windows-latest
target: x64
- runner: windows-latest
target: x86
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.9
architecture: x64
python-version: 3.x
architecture: ${{ matrix.platform.target }}
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
manylinux: musllinux_1_2
args: --release --strip --out dist
target: ${{ matrix.platform.target }}
args: --release --out dist
sccache: 'true'
- name: Upload wheels
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: wheels
name: wheels-windows-${{ matrix.platform.target }}
path: dist

musllinux-cross:
sdist:
runs-on: ubuntu-latest
strategy:
matrix:
platform:
- target: aarch64-unknown-linux-musl
arch: aarch64
- target: armv7-unknown-linux-musleabihf
arch: armv7
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Build wheels
- name: Build sdist
uses: PyO3/maturin-action@v1
with:
rust-toolchain: nightly
target: ${{ matrix.platform.target }}
manylinux: musllinux_1_2
args: --release --strip --out dist
- name: Upload wheels
uses: actions/upload-artifact@v3
command: sdist
args: --out dist
- name: Upload sdist
uses: actions/upload-artifact@v4
with:
name: wheels
name: wheels-sdist
path: dist

release:
name: Release
runs-on: ubuntu-latest
needs: [ windows, linux, linux-cross, musllinux, musllinux-cross ]
if: "startsWith(github.ref, 'refs/tags/')"
needs: [linux, musllinux, windows, sdist]
environment: release
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v3
with:
name: wheels
- uses: actions/download-artifact@v4
- name: Publish to PyPI
uses: PyO3/maturin-action@v1
with:
command: upload
args: --skip-existing *
args: --non-interactive --skip-existing wheels-*/*
2 changes: 1 addition & 1 deletion 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
@@ -1,6 +1,6 @@
[package]
name = "pep508_rs"
version = "0.6.0"
version = "0.6.1"
description = "A library for python dependency specifiers, better known as PEP 508"
edition = "2021"
include = ["/src", "Changelog.md", "License-Apache", "License-BSD", "Readme.md", "pyproject.toml"]
Expand Down
4 changes: 4 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.6.1

* Update to pyo3 0.22

# 0.6.0

* Added `origin` to `Requirement`
Expand Down

0 comments on commit 3cc8997

Please sign in to comment.