[llvm] [Github] Force files changed step in docs action to use GH API (PR #69763)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 20 12:53:19 PDT 2023
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-github-workflow
Author: Aiden Grossman (boomanaiden154)
<details>
<summary>Changes</summary>
This patch forces the files changed step in the test documentation Github action to use the Github API to look for changed files rather than using the local git history. Using the local git history takes a significant amount of time(~30m with no depth limit, ~10m with a depth limit of 100) while using the GH API is virtually instantaneous. This uses an extra GH API request, but given the frequency that this action runs with, that shouldn't be an issue.
---
Full diff: https://github.com/llvm/llvm-project/pull/69763.diff
1 Files Affected:
- (modified) .github/workflows/docs.yml (+9-9)
``````````diff
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml
index d58c7d51e0e44ab..0603dfa3df19b21 100644
--- a/.github/workflows/docs.yml
+++ b/.github/workflows/docs.yml
@@ -25,6 +25,15 @@ jobs:
name: "Test documentation build"
runs-on: ubuntu-latest
steps:
+ - name: Get subprojects that have doc changes
+ id: docs-changed-subprojects
+ uses: tj-actions/changed-files at v39
+ with:
+ files_yaml: |
+ llvm:
+ - 'llvm/docs/**'
+ clang:
+ - 'clang/docs/**'
- name: Fetch LLVM sources
uses: actions/checkout at v4
with:
@@ -41,15 +50,6 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install -y cmake ninja-build
- - name: Get subprojects that have doc changes
- id: docs-changed-subprojects
- uses: tj-actions/changed-files at v39
- with:
- files_yaml: |
- llvm:
- - 'llvm/docs/**'
- clang:
- - 'clang/docs/**'
- name: Build LLVM docs
if: steps.docs-changed-subprojects.outputs.llvm_any_changed == 'true'
run: |
``````````
</details>
https://github.com/llvm/llvm-project/pull/69763
More information about the llvm-commits
mailing list