File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,18 @@ function run_clang_format_check() {
28
28
local clang_format_executable=" clang-format${CLANG_FORMAT_VERSION: +-$CLANG_FORMAT_VERSION } "
29
29
30
30
ici_time_start install_clang_format
31
+
32
+ # Install llvm repository to install the correct clang version if not supported by default on the distro
33
+ ici_cmd apt-cache search --names-only " $clang_format_executable "
34
+ ici_cmd apt-cache search --names-only " $clang_format_executable " | grep " clang"
35
+ if ! apt-cache search --names-only " $clang_format_executable " | grep -q " clang" ; then
36
+ ici_install_pkgs_for_command wget wget
37
+ ici_apt_install lsb-release software-properties-common gnupg
38
+ ici_cmd wget -qO /tmp/llvm.sh https://apt.llvm.org/llvm.sh
39
+ ici_cmd chmod +x /tmp/llvm.sh
40
+ ici_cmd /tmp/llvm.sh " $CLANG_FORMAT_VERSION "
41
+ fi
42
+
31
43
ici_apt_install git-core " $clang_format_executable "
32
44
ici_time_end # install_clang_format
33
45
You can’t perform that action at this time.
0 commit comments