[llvm] [Github] Fetch all commits in PR for code formatting checks (PR #69766)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 20 14:27:33 PDT 2023
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-github-workflow
Author: Aiden Grossman (boomanaiden154)
<details>
<summary>Changes</summary>
This patch ensures that all commits from a PR are fetched before running
the rest of the job. This allows the job to scale to any number of
commits per PR. In addition, this significantly reduces the time taken
in the files-changed step where the job would itself try to unshallow
the clone, but do so in some inefficient way. That step which previously
took ~10 minutes now takes 3 seconds after this patch.
---
Full diff: https://github.com/llvm/llvm-project/pull/69766.diff
1 Files Affected:
- (modified) .github/workflows/pr-code-format.yml (+1-2)
``````````diff
diff --git a/.github/workflows/pr-code-format.yml b/.github/workflows/pr-code-format.yml
index 3a91ffb0b1ad9a7..8ca27c2f6363b16 100644
--- a/.github/workflows/pr-code-format.yml
+++ b/.github/workflows/pr-code-format.yml
@@ -10,14 +10,13 @@ jobs:
- name: Fetch LLVM sources
uses: actions/checkout at v4
with:
- fetch-depth: 2
+ fetch-depth: ${{ github.event.pull_request.commits }}
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files at v39
with:
separator: ","
- fetch_depth: 100 # Fetches only the last 10 commits
- name: "Listed files"
run: |
``````````
</details>
https://github.com/llvm/llvm-project/pull/69766
More information about the llvm-commits
mailing list