Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 3 additions & 16 deletions .github/workflows/pr-code-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,6 @@ jobs:
base_sha: 'HEAD~1'
sha: 'HEAD'

# We need to pull the script from the main branch, so that we ensure
# we get the latest version of this script.
- name: Fetch code formatting utils
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
repository: ${{ github.repository }}
ref: ${{ github.base_ref }}
sparse-checkout: |
llvm/utils/git/requirements_formatting.txt
llvm/utils/git/code-format-helper.py
sparse-checkout-cone-mode: false
path: code-format-tools

- name: "Listed files"
env:
CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
Expand All @@ -65,10 +52,10 @@ jobs:
with:
python-version: '3.11'
cache: 'pip'
cache-dependency-path: 'code-format-tools/llvm/utils/git/requirements_formatting.txt'
cache-dependency-path: 'llvm/utils/git/requirements_formatting.txt'

- name: Install python dependencies
run: pip install -r code-format-tools/llvm/utils/git/requirements_formatting.txt
run: pip install -r llvm/utils/git/requirements_formatting.txt

- name: Run code formatter
env:
Expand All @@ -77,7 +64,7 @@ jobs:
# Create an empty comments file so the pr-write job doesn't fail.
run: |
echo "[]" > comments &&
python ./code-format-tools/llvm/utils/git/code-format-helper.py \
python ./llvm/utils/git/code-format-helper.py \
--write-comment-to-file \
--token ${{ secrets.GITHUB_TOKEN }} \
--issue-number $GITHUB_PR_NUMBER \
Expand Down
16 changes: 2 additions & 14 deletions .github/workflows/pr-code-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,6 @@ jobs:
run: |
echo "Changed files:"
echo "$CHANGED_FILES"

- name: Fetch code linting utils
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
repository: ${{ github.repository }}
ref: ${{ github.base_ref }}
sparse-checkout: |
llvm/utils/git/code-lint-helper.py
llvm/utils/git/requirements_linting.txt
clang-tools-extra/clang-tidy/tool/clang-tidy-diff.py
sparse-checkout-cone-mode: false
path: code-lint-tools

- name: Install clang-tidy
uses: aminya/setup-cpp@17c11551771948abc5752bbf3183482567c7caf0 # v1.1.1
Expand All @@ -70,7 +58,7 @@ jobs:
python-version: '3.12'

- name: Install Python dependencies
run: python3 -m pip install -r code-lint-tools/llvm/utils/git/requirements_linting.txt
run: python3 -m pip install -r llvm/utils/git/requirements_linting.txt

# TODO: create special mapping for 'codegen' targets, for now build predefined set
# TODO: add entrypoint in 'compute_projects.py' that only adds a project and its direct dependencies
Expand Down Expand Up @@ -107,7 +95,7 @@ jobs:
CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
echo "[]" > comments &&
python3 ./code-lint-tools/llvm/utils/git/code-lint-helper.py \
python3 llvm/utils/git/code-lint-helper.py \
--token ${{ secrets.GITHUB_TOKEN }} \
--issue-number $GITHUB_PR_NUMBER \
--start-rev HEAD~1 \
Expand Down
Loading