Previously, #77219 added a `python_version` parameter for the Github Actions CI Ninja-based build tests. This is necessary to run component tests on different Python versions, as is currently done by the only user of this parameter, the [Libclang Python bindings test](https://github.com/llvm/llvm-project/blob/main/.github/workflows/libclang-python-tests.yml). The parameter is missing from the concurrency group of the workflow, meaning that starting the workflow with two different Python versions immediately cancels one of them, as pointed out by https://github.com/llvm/llvm-project/pull/77219#issuecomment-1937105822. This change fixes that problem by making the Python version part of the concurrency group key, and removes the superfluous concurrency group from the calling workflow.
42 lines
1.2 KiB
YAML
42 lines
1.2 KiB
YAML
name: Libclang Python Binding Tests
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- 'main'
|
|
paths:
|
|
- 'clang/bindings/python/**'
|
|
- 'clang/tools/libclang/**'
|
|
- 'clang/CMakeList.txt'
|
|
- '.github/workflows/libclang-python-tests.yml'
|
|
- '.github/workflows/llvm-project-tests.yml'
|
|
pull_request:
|
|
paths:
|
|
- 'clang/bindings/python/**'
|
|
- 'clang/tools/libclang/**'
|
|
- 'clang/CMakeList.txt'
|
|
- '.github/workflows/libclang-python-tests.yml'
|
|
- '.github/workflows/llvm-project-tests.yml'
|
|
|
|
jobs:
|
|
check-clang-python:
|
|
# Build libclang and then run the libclang Python binding's unit tests.
|
|
name: Build and run Python unit tests
|
|
if: github.repository == 'llvm/llvm-project'
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
python-version: ["3.8", "3.11"]
|
|
uses: ./.github/workflows/llvm-project-tests.yml
|
|
with:
|
|
build_target: check-clang-python
|
|
projects: clang
|
|
# 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 }}
|