mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
ci: use clang 17 as the default clang version is too old
This commit is contained in:
parent
9eb5d9f13f
commit
40bd96b6f9
16
.github/scripts/install_deps.sh
vendored
16
.github/scripts/install_deps.sh
vendored
@ -13,6 +13,22 @@ os=$(uname -s)
|
|||||||
if [[ $os == Linux ]]; then
|
if [[ $os == Linux ]]; then
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y attr build-essential cmake curl gettext libattr1-dev ninja-build unzip
|
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
|
if [[ -n $TEST ]]; then
|
||||||
sudo apt-get install -y locales-all cpanminus
|
sudo apt-get install -y locales-all cpanminus
|
||||||
fi
|
fi
|
||||||
|
10
.github/workflows/test.yml
vendored
10
.github/workflows/test.yml
vendored
@ -32,6 +32,8 @@ jobs:
|
|||||||
lint:
|
lint:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
|
env:
|
||||||
|
CC: clang
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
@ -86,6 +88,8 @@ jobs:
|
|||||||
clang-analyzer:
|
clang-analyzer:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
timeout-minutes: 20
|
timeout-minutes: 20
|
||||||
|
env:
|
||||||
|
CC: clang
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- run: ./.github/scripts/install_deps.sh
|
- run: ./.github/scripts/install_deps.sh
|
||||||
@ -304,6 +308,8 @@ jobs:
|
|||||||
build-types:
|
build-types:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
|
env:
|
||||||
|
CC: gcc
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
@ -318,7 +324,7 @@ jobs:
|
|||||||
cmake --build .deps
|
cmake --build .deps
|
||||||
|
|
||||||
- name: Configure
|
- name: Configure
|
||||||
run: cmake -B build -G "Ninja Multi-Config" -D CMAKE_C_COMPILER=gcc -D CI_BUILD=ON
|
run: cmake -B build -G "Ninja Multi-Config" -D CI_BUILD=ON
|
||||||
|
|
||||||
- name: Release
|
- name: Release
|
||||||
run: cmake --build build --config Release
|
run: cmake --build build --config Release
|
||||||
@ -332,6 +338,8 @@ jobs:
|
|||||||
with-external-deps:
|
with-external-deps:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
|
env:
|
||||||
|
CC: gcc
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user