Skip to content

Commit 588802a

Browse files
[GitHub] Add python 3.7 to libclang python test (#77219)
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.
1 parent 75f2321 commit 588802a

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

.github/workflows/libclang-python-tests.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,15 @@ jobs:
3030
check-clang-python:
3131
# Build libclang and then run the libclang Python binding's unit tests.
3232
name: Build and run Python unit tests
33+
strategy:
34+
fail-fast: false
35+
matrix:
36+
python-version: ["3.7", "3.11"]
3337
uses: ./.github/workflows/llvm-project-tests.yml
3438
with:
3539
build_target: check-clang-python
3640
projects: clang
3741
# There is an issue running on "windows-2019".
3842
# See https://github.com/llvm/llvm-project/issues/76601#issuecomment-1873049082.
3943
os_list: '["ubuntu-latest"]'
44+
python_version: ${{ matrix.python-version }}

.github/workflows/llvm-project-tests.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ on:
1515
os_list:
1616
required: false
1717
default: '["ubuntu-latest", "windows-2019", "macOS-11"]'
18+
python_version:
19+
required: false
20+
type: string
21+
default: '3.11'
1822
workflow_call:
1923
inputs:
2024
build_target:
@@ -38,6 +42,11 @@ on:
3842
# https://github.com/actions/virtual-environments/issues/5900
3943
default: '["ubuntu-latest", "windows-2019", "macOS-11"]'
4044

45+
python_version:
46+
required: false
47+
type: string
48+
default: '3.11'
49+
4150
concurrency:
4251
# Skip intermediate builds: always.
4352
# Cancel intermediate builds: only if it is a pull request build.
@@ -67,7 +76,7 @@ jobs:
6776
- name: Setup Python
6877
uses: actions/setup-python@v4
6978
with:
70-
python-version: '3.11'
79+
python-version: ${{ inputs.python_version }}
7180
- name: Install Ninja
7281
uses: llvm/actions/install-ninja@main
7382
# actions/checkout deletes any existing files in the new git directory,

0 commit comments

Comments
 (0)