[llvm] [Github] Allow CI to run different Python version tests at once (PR #102455)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 8 05:35:55 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-github-workflow
Author: Jannick Kremer (DeinAlptraum)
<details>
<summary>Changes</summary>
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 was however not added to 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.
---
Full diff: https://github.com/llvm/llvm-project/pull/102455.diff
2 Files Affected:
- (modified) .github/workflows/libclang-python-tests.yml (-6)
- (modified) .github/workflows/llvm-project-tests.yml (+1-1)
``````````diff
diff --git a/.github/workflows/libclang-python-tests.yml b/.github/workflows/libclang-python-tests.yml
index 43ded0af3ac21c..801a701724789a 100644
--- a/.github/workflows/libclang-python-tests.yml
+++ b/.github/workflows/libclang-python-tests.yml
@@ -22,12 +22,6 @@ on:
- '.github/workflows/libclang-python-tests.yml'
- '.github/workflows/llvm-project-tests.yml'
-concurrency:
- # Skip intermediate builds: always.
- # Cancel intermediate builds: only if it is a pull request build.
- group: ${{ github.workflow }}-${{ github.ref }}
- cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
-
jobs:
check-clang-python:
# Build libclang and then run the libclang Python binding's unit tests.
diff --git a/.github/workflows/llvm-project-tests.yml b/.github/workflows/llvm-project-tests.yml
index 17a54be16badc1..95a3890c0d2dc7 100644
--- a/.github/workflows/llvm-project-tests.yml
+++ b/.github/workflows/llvm-project-tests.yml
@@ -51,7 +51,7 @@ concurrency:
# Cancel intermediate builds: only if it is a pull request build.
# If the group name here is the same as the group name in the workflow that includes
# this one, then the action will try to wait on itself and get stuck.
- group: llvm-project-${{ github.workflow }}-${{ inputs.projects }}${{ github.ref }}
+ group: llvm-project-${{ github.workflow }}-${{ inputs.projects }}-${{ inputs.python_version }}${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
jobs:
``````````
</details>
https://github.com/llvm/llvm-project/pull/102455
More information about the llvm-commits
mailing list