Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ COPY --from=llvm-downloader /llvm-extract/LLVM-${LLVM_VERSION}-Linux-X64/bin/cla
COPY clang-tools-extra/clang-tidy/tool/clang-tidy-diff.py ${LLVM_SYSROOT}/bin/clang-tidy-diff.py

# Install dependencies for 'pr-code-lint.yml' job
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y python3-doc8 && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
COPY llvm/utils/git/requirements_linting.txt requirements_linting.txt
RUN pip install -r requirements_linting.txt --break-system-packages && \
rm requirements_linting.txt
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/pr-code-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
run:
shell: bash
container:
image: 'ghcr.io/llvm/ci-ubuntu-24.04-lint'
image: 'ghcr.io/llvm/ci-ubuntu-24.04-lint-doc8'
timeout-minutes: 60
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -30,7 +30,7 @@ jobs:
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
fetch-depth: 2

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@24d32ffd492484c1d75e0c0b894501ddb9d30d62 # v47.0.0
Expand All @@ -39,14 +39,14 @@ jobs:
skip_initial_fetch: true
base_sha: 'HEAD~1'
sha: 'HEAD'

- name: Listed files
env:
CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
echo "Changed files:"
echo "$CHANGED_FILES"

# 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
- name: Configure and CodeGen
Expand All @@ -71,12 +71,12 @@ jobs:
-DLLVM_INCLUDE_TESTS=OFF \
-DCLANG_INCLUDE_TESTS=OFF \
-DCMAKE_BUILD_TYPE=Release

ninja -C build \
clang-tablegen-targets \
genconfusable # for "ConfusableIdentifierCheck.h"

- name: Run code linter
- name: Run linters
env:
GITHUB_PR_NUMBER: ${{ github.event.pull_request.number }}
CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
Expand All @@ -89,7 +89,7 @@ jobs:
--end-rev HEAD \
--verbose \
--changed-files "$CHANGED_FILES"

- name: Upload results
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
if: always()
Expand Down
Loading
Loading