[llvm] [GitHub] Add python 3.7 to libclang python test (PR #77219)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Jan 6 18:30:18 PST 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-github-workflow
Author: Craig Hesling (linux4life798)
<details>
<summary>Changes</summary>
This enables the libclang python binding test to check
the oldest version of Python supported in addition
to the normal python version.
It is important to check this for issue #<!-- -->76664, since
many new mainstream python type annotation features
and best practices are not compatible with older
versions of python.
Additionally, frustration around ever increasing
platform dependencies and versions has been raised.
This will help ensure that python maintains reasonable
backwards compatibility.
Adding this additional build step will increase the
run time, but this should always be minimal, since
the additional libclang compilation should see 100%
cache hit rate.
Issue #<!-- -->76664.
Fixes #<!-- -->76601.
---
Full diff: https://github.com/llvm/llvm-project/pull/77219.diff
2 Files Affected:
- (modified) .github/workflows/libclang-python-tests.yml (+5)
- (modified) .github/workflows/llvm-project-tests.yml (+10-1)
``````````diff
diff --git a/.github/workflows/libclang-python-tests.yml b/.github/workflows/libclang-python-tests.yml
index 73edb6cf3bad26..e12acbc0f6ce8c 100644
--- a/.github/workflows/libclang-python-tests.yml
+++ b/.github/workflows/libclang-python-tests.yml
@@ -30,6 +30,10 @@ jobs:
check-clang-python:
# Build libclang and then run the libclang Python binding's unit tests.
name: Build and run Python unit tests
+ strategy:
+ fail-fast: false
+ matrix:
+ python-version: ["3.7", "3.11"]
uses: ./.github/workflows/llvm-project-tests.yml
with:
build_target: check-clang-python
@@ -37,3 +41,4 @@ jobs:
# There is an issue running on "windows-2019".
# See https://github.com/llvm/llvm-project/issues/76601#issuecomment-1873049082.
os_list: '["ubuntu-latest"]'
+ python_version: ${{ matrix.python-version }}
diff --git a/.github/workflows/llvm-project-tests.yml b/.github/workflows/llvm-project-tests.yml
index 594831ee6b5f52..a6caa94f2d158a 100644
--- a/.github/workflows/llvm-project-tests.yml
+++ b/.github/workflows/llvm-project-tests.yml
@@ -15,6 +15,10 @@ on:
os_list:
required: false
default: '["ubuntu-latest", "windows-2019", "macOS-12"]'
+ python_version:
+ required: false
+ type: string
+ default: '3.11'
workflow_call:
inputs:
build_target:
@@ -36,6 +40,11 @@ on:
# https://developercommunity.visualstudio.com/t/Prev-Issue---with-__assume-isnan-/1597317
default: '["ubuntu-latest", "windows-2019", "macOS-12"]'
+ python_version:
+ required: false
+ type: string
+ default: '3.11'
+
concurrency:
# Skip intermediate builds: always.
# Cancel intermediate builds: only if it is a pull request build.
@@ -65,7 +74,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python at v4
with:
- python-version: '3.11'
+ python-version: ${{ inputs.python_version }}
- name: Install Ninja
uses: llvm/actions/install-ninja at main
# actions/checkout deletes any existing files in the new git directory,
``````````
</details>
https://github.com/llvm/llvm-project/pull/77219
More information about the llvm-commits
mailing list