Skip to content

Commit

Permalink
CI: Add Python 3.12 test jobs (#1276)
Browse files Browse the repository at this point in the history
* CI: Add Python 3.12 test jobs

* Use Python 3.12 release version

* Fix typo: compaible -> compatible

---------

Co-authored-by: konstin <konstin@mailbox.org>
  • Loading branch information
messense and konstin authored Oct 4, 2023
1 parent 36ec170 commit 2e7e8ef
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 12 deletions.
31 changes: 20 additions & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ jobs:
- '3.9'
- '3.10'
- '3.11'
- '3.12'
- 'pypy3.9'
- 'pypy3.10'
Expand Down Expand Up @@ -108,6 +109,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 @@ -136,7 +144,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: startsWith(matrix.os, 'macos')
run: |
brew install gnu-tar
Expand All @@ -152,6 +160,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 @@ -160,13 +169,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 @@ -175,14 +184,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 @@ -195,7 +204,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
2 changes: 1 addition & 1 deletion src/auditwheel/audit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ pub enum AuditWheelError {
/// libraries with blacked-list symbols.
#[error("Your library is not {0} compliant because it depends on black-listed symbols: {1:?}")]
BlackListedSymbolsError(Policy, Vec<String>),
/// The elf file isn't manylinux/musllinux compaible. Contains unsupported architecture
/// The elf file isn't manylinux/musllinux compatible. Contains unsupported architecture
#[error("Your library is not {0} compliant because it has unsupported architecture: {1}")]
UnsupportedArchitecture(Policy, String),
/// This platform tag isn't defined by auditwheel yet
Expand Down

0 comments on commit 2e7e8ef

Please sign in to comment.