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 12
12
jobs :
13
13
code_formatter :
14
14
runs-on : ubuntu-24.04
15
+ container :
16
+ image : ' ghcr.io/llvm/ci-ubuntu-24.04:latest'
15
17
timeout-minutes : 30
16
18
concurrency :
17
19
group : ${{ github.workflow }}-${{ github.event.pull_request.number }}
@@ -38,31 +40,21 @@ jobs:
38
40
run : |
39
41
echo "Formatting files:"
40
42
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
56
47
57
48
- 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
59
50
60
51
- name : Run code formatter
61
52
env :
62
53
GITHUB_PR_NUMBER : ${{ github.event.pull_request.number }}
63
54
CHANGED_FILES : ${{ steps.changed-files.outputs.all_changed_files }}
64
55
# Create an empty comments file so the pr-write job doesn't fail.
65
56
run : |
57
+ . venv/bin/activate &&
66
58
echo "[]" > comments &&
67
59
python ./llvm/utils/git/code-format-helper.py \
68
60
--write-comment-to-file \
You can’t perform that action at this time.
0 commit comments