Skip to content

Commit

Permalink
Merge pull request #970 from messense/backport-from-0.13
Browse files Browse the repository at this point in the history
Backport some changes from 0.13 and release v0.12.20
  • Loading branch information
messense authored Jun 16, 2022
2 parents 68652c7 + 0df1493 commit a67b38a
Show file tree
Hide file tree
Showing 23 changed files with 275 additions and 104 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
name: Docker Hub
url: https://ghcr.io/pyo3/maturin
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: crazy-max/ghaction-docker-meta@v2
id: meta
with:
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
Expand All @@ -31,7 +31,7 @@ jobs:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
Expand All @@ -46,12 +46,14 @@ jobs:
black:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.x'
- uses: psf/black@22.3.0

spellcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: codespell-project/actions-codespell@master
14 changes: 7 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
name: crates.io
url: ${{ steps.set_url.outputs.env_url }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
# Largely inspired by https://github.com/starship/starship/blob/35a0a20f5c4fea6a08e1b91ff631b089eef8fc50/.github/workflows/deploy.yml
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
Expand Down Expand Up @@ -169,10 +169,10 @@ jobs:
RUSTUP_HOME: /root/.rustup
CARGO_HOME: /root/.cargo
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Build wheel
run: |
sudo python3 -m pip install --pre maturin
sudo python3 -m pip install maturin
maturin build --release -b bin -o dist --no-sdist \
--target ${{ matrix.platform.target }} \
--manylinux ${{ matrix.platform.manylinux }} musllinux_1_1 \
Expand Down Expand Up @@ -208,7 +208,7 @@ jobs:
container:
image: docker://${{ matrix.platform.image }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
# powerpc64le-unknown-linux-musl doesn't have official std library release
- uses: actions-rs/toolchain@v1
if: matrix.platform.target == 's390x-unknown-linux-gnu'
Expand All @@ -219,7 +219,7 @@ jobs:
target: ${{ matrix.platform.target }}
- name: Build wheel
run: |
sudo python3 -m pip install --pre maturin
sudo python3 -m pip install maturin
maturin build --release -b bin -o dist --no-sdist \
--target ${{ matrix.platform.target }} \
--manylinux ${{ matrix.platform.manylinux }} ${{ matrix.platform.musllinux }} \
Expand Down Expand Up @@ -250,7 +250,7 @@ jobs:
- uses: actions/download-artifact@v2
with:
name: wheels
- uses: actions/setup-python@v2
- uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Publish
Expand Down
38 changes: 25 additions & 13 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- main
- release-0.12
pull_request:
workflow_dispatch:

Expand All @@ -20,17 +21,17 @@ jobs:
os: [ ubuntu-latest, macos-latest, windows-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.7"
- uses: actions/setup-python@v2
- uses: actions/setup-python@v4
with:
python-version: "3.8"
- uses: actions/setup-python@v2
- uses: actions/setup-python@v4
with:
python-version: "3.9"
- uses: actions/setup-python@v2
- uses: actions/setup-python@v4
with:
python-version: "3.10.0"
- name: Install cffi and virtualenv
Expand All @@ -51,6 +52,7 @@ jobs:
if: matrix.os == 'macos-latest'
shell: bash
run: |
set -ex
sudo xcode-select -s /Applications/Xcode.app
bindir="$(xcode-select --print-path)/Toolchains/XcodeDefault.xctoolchain/usr/bin"
echo "CC=${bindir}/clang" >> "${GITHUB_ENV}"
Expand Down Expand Up @@ -80,28 +82,34 @@ jobs:
with:
command: test
args: --features password-storage
- uses: actions/setup-python@v2
- uses: actions/setup-python@v4
with:
python-version: "pypy-3.7"
- name: test build pypy wheel
shell: bash
run: |
set -ex
cargo run -- build --no-sdist -i pypy3 -m test-crates/pyo3-mixed-submodule/Cargo.toml
pypy3 -m pip install --force-reinstall --no-index --find-links test-crates/pyo3-mixed-submodule/target/wheels pyo3-mixed-submodule
pypy3 -m pip install pytest
pypy3 -m pytest test-crates/pyo3-mixed-submodule/tests/
- name: test build pypy wheel with abi3
shell: bash
run: |
set -ex
cargo run -- build --no-sdist -i pypy3 -m test-crates/pyo3-pure/Cargo.toml --cargo-extra-args="-vv"
pypy3 -m pip install --force-reinstall --no-index --find-links test-crates/pyo3-pure/target/wheels pyo3-pure
pypy3 -m pip install pytest
pypy3 -m pytest test-crates/pyo3-pure/test_pyo3_pure.py
cargo run -- pep517 build-wheel -i pypy3 -m test-crates/pyo3-pure/Cargo.toml --cargo-extra-args="-vv"
- uses: actions/setup-python@v2
- uses: actions/setup-python@v4
with:
python-version: "3.10.0"
- name: test cross compiling with zig
shell: bash
run: |
set -ex
rustup target add aarch64-unknown-linux-gnu
rustup target add aarch64-unknown-linux-musl
rustup target add aarch64-apple-darwin
Expand All @@ -121,6 +129,7 @@ jobs:
- name: test cross compiling windows wheel
if: matrix.os == 'ubuntu-latest'
run: |
set -ex
sudo apt-get install -y mingw-w64
rustup component add llvm-tools-preview
rustup target add x86_64-pc-windows-gnu
Expand All @@ -135,6 +144,7 @@ jobs:
- name: test compiling with PYO3_CONFIG_FILE
shell: bash
run: |
set -ex
rustup target add x86_64-unknown-linux-gnu
export PYO3_CONFIG_FILE=$(pwd)/test-crates/pyo3-mixed/pyo3-config.txt
cargo run -- build --no-sdist -m test-crates/pyo3-mixed/Cargo.toml --target x86_64-unknown-linux-gnu --zig
Expand All @@ -144,9 +154,10 @@ jobs:
runs-on: ubuntu-latest
container: alpine:edge
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Install build requirements
run: |
set -ex
apk add cargo python3-dev libffi-dev py3-pip
pip3 install cffi virtualenv
- name: Cache cargo build
Expand Down Expand Up @@ -176,7 +187,7 @@ jobs:
manylinux: [ 'manylinux_2_24' ]
container: quay.io/pypa/${{ matrix.manylinux }}_x86_64
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
id: rustup
with:
Expand Down Expand Up @@ -204,8 +215,8 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.8"
- uses: docker/setup-buildx-action@v1
Expand Down Expand Up @@ -273,10 +284,11 @@ jobs:
abi: pp38-pypy38_pp73
python: pypy3.8
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Build Wheels
run: |
echo 'curl -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable --profile minimal
echo 'set -ex
curl -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable --profile minimal
source ~/.cargo/env
rustup target add ${{ matrix.platform.target }}
Expand Down
Loading

0 comments on commit a67b38a

Please sign in to comment.