From 648c75216a41e5cbf10225a4ef6824d4fb4b7a2d Mon Sep 17 00:00:00 2001 From: Pavel Chekin Date: Fri, 19 Jul 2024 15:52:54 -0700 Subject: [PATCH] Add Python 3.12 to the CI test matrix (#1660) Fixes #1018. --- .github/actions/setup-ipex/action.yml | 7 +++++++ .github/workflows/build-test-python.yml | 4 ++-- .github/workflows/build-test-reusable.yml | 2 ++ .github/workflows/nightly-wheels.yml | 1 + 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/actions/setup-ipex/action.yml b/.github/actions/setup-ipex/action.yml index 02c24c4aa0..666efffc5a 100644 --- a/.github/actions/setup-ipex/action.yml +++ b/.github/actions/setup-ipex/action.yml @@ -31,6 +31,13 @@ runs: echo "PYTHON_VERSION=$PYTHON_VERSION" >> "$GITHUB_ENV" fi + # IPEX requires setuptools for Python 3.12 + - name: Install setuptools (Python 3.12) + if: ${{ env.PYTHON_VERSION == '3.12' }} + shell: bash + run: | + pip install setuptools + - name: Load IPEX wheels from a cache id: ipex-cache uses: ./.github/actions/load diff --git a/.github/workflows/build-test-python.yml b/.github/workflows/build-test-python.yml index f43302c163..4a7f34cb23 100644 --- a/.github/workflows/build-test-python.yml +++ b/.github/workflows/build-test-python.yml @@ -63,9 +63,9 @@ jobs: id: matrix run: | if [[ -n "${{ inputs.runner_label }}" ]]; then - matrix='{"python": ["3.9", "3.10", "3.11"]}' + matrix='{"python": ["3.9", "3.10", "3.11", "3.12"]}' else - matrix='{"python": ["3.9", "3.10", "3.11"], "driver": ["rolling", "lts"]}' + matrix='{"python": ["3.9", "3.10", "3.11", "3.12"], "driver": ["rolling", "lts"]}' fi echo "matrix=$matrix" | tee -a $GITHUB_OUTPUT diff --git a/.github/workflows/build-test-reusable.yml b/.github/workflows/build-test-reusable.yml index 23573412e7..93604c77f1 100644 --- a/.github/workflows/build-test-reusable.yml +++ b/.github/workflows/build-test-reusable.yml @@ -235,6 +235,7 @@ jobs: echo "TRANSFORMERS_VERSION=$TRANSFORMERS_VERSION" | tee -a $GITHUB_ENV - name: Install transformers + if: ${{ inputs.python_version != '3.12' }} uses: ./.github/actions/install-dependency with: package: transformers @@ -243,6 +244,7 @@ jobs: try-tag-prefix: v - name: Run E2E test + if: ${{ inputs.python_version != '3.12' }} run: | # Set WORKSPACE for inductor_xpu_test.sh to make sure it creates "inductor_log" outside of pytorch cloned directory export WORKSPACE=$GITHUB_WORKSPACE diff --git a/.github/workflows/nightly-wheels.yml b/.github/workflows/nightly-wheels.yml index 4fb9b1be05..5b4e7ec9cb 100644 --- a/.github/workflows/nightly-wheels.yml +++ b/.github/workflows/nightly-wheels.yml @@ -23,6 +23,7 @@ jobs: - "3.9" - "3.10" - "3.11" + - "3.12" defaults: run: shell: bash -noprofile --norc -eo pipefail -c "source /home/runner/intel/oneapi/setvars.sh > /dev/null; source {0}"