File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 61
61
curl -L "https://apt.llvm.org/llvm-snapshot.gpg.key" | sudo apt-key add -
62
62
echo "deb https://apt.llvm.org/bionic/ llvm-toolchain-bionic main" | sudo tee -a /etc/apt/sources.list
63
63
sudo apt-get update
64
- sudo apt-get install -yqq clang-format-9 clang-tidy-9 llvm-${{ env.LLVM_VERSION }}-dev libomp-${{ env.LLVM_VERSION }}-dev
64
+ sudo apt-get install -yqq \
65
+ clang-format-${{ env.LLVM_VERSION }} clang-tidy-${{ env.LLVM_VERSION }} \
66
+ llvm-${{ env.LLVM_VERSION }}-dev libomp-${{ env.LLVM_VERSION }}-dev
65
67
66
68
- name : Generate compile command database
67
69
if : ${{ steps.gather-list-of-changes.outputs.HAS_CHANGES }}
73
75
if : ${{ steps.gather-list-of-changes.outputs.HAS_CHANGES }}
74
76
id : run-clang-format
75
77
run : |
76
- cat diff-to-inspect.txt | /usr/share/clang/clang-format-9 /clang-format-diff.py -p1 > clang-format.patch
78
+ cat diff-to-inspect.txt | /usr/share/clang/clang-format-${{ env.LLVM_VERSION }} /clang-format-diff.py -p1 > clang-format.patch
77
79
if [ -s clang-format.patch ]; then
78
80
echo "clang-format found incorrectly formatted code:"
79
81
cat clang-format.patch;
91
93
if : ${{ always() && steps.gather-list-of-changes.outputs.HAS_CHANGES }}
92
94
id : run-clang-tidy
93
95
run : |
94
- cat diff-to-inspect.txt | /usr/lib/llvm-9 /share/clang/clang-tidy-diff.py \
95
- -p1 -clang-tidy-binary clang-tidy-9 -quiet \
96
+ cat diff-to-inspect.txt | /usr/lib/llvm-${{ env.LLVM_VERSION }} /share/clang/clang-tidy-diff.py \
97
+ -p1 -clang-tidy-binary clang-tidy-${{ env.LLVM_VERSION }} -quiet \
96
98
-path ${{ github.workspace}}/build > clang-tidy.log 2>/dev/null
97
99
# By some reason, clang-tidy log contains tons of extra empty lines,
98
100
# that confuse the check below
You can’t perform that action at this time.
0 commit comments