Cut abi3-compatible wheels

This commit is contained in:
Charlie Marsh 2022-08-29 21:57:47 -04:00
parent 6d53d47bc6
commit 07ed1e3b01
4 changed files with 9 additions and 108 deletions

View File

@ -8,14 +8,11 @@ on:
jobs:
macos:
runs-on: macos-latest
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10']
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
python-version: 3.10
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
@ -32,12 +29,10 @@ jobs:
run: |
pip install ruff --no-index --find-links dist --force-reinstall
- name: Build wheels - universal2
if: ${{ matrix.python-version >= '3.8' || matrix.python-version == '3.10' }}
uses: messense/maturin-action@v1
with:
args: -i python --release --universal2 --out dist
- name: Install built wheel - universal2
if: ${{ matrix.python-version >= '3.8' }}
run: |
pip install ruff --no-index --find-links dist --force-reinstall
- name: Upload wheels
@ -50,13 +45,12 @@ jobs:
runs-on: windows-latest
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10']
target: [x64, x86]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
python-version: 3.10
architecture: ${{ matrix.target }}
- name: Update rustup
run: rustup self update
@ -84,7 +78,6 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10']
target: [x86_64, i686]
steps:
- uses: actions/checkout@v2
@ -96,13 +89,13 @@ jobs:
default: true
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
python-version: 3.10
- name: Build Wheels
uses: messense/maturin-action@v1
with:
target: ${{ matrix.target }}
manylinux: auto
args: -i ${{ matrix.python-version }} --release --out dist
args: -i 3.10 --release --out dist
- name: Install built wheel
if: matrix.target == 'x86_64'
run: |
@ -117,7 +110,6 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10']
target: [aarch64, armv7, s390x, ppc64le]
steps:
- uses: actions/checkout@v2
@ -126,7 +118,7 @@ jobs:
with:
target: ${{ matrix.target }}
manylinux: auto
args: -i ${{ matrix.python-version }} --release --out dist
args: -i 3.10 --release --out dist
- uses: uraimo/run-on-arch-action@v2.2.0
name: Install built wheel
with:
@ -143,7 +135,7 @@ jobs:
apt-get install -y curl python3.7-venv python3.9-venv python3.10-venv
run: |
ls -lrth /artifacts
PYTHON=python${{ matrix.python-version }}
PYTHON=python3.10
$PYTHON -m venv venv
venv/bin/pip install -U pip
venv/bin/pip install ruff --no-index --find-links /artifacts --force-reinstall

81
Cargo.lock generated
View File

@ -918,12 +918,6 @@ dependencies = [
"hashbrown",
]
[[package]]
name = "indoc"
version = "1.0.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "adab1eaa3408fb7f0c777a73e7465fd5656136fc93b670eb6df3c88c2c1344e3"
[[package]]
name = "inotify"
version = "0.7.1"
@ -1473,66 +1467,6 @@ dependencies = [
"unicode-ident",
]
[[package]]
name = "pyo3"
version = "0.17.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "12f72538a0230791398a0986a6518ebd88abc3fded89007b506ed072acc831e1"
dependencies = [
"cfg-if 1.0.0",
"indoc",
"libc",
"memoffset",
"parking_lot",
"pyo3-build-config",
"pyo3-ffi",
"pyo3-macros",
"unindent",
]
[[package]]
name = "pyo3-build-config"
version = "0.17.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fc4cf18c20f4f09995f3554e6bcf9b09bd5e4d6b67c562fdfaafa644526ba479"
dependencies = [
"once_cell",
"target-lexicon",
]
[[package]]
name = "pyo3-ffi"
version = "0.17.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a41877f28d8ebd600b6aa21a17b40c3b0fc4dfe73a27b6e81ab3d895e401b0e9"
dependencies = [
"libc",
"pyo3-build-config",
]
[[package]]
name = "pyo3-macros"
version = "0.17.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2e81c8d4bcc2f216dc1b665412df35e46d12ee8d3d046b381aad05f1fcf30547"
dependencies = [
"proc-macro2",
"pyo3-macros-backend",
"quote",
"syn",
]
[[package]]
name = "pyo3-macros-backend"
version = "0.17.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "85752a767ee19399a78272cc2ab625cd7d373b2e112b4b13db28de71fa892784"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "quote"
version = "1.0.21"
@ -1701,7 +1635,7 @@ dependencies = [
[[package]]
name = "ruff"
version = "0.0.18"
version = "0.0.19"
dependencies = [
"anyhow",
"bincode",
@ -1716,7 +1650,6 @@ dependencies = [
"filetime",
"log",
"notify",
"pyo3",
"rayon",
"regex",
"rustpython-parser",
@ -1985,12 +1918,6 @@ dependencies = [
"unicode-ident",
]
[[package]]
name = "target-lexicon"
version = "0.12.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c02424087780c9b71cc96799eaeddff35af2bc513278cda5c99fc1f5d026d3c1"
[[package]]
name = "tempfile"
version = "3.3.0"
@ -2179,12 +2106,6 @@ version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eec8e807a365e5c972debc47b8f06d361b37b94cfd18d48f7adc715fb86404dd"
[[package]]
name = "unindent"
version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "58ee9362deb4a96cef4d437d1ad49cffc9b9e92d202b6995674e928ce684f112"
[[package]]
name = "value-bag"
version = "1.0.0-alpha.9"

View File

@ -1,6 +1,6 @@
[package]
name = "ruff"
version = "0.0.18"
version = "0.0.19"
edition = "2021"
[lib]
@ -20,7 +20,6 @@ fern = { version = "0.6.1" }
filetime = { version = "0.2.17" }
log = { version = "0.4.17" }
notify = { version = "4.0.17" }
pyo3 = { version = "0.17.1", features = ["auto-initialize"] }
rayon = { version = "1.5.3" }
regex = { version = "1.6.0" }
rustpython-parser = { features = ["lalrpop"], git = "https://github.com/RustPython/RustPython.git", rev = "7a688e0b6c2904f286acac1e4af3f1628dd38589" }

View File

@ -119,18 +119,7 @@ cargo test
ruff is distributed on [PyPI](https://pypi.org/project/ruff/), and published via [`maturin`](https://github.com/PyO3/maturin).
For now, releases are cut and published manually:
```shell
for TARGET in x86_64-apple-darwin aarch64-apple-darwin
do
maturin publish --username crmarsh --skip-existing --target ${TARGET} -i \
/usr/local/opt/python@3.7/libexec/bin/python \
/usr/local/opt/python@3.8/libexec/bin/python \
/usr/local/opt/python@3.9/libexec/bin/python \
/usr/local/opt/python@3.10/libexec/bin/python
done
```
See: `.github/workflows/release.yaml`.
## Benchmarking