Skip to content

Commit

Permalink
Add Python 3.12 to CI (#21)
Browse files Browse the repository at this point in the history
* Add Python 3.12 to CI

* Bump maturin to recent commit supporting 3.12

* Remove --universal2 and add python3.12-venv

* fail-fast: false

---------

Co-authored-by: Miles Granger <[email protected]>
  • Loading branch information
dan-blanchard and milesgranger authored Oct 4, 2023
1 parent 6ff872d commit b920ead
Show file tree
Hide file tree
Showing 5 changed files with 78 additions and 80 deletions.
24 changes: 10 additions & 14 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ jobs:
macos:
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
Expand All @@ -34,15 +35,6 @@ jobs:
- name: Install built wheel - x86_64
run: |
pip install gilknocker --no-index --find-links dist --force-reinstall
- name: Build wheels - universal2
if: ${{ matrix.python-version >= '3.8' || contains(fromJson('["3.10", "3.11"]'), matrix.python-version) }}
uses: PyO3/maturin-action@v1
with:
args: -i python --release --universal2 --out dist
- name: Install built wheel - universal2
if: ${{ matrix.python-version >= '3.8' || contains(fromJson('["3.10", "3.11"]'), matrix.python-version) }}
run: |
pip install gilknocker --no-index --find-links dist --force-reinstall
- name: Python UnitTest
run: |
pip install -r requirements-dev.txt
Expand All @@ -58,7 +50,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
target: [x64, x86]
steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -97,7 +89,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
target: [x86_64, i686]
steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -131,6 +123,7 @@ jobs:
pypy-linux:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python:
- pypy-3.7
Expand Down Expand Up @@ -169,6 +162,7 @@ jobs:
pypy-macos:
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
python-version: [ pypy-3.7, pypy-3.8, pypy-3.9 ]
steps:
Expand Down Expand Up @@ -209,13 +203,15 @@ jobs:
linux-cross:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python:
- '3.7'
- '3.8'
- '3.9'
- '3.10'
- '3.11'
- '3.12'
target: [aarch64, armv7, s390x, ppc64le]
include:
- python: pypy3.7
Expand Down Expand Up @@ -257,7 +253,7 @@ jobs:
apt-get install -y --no-install-recommends python3 python3-venv software-properties-common
add-apt-repository ppa:deadsnakes/ppa
apt-get update
apt-get install -y curl python3.7-venv python3.9-venv python3.10-venv python3.11-venv
apt-get install -y curl python3.7-venv python3.9-venv python3.10-venv python3.11-venv python3.12-venv
run: |
ls -lrth /artifacts
PYTHON=python${{ matrix.python }}
Expand Down Expand Up @@ -289,4 +285,4 @@ jobs:
TWINE_PASSWORD: ${{ secrets.TWINE_TOKEN }}
run: |
pip install --upgrade wheel pip setuptools twine
twine upload --skip-existing *
twine upload --skip-existing *
128 changes: 65 additions & 63 deletions 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
Expand Up @@ -19,5 +19,5 @@ codegen-units = 1
opt-level = 3

[dependencies]
pyo3 = { version = "0.18.2", features = ["extension-module"] }
pyo3 = { git = "https://github.com/PyO3/pyo3.git", rev="90cc69b", features = ["extension-module"] }
parking_lot = "^0.12"
Loading

0 comments on commit b920ead

Please sign in to comment.