[llvm] [Github] Make PR formatting job only run with C/C++ changes (PR #69556)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 18 20:37:36 PDT 2023
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-github-workflow
Author: Aiden Grossman (boomanaiden154)
<details>
<summary>Changes</summary>
Currently the PR formatting job only runs clang-format. There isn't a lot of utility in running it if there aren't any C/C++ changes as there will be nothing to format. This isn't super noisy currently as the job doesn't fail if there aren't any C/C++ changes, but it's a bit of a waste.
In addition, this patch names the code formatting job "Check C++ Formatting" to make it clear that this job only checks C/C++ formatting rather than Python formatting/other languages.
---
Full diff: https://github.com/llvm/llvm-project/pull/69556.diff
1 Files Affected:
- (modified) .github/workflows/pr-code-format.yml (+11-2)
``````````diff
diff --git a/.github/workflows/pr-code-format.yml b/.github/workflows/pr-code-format.yml
index 3a91ffb0b1ad9a7..060646df6ae4759 100644
--- a/.github/workflows/pr-code-format.yml
+++ b/.github/workflows/pr-code-format.yml
@@ -1,10 +1,19 @@
name: "Check code formatting"
-on: pull_request_target
+
+on:
+ pull_request_target:
+ paths:
+ - '**/*.cpp'
+ - '**/*.c'
+ - '**/*.h'
+ - '**/*.inc'
+
permissions:
pull-requests: write
jobs:
- code_formatter:
+ cpp_code_formatter:
+ name: "Check C++ Formatting"
runs-on: ubuntu-latest
steps:
- name: Fetch LLVM sources
``````````
</details>
https://github.com/llvm/llvm-project/pull/69556
More information about the llvm-commits
mailing list