Skip to content

Commit 458fa12

Browse files
authored
[Github] Allow CI to run different Python version tests at once (#102455)
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 #77219 (comment). 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.
1 parent 9ddff0b commit 458fa12

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,6 @@ on:
2222
- '.github/workflows/libclang-python-tests.yml'
2323
- '.github/workflows/llvm-project-tests.yml'
2424

25-
concurrency:
26-
# Skip intermediate builds: always.
27-
# Cancel intermediate builds: only if it is a pull request build.
28-
group: ${{ github.workflow }}-${{ github.ref }}
29-
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
30-
3125
jobs:
3226
check-clang-python:
3327
# Build libclang and then run the libclang Python binding's unit tests.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ concurrency:
5151
# Cancel intermediate builds: only if it is a pull request build.
5252
# If the group name here is the same as the group name in the workflow that includes
5353
# this one, then the action will try to wait on itself and get stuck.
54-
group: llvm-project-${{ github.workflow }}-${{ inputs.projects }}${{ github.ref }}
54+
group: llvm-project-${{ github.workflow }}-${{ inputs.projects }}-${{ inputs.python_version }}${{ github.ref }}
5555
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
5656

5757
jobs:

0 commit comments

Comments
 (0)