Skip to content

Commit

Permalink
Add Python 3.12 to CI
Browse files Browse the repository at this point in the history
Define a separate set of dependency versions for Python 3.12 since it's so new
and requires much newer minimum library versions than other Python versions.
  • Loading branch information
mbrukman committed Apr 7, 2024
1 parent 49d815d commit e24d1c8
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
fail-fast: false
matrix:
os: ['ubuntu-22.04']
python: ['3.8', '3.9', '3.10', '3.11']
python: ['3.8', '3.9', '3.10', '3.11', '3.12']

runs-on: ${{ matrix.os }}
name: ${{ matrix.os }} with Python ${{ matrix.python }}
Expand All @@ -42,8 +42,13 @@ jobs:
python-version: ${{ matrix.python }}
cache: 'pip'

- name: Install Python core deps
- name: Install Python core deps (3.8 — 3.11)
run: python -m pip install -r requirements.txt
if: ${{ matrix.python != '3.12' }}

- name: Install Python core deps (3.12)
run: python -m pip install -r requirements-3.12.txt
if: ${{ matrix.python == '3.12' }}

- name: Install Python testing deps
run: python -m pip install -r requirements-test.txt
Expand Down
6 changes: 6 additions & 0 deletions requirements-3.12.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# These requirements are specifically for Python 3.12; earlier Python versions
# accept the dependency versions in `requirements.txt`.

tensorflow ~= 2.16.1
keras ~= 3.0.0
numpy ~= 1.24.0
3 changes: 3 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# These versions are compatible for Python 3.8-3.11; Python 3.12 has its own
# dependency versions defined in `requirements-3.12.txt`.

tensorflow ~= 2.12.0
keras ~= 2.12.0
numpy ~= 1.24.0

0 comments on commit e24d1c8

Please sign in to comment.