[llvm] [Github] Simplify checkout in docs test workflow (PR #132975)
Aiden Grossman via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 25 12:22:41 PDT 2025
https://github.com/boomanaiden154 updated https://github.com/llvm/llvm-project/pull/132975
>From 91fb6a85ff32873218413fb4c78e3d7ea6689afc Mon Sep 17 00:00:00 2001
From: Aiden Grossman <aidengrossman at google.com>
Date: Tue, 25 Mar 2025 19:13:38 +0000
Subject: [PATCH] [Github] Simplify checkout in docs test workflow
---
.github/workflows/docs.yml | 17 +++++------------
1 file changed, 5 insertions(+), 12 deletions(-)
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml
index b4e997de84679..7fe188257980e 100644
--- a/.github/workflows/docs.yml
+++ b/.github/workflows/docs.yml
@@ -54,19 +54,16 @@ jobs:
runs-on: ubuntu-24.04
if: github.repository == 'llvm/llvm-project'
steps:
- # Don't fetch before checking for file changes to force the file changes
- # action to use the Github API in pull requests. If it's a push to a
- # branch we can't use the Github API to get the diff, so we need to have
- # a local checkout beforehand.
- - name: Fetch LLVM sources (Push)
- if: ${{ github.event_name == 'push' }}
+ - name: Fetch LLVM sources
uses: actions/checkout at 11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
- fetch-depth: 1
+ fetch-depth: 2
- name: Get subprojects that have doc changes
id: docs-changed-subprojects
uses: step-security/changed-files at 3dbe17c78367e7d60f00d78ae6781a35be47b4a1 # v45.0.1
with:
+ skip_initial_fetch: true
+ base_sha: 'HEAD~1'
files_yaml: |
llvm:
- 'llvm/docs/**'
@@ -96,11 +93,6 @@ jobs:
- 'flang/include/flang/Optimizer/Dialect/FIROps.td'
workflow:
- '.github/workflows/docs.yml'
- - name: Fetch LLVM sources (PR)
- if: ${{ github.event_name == 'pull_request' }}
- uses: actions/checkout at 11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- with:
- fetch-depth: 1
- name: Setup Python env
uses: actions/setup-python at 42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
with:
@@ -111,6 +103,7 @@ jobs:
run: pip install -r llvm/docs/requirements-hashed.txt
- name: Install system dependencies
run: |
+ echo "${{ toJson(steps.docs-changed-subprojects.outputs) }}"
sudo apt-get update
# swig and graphviz are lldb specific dependencies
sudo apt-get install -y cmake ninja-build swig graphviz
More information about the llvm-commits
mailing list