Skip to content

Commit

Permalink
Merge #1276
Browse files Browse the repository at this point in the history
1276: CI: Add Python 3.12 test jobs r=messense a=messense



Co-authored-by: messense <messense@icloud.com>
  • Loading branch information
bors[bot] and messense authored Nov 17, 2022
2 parents a64a5b2 + af1a7d9 commit ece510f
Showing 1 changed file with 20 additions and 11 deletions.
31 changes: 20 additions & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ jobs:
- macos-latest
- windows-latest
PYTHON_VERSION: |
- '3.12-dev'
- '3.7'
- '3.8'
- '3.9'
Expand Down Expand Up @@ -126,6 +127,13 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
architecture: 'x64'
- name: Set PYTHON_VERSION env var
shell: bash
run: |
set -ex
# remove -dev suffix
python_version=$(echo ${{ matrix.python-version }} | sed -e s/-dev//)
echo "PYTHON_VERSION=$python_version" >> "${GITHUB_ENV}"
- name: Install cffi
if: ${{ !contains(matrix.python-version, 'pypy') }}
run: pip install cffi
Expand Down Expand Up @@ -157,7 +165,7 @@ jobs:
# Caching
# Install gnu-tar because BSD tar is buggy
# https://github.com/actions/cache/issues/403
- name: Install GNU tar (Macos)
- name: Install GNU tar (macOS)
if: matrix.os == 'macos-latest'
run: |
brew install gnu-tar
Expand All @@ -178,6 +186,7 @@ jobs:
- name: cargo test
run: cargo nextest run --features password-storage
- name: test cross compiling with zig
if: ${{ !contains(matrix.python-version, '-dev') }}
shell: bash
run: |
set -ex
Expand All @@ -186,13 +195,13 @@ jobs:
rustup target add aarch64-apple-darwin
# abi3
cargo run -- build -i ${{ matrix.python-version }} -m test-crates/pyo3-pure/Cargo.toml --target aarch64-unknown-linux-gnu --zig
cargo run -- build -i ${{ matrix.python-version }} -m test-crates/pyo3-pure/Cargo.toml --target aarch64-unknown-linux-musl --zig
if [[ "${{ matrix.python-version }}" != "pypy"* ]]; then
cargo run -- build -i ${{ matrix.python-version }} -m test-crates/pyo3-pure/Cargo.toml --target aarch64-apple-darwin --zig
cargo run -- build -i $PYTHON_VERSION -m test-crates/pyo3-pure/Cargo.toml --target aarch64-unknown-linux-gnu --zig
cargo run -- build -i $PYTHON_VERSION -m test-crates/pyo3-pure/Cargo.toml --target aarch64-unknown-linux-musl --zig
if [[ "$PYTHON_VERSION" != "pypy"* ]]; then
cargo run -- build -i $PYTHON_VERSION -m test-crates/pyo3-pure/Cargo.toml --target aarch64-apple-darwin --zig
fi
if [[ "${{ matrix.python-version }}" == "3.1"* ]]; then
if [[ "$PYTHON_VERSION" == "3.1"* ]]; then
# Check abi3 wheels with abi3audit on CPython only
pip install abi3audit
abi3audit test-crates/pyo3-pure/target/wheels/*.whl
Expand All @@ -201,14 +210,14 @@ jobs:
twine check --strict test-crates/pyo3-pure/target/wheels/*.whl
# non-abi3
cargo run -- build -i ${{ matrix.python-version }} -m test-crates/pyo3-mixed/Cargo.toml --target aarch64-unknown-linux-gnu --zig
if [[ "${{ matrix.python-version }}" != "pypy"* ]]; then
cargo run -- build -i ${{ matrix.python-version }} -m test-crates/pyo3-mixed/Cargo.toml --target aarch64-apple-darwin --zig
cargo run -- build -i $PYTHON_VERSION -m test-crates/pyo3-mixed/Cargo.toml --target aarch64-unknown-linux-gnu --zig
if [[ "$PYTHON_VERSION" != "pypy"* ]]; then
cargo run -- build -i $PYTHON_VERSION -m test-crates/pyo3-mixed/Cargo.toml --target aarch64-apple-darwin --zig
fi
# Check wheels with twine
twine check --strict test-crates/pyo3-mixed/target/wheels/*.whl
- name: test cross compiling windows wheel
if: ${{ matrix.os == 'ubuntu-latest' && !contains(matrix.python-version, 'pypy') }}
if: ${{ matrix.os == 'ubuntu-latest' && !contains(matrix.python-version, 'pypy') && !contains(matrix.python-version, '-dev') }}
run: |
set -ex
sudo apt-get install -y mingw-w64
Expand All @@ -221,7 +230,7 @@ jobs:
cargo run -- build -m test-crates/pyo3-pure/Cargo.toml --target x86_64-pc-windows-msvc
# no-abi3
cargo run -- build -i python${{ matrix.python-version }} -m test-crates/pyo3-mixed/Cargo.toml --target x86_64-pc-windows-msvc
cargo run -- build -i "python${PYTHON_VERSION}" -m test-crates/pyo3-mixed/Cargo.toml --target x86_64-pc-windows-msvc
- name: test compiling with PYO3_CONFIG_FILE
shell: bash
run: |
Expand Down

0 comments on commit ece510f

Please sign in to comment.