diff options
| author | dundargoc <gocdundar@gmail.com> | 2023-10-08 23:05:23 +0200 |
|---|---|---|
| committer | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2023-10-09 21:52:56 +0200 |
| commit | 40bd96b6f9295a43de0c4179a90db087a7d37293 (patch) | |
| tree | 317067629ccee46e183e3e100078989b7e2e1d5c /.github/scripts | |
| parent | 9eb5d9f13fb24594007f5b0728826b1f9b694e3c (diff) | |
| download | rneovim-40bd96b6f9295a43de0c4179a90db087a7d37293.tar.gz rneovim-40bd96b6f9295a43de0c4179a90db087a7d37293.tar.bz2 rneovim-40bd96b6f9295a43de0c4179a90db087a7d37293.zip | |
ci: use clang 17 as the default clang version is too old
Diffstat (limited to '.github/scripts')
| -rwxr-xr-x | .github/scripts/install_deps.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/.github/scripts/install_deps.sh b/.github/scripts/install_deps.sh index 05e07bda1d..bcc9789908 100755 --- a/.github/scripts/install_deps.sh +++ b/.github/scripts/install_deps.sh @@ -13,6 +13,22 @@ os=$(uname -s) if [[ $os == Linux ]]; then sudo apt-get update sudo apt-get install -y attr build-essential cmake curl gettext libattr1-dev ninja-build unzip + + if [[ $CC == clang ]]; then + DEFAULT_CLANG_VERSION=$(echo | clang -dM -E - | grep __clang_major | awk '{print $3}') + CLANG_VERSION=17 + if ((DEFAULT_CLANG_VERSION >= CLANG_VERSION)); then + echo "Default clang version is $DEFAULT_CLANG_VERSION, which equal or larger than wanted version $CLANG_VERSION. Aborting!" + exit 1 + fi + + wget https://apt.llvm.org/llvm.sh + chmod +x llvm.sh + sudo ./llvm.sh $CLANG_VERSION + sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-$CLANG_VERSION 100 + sudo update-alternatives --set clang /usr/bin/clang-$CLANG_VERSION + fi + if [[ -n $TEST ]]; then sudo apt-get install -y locales-all cpanminus fi |