aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordundargoc <gocdundar@gmail.com>2023-10-22 13:30:32 +0200
committerdundargoc <33953936+dundargoc@users.noreply.github.com>2023-11-03 22:16:45 +0100
commit9ad239690fe6b151afe2f43c2858d68a2b877e1d (patch)
tree9c682b2397224a9dec6cdcc22b49c27fbcdd91c8
parent310896f6aa1d1242d531c30d2cffa20ff8cb635f (diff)
downloadrneovim-9ad239690fe6b151afe2f43c2858d68a2b877e1d.tar.gz
rneovim-9ad239690fe6b151afe2f43c2858d68a2b877e1d.tar.bz2
rneovim-9ad239690fe6b151afe2f43c2858d68a2b877e1d.zip
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
-rw-r--r--.github/actions/cache/action.yml3
-rwxr-xr-x.github/scripts/install_deps.sh4
-rw-r--r--.github/scripts/reviews.js2
-rw-r--r--.github/workflows/build.yml12
-rw-r--r--.github/workflows/lintcommit.yml2
-rw-r--r--.github/workflows/optional.yml11
-rw-r--r--.github/workflows/test.yml27
7 files changed, 28 insertions, 33 deletions
diff --git a/.github/actions/cache/action.yml b/.github/actions/cache/action.yml
index c019ac52ac..d668c7a7cc 100644
--- a/.github/actions/cache/action.yml
+++ b/.github/actions/cache/action.yml
@@ -3,6 +3,9 @@ description: "This action caches neovim dependencies"
runs:
using: "composite"
steps:
+ - run: echo "CACHE_KEY=${{ github.workflow }}" >> $GITHUB_ENV
+ shell: bash
+
- run: echo "CACHE_KEY=${{ github.job }}" >> $GITHUB_ENV
shell: bash
diff --git a/.github/scripts/install_deps.sh b/.github/scripts/install_deps.sh
index bcc9789908..91c1d04081 100755
--- a/.github/scripts/install_deps.sh
+++ b/.github/scripts/install_deps.sh
@@ -12,7 +12,7 @@ done
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
+ sudo apt-get install -y build-essential cmake curl gettext ninja-build unzip
if [[ $CC == clang ]]; then
DEFAULT_CLANG_VERSION=$(echo | clang -dM -E - | grep __clang_major | awk '{print $3}')
@@ -30,7 +30,7 @@ if [[ $os == Linux ]]; then
fi
if [[ -n $TEST ]]; then
- sudo apt-get install -y locales-all cpanminus
+ sudo apt-get install -y locales-all cpanminus attr libattr1-dev
fi
elif [[ $os == Darwin ]]; then
brew update --quiet
diff --git a/.github/scripts/reviews.js b/.github/scripts/reviews.js
index 8fae929421..d28d91c2f6 100644
--- a/.github/scripts/reviews.js
+++ b/.github/scripts/reviews.js
@@ -60,7 +60,7 @@ module.exports = async ({ github, context }) => {
if (labels.includes("lsp")) {
reviewers.add("folke");
- reviewers.add("glepnir");
+ reviewers.add("MariaSolOs");
reviewers.add("mfussenegger");
}
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 982ec707ae..d6e11fcdcb 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -25,10 +25,7 @@ jobs:
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
-
- - name: Install dependencies
- run: ./.github/scripts/install_deps.sh
-
+ - run: ./.github/scripts/install_deps.sh
- run: printf 'NVIM_BUILD_TYPE=Release\n' >> $GITHUB_ENV
- name: Build universal binary
@@ -43,12 +40,11 @@ jobs:
CMAKE_VERSION: '3.10.0'
steps:
- uses: actions/checkout@v4
+ - run: ./.github/scripts/install_deps.sh
- name: Set up environment
run: echo "$BIN_DIR" >> $GITHUB_PATH
- - name: Install dependencies
- run: ./.github/scripts/install_deps.sh
- name: Install minimum required version of cmake
run: |
@@ -77,9 +73,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
-
- - name: Install build dependencies
- run: ./.github/scripts/install_deps.sh
+ - run: ./.github/scripts/install_deps.sh
- name: Build bundled dependencies
run: make deps
diff --git a/.github/workflows/lintcommit.yml b/.github/workflows/lintcommit.yml
index cb63ddef68..8f56c057ae 100644
--- a/.github/workflows/lintcommit.yml
+++ b/.github/workflows/lintcommit.yml
@@ -18,7 +18,7 @@ jobs:
- uses: ./.github/actions/cache
- name: Build
run: |
- cmake -S cmake.deps -B .deps -G Ninja
+ cmake -S cmake.deps --preset ci
cmake --build .deps
cmake --preset ci
cmake --build build
diff --git a/.github/workflows/optional.yml b/.github/workflows/optional.yml
index f512bb0d2a..f3bb27dc70 100644
--- a/.github/workflows/optional.yml
+++ b/.github/workflows/optional.yml
@@ -7,9 +7,14 @@ concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true
+env:
+ INSTALL_PREFIX: ${{ github.workspace }}/nvim-install
+ # TEST_FILE: test/functional/shada
+ # TEST_FILTER: foo
+
jobs:
s390x:
- if: ${{ github.event.label.name == 'ci-s390x' }}
+ if: contains(github.event.pull_request.labels.*.name, 'ci-s390x')
strategy:
fail-fast: false
matrix:
@@ -24,9 +29,11 @@ jobs:
bash -c
"
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 &&
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 --build .deps &&
cmake -B build -G Ninja -D PREFER_LUA=ON &&
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 1ff6b31a2d..a1133404e2 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -36,9 +36,8 @@ jobs:
CC: clang
steps:
- uses: actions/checkout@v4
-
- - name: Install dependencies
- run: ./.github/scripts/install_deps.sh
+ - run: ./.github/scripts/install_deps.sh
+ - uses: ./.github/actions/cache
- name: Install stylua
run: |
@@ -47,8 +46,6 @@ jobs:
(cd "$BIN_DIR"; unzip stylua*.zip)
echo "$BIN_DIR" >> $GITHUB_PATH
- - uses: ./.github/actions/cache
-
- name: Build third-party deps
run: |
cmake -S cmake.deps -B .deps -G Ninja
@@ -96,9 +93,9 @@ jobs:
- uses: ./.github/actions/cache
- name: Build third-party deps
run: |
- cmake -S cmake.deps -B .deps -G Ninja
+ cmake -S cmake.deps --preset ci
cmake --build .deps
- cmake -B build -G Ninja
+ cmake --preset ci
- run: cmake --build build --target clang-analyzer
posix:
@@ -128,6 +125,8 @@ jobs:
CC: ${{ matrix.build.cc }}
steps:
- uses: actions/checkout@v4
+ - run: ./.github/scripts/install_deps.sh --test
+ - uses: ./.github/actions/cache
- name: Set up environment
run: |
@@ -137,9 +136,6 @@ jobs:
- name: Create log dir
run: mkdir -p "$LOG_DIR"
- - name: Install dependencies
- run: ./.github/scripts/install_deps.sh --test
-
- if: ${{ matrix.test != 'unittest' }}
name: Set up interpreter packages
run: |
@@ -157,11 +153,9 @@ jobs:
sudo cpanm -n Neovim::Ext || cat "$HOME/.cpanm/build.log"
perl -W -e 'use Neovim::Ext; print $Neovim::Ext::VERSION'
- - uses: ./.github/actions/cache
-
- name: Build third-party deps
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
- name: Build
@@ -281,10 +275,7 @@ jobs:
CC: gcc
steps:
- uses: actions/checkout@v4
-
- - name: Install dependencies
- run: ./.github/scripts/install_deps.sh
-
+ - run: ./.github/scripts/install_deps.sh
- uses: ./.github/actions/cache
- name: Build third-party deps
@@ -293,7 +284,7 @@ jobs:
cmake --build .deps
- name: Configure
- run: cmake -B build -G "Ninja Multi-Config" -D CI_BUILD=ON
+ run: cmake --preset ci -G "Ninja Multi-Config"
- name: Release
run: cmake --build build --config Release