File tree Expand file tree Collapse file tree 1 file changed +8
-16
lines changed Expand file tree Collapse file tree 1 file changed +8
-16
lines changed Original file line number Diff line number Diff line change 1212jobs :
1313 code_formatter :
1414 runs-on : ubuntu-24.04
15+ container :
16+ image : ' ghcr.io/llvm/ci-ubuntu-24.04:latest'
1517 timeout-minutes : 30
1618 concurrency :
1719 group : ${{ github.workflow }}-${{ github.event.pull_request.number }}
@@ -38,31 +40,21 @@ jobs:
3840 run : |
3941 echo "Formatting files:"
4042 echo "$CHANGED_FILES"
41-
42- # The clang format version should always be upgraded to the first version
43- # of a release cycle (x.1.0) or the last version of a release cycle, or
44- # if there have been relevant clang-format backports.
45- - name : Install clang-format
46- uses : aminya/setup-cpp@17c11551771948abc5752bbf3183482567c7caf0 # v1.1.1
47- with :
48- clangformat : 21.1.0
49-
50- - name : Setup Python env
51- uses : actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
52- with :
53- python-version : ' 3.11'
54- cache : ' pip'
55- cache-dependency-path : ' llvm/utils/git/requirements_formatting.txt'
43+
44+ - name : Create python venv
45+ run : |
46+ python -m venv venv
5647
5748 - name : Install python dependencies
58- run : pip install -r llvm/utils/git/requirements_formatting.txt
49+ run : venv/bin/ pip install -r llvm/utils/git/requirements_formatting.txt
5950
6051 - name : Run code formatter
6152 env :
6253 GITHUB_PR_NUMBER : ${{ github.event.pull_request.number }}
6354 CHANGED_FILES : ${{ steps.changed-files.outputs.all_changed_files }}
6455 # Create an empty comments file so the pr-write job doesn't fail.
6556 run : |
57+ . venv/bin/activate &&
6658 echo "[]" > comments &&
6759 python ./llvm/utils/git/code-format-helper.py \
6860 --write-comment-to-file \
You can’t perform that action at this time.
0 commit comments