mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
ci: various fixes
- adjust reviewers - add workflow as cache key - install attr only when tesitng - fix s390x workflow by checking out the merge PR instead of master
This commit is contained in:
parent
310896f6aa
commit
9ad239690f
3
.github/actions/cache/action.yml
vendored
3
.github/actions/cache/action.yml
vendored
@ -3,6 +3,9 @@ description: "This action caches neovim dependencies"
|
|||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
|
- run: echo "CACHE_KEY=${{ github.workflow }}" >> $GITHUB_ENV
|
||||||
|
shell: bash
|
||||||
|
|
||||||
- run: echo "CACHE_KEY=${{ github.job }}" >> $GITHUB_ENV
|
- run: echo "CACHE_KEY=${{ github.job }}" >> $GITHUB_ENV
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
|
4
.github/scripts/install_deps.sh
vendored
4
.github/scripts/install_deps.sh
vendored
@ -12,7 +12,7 @@ done
|
|||||||
os=$(uname -s)
|
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 build-essential cmake curl gettext ninja-build unzip
|
||||||
|
|
||||||
if [[ $CC == clang ]]; then
|
if [[ $CC == clang ]]; then
|
||||||
DEFAULT_CLANG_VERSION=$(echo | clang -dM -E - | grep __clang_major | awk '{print $3}')
|
DEFAULT_CLANG_VERSION=$(echo | clang -dM -E - | grep __clang_major | awk '{print $3}')
|
||||||
@ -30,7 +30,7 @@ if [[ $os == Linux ]]; then
|
|||||||
fi
|
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 attr libattr1-dev
|
||||||
fi
|
fi
|
||||||
elif [[ $os == Darwin ]]; then
|
elif [[ $os == Darwin ]]; then
|
||||||
brew update --quiet
|
brew update --quiet
|
||||||
|
2
.github/scripts/reviews.js
vendored
2
.github/scripts/reviews.js
vendored
@ -60,7 +60,7 @@ module.exports = async ({ github, context }) => {
|
|||||||
|
|
||||||
if (labels.includes("lsp")) {
|
if (labels.includes("lsp")) {
|
||||||
reviewers.add("folke");
|
reviewers.add("folke");
|
||||||
reviewers.add("glepnir");
|
reviewers.add("MariaSolOs");
|
||||||
reviewers.add("mfussenegger");
|
reviewers.add("mfussenegger");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
12
.github/workflows/build.yml
vendored
12
.github/workflows/build.yml
vendored
@ -25,10 +25,7 @@ jobs:
|
|||||||
timeout-minutes: 20
|
timeout-minutes: 20
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
- run: ./.github/scripts/install_deps.sh
|
||||||
- name: Install dependencies
|
|
||||||
run: ./.github/scripts/install_deps.sh
|
|
||||||
|
|
||||||
- run: printf 'NVIM_BUILD_TYPE=Release\n' >> $GITHUB_ENV
|
- run: printf 'NVIM_BUILD_TYPE=Release\n' >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Build universal binary
|
- name: Build universal binary
|
||||||
@ -43,12 +40,11 @@ jobs:
|
|||||||
CMAKE_VERSION: '3.10.0'
|
CMAKE_VERSION: '3.10.0'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
- run: ./.github/scripts/install_deps.sh
|
||||||
|
|
||||||
- name: Set up environment
|
- name: Set up environment
|
||||||
run: echo "$BIN_DIR" >> $GITHUB_PATH
|
run: echo "$BIN_DIR" >> $GITHUB_PATH
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: ./.github/scripts/install_deps.sh
|
|
||||||
|
|
||||||
- name: Install minimum required version of cmake
|
- name: Install minimum required version of cmake
|
||||||
run: |
|
run: |
|
||||||
@ -77,9 +73,7 @@ jobs:
|
|||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
- run: ./.github/scripts/install_deps.sh
|
||||||
- name: Install build dependencies
|
|
||||||
run: ./.github/scripts/install_deps.sh
|
|
||||||
|
|
||||||
- name: Build bundled dependencies
|
- name: Build bundled dependencies
|
||||||
run: make deps
|
run: make deps
|
||||||
|
2
.github/workflows/lintcommit.yml
vendored
2
.github/workflows/lintcommit.yml
vendored
@ -18,7 +18,7 @@ jobs:
|
|||||||
- uses: ./.github/actions/cache
|
- uses: ./.github/actions/cache
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
cmake -S cmake.deps -B .deps -G Ninja
|
cmake -S cmake.deps --preset ci
|
||||||
cmake --build .deps
|
cmake --build .deps
|
||||||
cmake --preset ci
|
cmake --preset ci
|
||||||
cmake --build build
|
cmake --build build
|
||||||
|
11
.github/workflows/optional.yml
vendored
11
.github/workflows/optional.yml
vendored
@ -7,9 +7,14 @@ concurrency:
|
|||||||
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
|
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
env:
|
||||||
|
INSTALL_PREFIX: ${{ github.workspace }}/nvim-install
|
||||||
|
# TEST_FILE: test/functional/shada
|
||||||
|
# TEST_FILTER: foo
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
s390x:
|
s390x:
|
||||||
if: ${{ github.event.label.name == 'ci-s390x' }}
|
if: contains(github.event.pull_request.labels.*.name, 'ci-s390x')
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
@ -24,9 +29,11 @@ jobs:
|
|||||||
bash -c
|
bash -c
|
||||||
"
|
"
|
||||||
apt-get -y update &&
|
apt-get -y update &&
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get -y install attr build-essential cmake curl gettext libattr1-dev ninja-build unzip locales-all cpanminus git &&
|
DEBIAN_FRONTEND=noninteractive apt-get -y install build-essential cmake curl gettext ninja-build unzip locales-all cpanminus git attr libattr1-dev &&
|
||||||
git clone --depth=1 https://github.com/neovim/neovim.git &&
|
git clone --depth=1 https://github.com/neovim/neovim.git &&
|
||||||
cd neovim &&
|
cd neovim &&
|
||||||
|
git fetch origin ${{ github.ref }}:pr &&
|
||||||
|
git switch pr &&
|
||||||
cmake -S cmake.deps -B .deps -G Ninja -D USE_BUNDLED_LUAJIT=OFF -D USE_BUNDLED_LUA=ON &&
|
cmake -S cmake.deps -B .deps -G Ninja -D USE_BUNDLED_LUAJIT=OFF -D USE_BUNDLED_LUA=ON &&
|
||||||
cmake --build .deps &&
|
cmake --build .deps &&
|
||||||
cmake -B build -G Ninja -D PREFER_LUA=ON &&
|
cmake -B build -G Ninja -D PREFER_LUA=ON &&
|
||||||
|
27
.github/workflows/test.yml
vendored
27
.github/workflows/test.yml
vendored
@ -36,9 +36,8 @@ jobs:
|
|||||||
CC: clang
|
CC: clang
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
- run: ./.github/scripts/install_deps.sh
|
||||||
- name: Install dependencies
|
- uses: ./.github/actions/cache
|
||||||
run: ./.github/scripts/install_deps.sh
|
|
||||||
|
|
||||||
- name: Install stylua
|
- name: Install stylua
|
||||||
run: |
|
run: |
|
||||||
@ -47,8 +46,6 @@ jobs:
|
|||||||
(cd "$BIN_DIR"; unzip stylua*.zip)
|
(cd "$BIN_DIR"; unzip stylua*.zip)
|
||||||
echo "$BIN_DIR" >> $GITHUB_PATH
|
echo "$BIN_DIR" >> $GITHUB_PATH
|
||||||
|
|
||||||
- uses: ./.github/actions/cache
|
|
||||||
|
|
||||||
- name: Build third-party deps
|
- name: Build third-party deps
|
||||||
run: |
|
run: |
|
||||||
cmake -S cmake.deps -B .deps -G Ninja
|
cmake -S cmake.deps -B .deps -G Ninja
|
||||||
@ -96,9 +93,9 @@ jobs:
|
|||||||
- uses: ./.github/actions/cache
|
- uses: ./.github/actions/cache
|
||||||
- name: Build third-party deps
|
- name: Build third-party deps
|
||||||
run: |
|
run: |
|
||||||
cmake -S cmake.deps -B .deps -G Ninja
|
cmake -S cmake.deps --preset ci
|
||||||
cmake --build .deps
|
cmake --build .deps
|
||||||
cmake -B build -G Ninja
|
cmake --preset ci
|
||||||
- run: cmake --build build --target clang-analyzer
|
- run: cmake --build build --target clang-analyzer
|
||||||
|
|
||||||
posix:
|
posix:
|
||||||
@ -128,6 +125,8 @@ jobs:
|
|||||||
CC: ${{ matrix.build.cc }}
|
CC: ${{ matrix.build.cc }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
- run: ./.github/scripts/install_deps.sh --test
|
||||||
|
- uses: ./.github/actions/cache
|
||||||
|
|
||||||
- name: Set up environment
|
- name: Set up environment
|
||||||
run: |
|
run: |
|
||||||
@ -137,9 +136,6 @@ jobs:
|
|||||||
- name: Create log dir
|
- name: Create log dir
|
||||||
run: mkdir -p "$LOG_DIR"
|
run: mkdir -p "$LOG_DIR"
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: ./.github/scripts/install_deps.sh --test
|
|
||||||
|
|
||||||
- if: ${{ matrix.test != 'unittest' }}
|
- if: ${{ matrix.test != 'unittest' }}
|
||||||
name: Set up interpreter packages
|
name: Set up interpreter packages
|
||||||
run: |
|
run: |
|
||||||
@ -157,11 +153,9 @@ jobs:
|
|||||||
sudo cpanm -n Neovim::Ext || cat "$HOME/.cpanm/build.log"
|
sudo cpanm -n Neovim::Ext || cat "$HOME/.cpanm/build.log"
|
||||||
perl -W -e 'use Neovim::Ext; print $Neovim::Ext::VERSION'
|
perl -W -e 'use Neovim::Ext; print $Neovim::Ext::VERSION'
|
||||||
|
|
||||||
- uses: ./.github/actions/cache
|
|
||||||
|
|
||||||
- name: Build third-party deps
|
- name: Build third-party deps
|
||||||
run: |
|
run: |
|
||||||
cmake -S cmake.deps -B .deps -G Ninja ${{ matrix.build.deps_flags }}
|
cmake -S cmake.deps --preset ci ${{ matrix.build.deps_flags }}
|
||||||
cmake --build .deps
|
cmake --build .deps
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
@ -281,10 +275,7 @@ jobs:
|
|||||||
CC: gcc
|
CC: gcc
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
- run: ./.github/scripts/install_deps.sh
|
||||||
- name: Install dependencies
|
|
||||||
run: ./.github/scripts/install_deps.sh
|
|
||||||
|
|
||||||
- uses: ./.github/actions/cache
|
- uses: ./.github/actions/cache
|
||||||
|
|
||||||
- name: Build third-party deps
|
- name: Build third-party deps
|
||||||
@ -293,7 +284,7 @@ jobs:
|
|||||||
cmake --build .deps
|
cmake --build .deps
|
||||||
|
|
||||||
- name: Configure
|
- name: Configure
|
||||||
run: cmake -B build -G "Ninja Multi-Config" -D CI_BUILD=ON
|
run: cmake --preset ci -G "Ninja Multi-Config"
|
||||||
|
|
||||||
- name: Release
|
- name: Release
|
||||||
run: cmake --build build --config Release
|
run: cmake --build build --config Release
|
||||||
|
Loading…
Reference in New Issue
Block a user