aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/add-reviewers.yml (renamed from .github/workflows/reviews.yml)3
-rw-r--r--.github/workflows/api-docs.yml10
-rw-r--r--.github/workflows/backport.yml2
-rw-r--r--.github/workflows/ci.yml221
-rw-r--r--.github/workflows/codeql.yml (renamed from .github/workflows/codeql-analysis.yml)6
-rw-r--r--.github/workflows/coverity.yml (renamed from .github/workflows/coverity-scan.yml)2
-rw-r--r--.github/workflows/env.ps17
-rwxr-xr-x.github/workflows/env.sh4
-rw-r--r--.github/workflows/labeler.yml1
-rw-r--r--.github/workflows/lintcommit.yml (renamed from .github/workflows/commitlint.yml)6
-rw-r--r--.github/workflows/news.yml31
-rw-r--r--.github/workflows/release.yml83
-rw-r--r--.github/workflows/remove-reviewers.yml (renamed from .github/workflows/remove-reviewers-on-draft.yml)1
-rw-r--r--.github/workflows/stale.yml42
-rw-r--r--.github/workflows/vim-patches.yml7
15 files changed, 271 insertions, 155 deletions
diff --git a/.github/workflows/reviews.yml b/.github/workflows/add-reviewers.yml
index 34ce19d830..f1abab5c53 100644
--- a/.github/workflows/reviews.yml
+++ b/.github/workflows/add-reviewers.yml
@@ -1,7 +1,7 @@
name: "Request reviews"
on:
pull_request_target:
- types: [labeled, ready_for_review]
+ types: [labeled, ready_for_review, reopened]
jobs:
request-reviewer:
if: github.event.pull_request.state == 'open' && github.event.pull_request.draft == false
@@ -13,6 +13,7 @@ jobs:
- name: 'Request reviewers'
uses: actions/github-script@v6
with:
+ github-token: ${{ secrets.TEAM_REVIEW }}
script: |
const script = require('./.github/scripts/reviews.js')
await script({github, context})
diff --git a/.github/workflows/api-docs.yml b/.github/workflows/api-docs.yml
index 83554e2a3d..fa8a7dbca0 100644
--- a/.github/workflows/api-docs.yml
+++ b/.github/workflows/api-docs.yml
@@ -21,13 +21,17 @@ on:
jobs:
regen-api-docs:
- runs-on: ubuntu-22.04
+ runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
+ - uses: rhysd/action-setup-vim@v1
+ with:
+ neovim: true
+ version: nightly
- uses: actions/checkout@v3
with:
# Fetch depth 0 is required if called through workflow_call. In order
@@ -38,7 +42,7 @@ jobs:
- name: Install dependencies
run: |
sudo apt-get update
- sudo env DEBIAN_FRONTEND=noninteractive apt-get install -y doxygen python3 python3-msgpack luajit
+ sudo env DEBIAN_FRONTEND=noninteractive apt-get install -y doxygen python3 python3-msgpack
- name: Setup git config
run: |
@@ -52,7 +56,7 @@ jobs:
run: |
git checkout -b ${DOC_BRANCH}
python3 scripts/gen_vimdoc.py
- printf '::set-output name=UPDATED_DOCS::%s\n' $([ -z "$(git diff)" ]; echo $?)
+ printf 'UPDATED_DOCS=%s\n' $([ -z "$(git diff)" ]; echo $?) >> $GITHUB_OUTPUT
- name: FAIL, PR has not committed doc changes
if: ${{ steps.docs.outputs.UPDATED_DOCS != 0 && inputs.check_only }}
diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml
index b5fd22d036..019fb20689 100644
--- a/.github/workflows/backport.yml
+++ b/.github/workflows/backport.yml
@@ -21,7 +21,7 @@ jobs:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Create backport PRs
- uses: zeebe-io/backport-action@v0.0.7
+ uses: zeebe-io/backport-action@v0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
github_workspace: ${{ github.workspace }}
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index e22d99067a..b158d966e1 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -9,17 +9,22 @@ on:
- 'master'
- 'release-[0-9]+.[0-9]+'
paths-ignore:
- - 'runtime/doc/*'
+ - 'contrib/**'
# Cancel any in-progress CI runs for a PR if it is updated
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true
+env:
+ UNCRUSTIFY_VERSION: uncrustify-0.75.0
+ # TEST_FILE: test/functional/core/startup_spec.lua
+ # TEST_FILTER: foo
+
jobs:
lint:
if: (github.event_name == 'pull_request' && github.base_ref == 'master') || (github.event_name == 'push' && github.ref == 'refs/heads/master')
- runs-on: ubuntu-20.04
+ runs-on: ubuntu-22.04
timeout-minutes: 10
env:
CC: gcc
@@ -31,34 +36,8 @@ jobs:
- name: Install apt packages
run: |
- sudo add-apt-repository ppa:neovim-ppa/stable
- sudo apt-get update
- sudo apt-get install -y \
- autoconf \
- automake \
- build-essential \
- cmake \
- flake8 \
- gettext \
- libluajit-5.1-dev \
- libmsgpack-dev \
- libtermkey-dev \
- libtool-bin \
- libtree-sitter-dev \
- libunibilium-dev \
- libuv1-dev \
- libvterm-dev \
- locales \
- lua-busted \
- lua-check \
- lua-filesystem \
- lua-inspect \
- lua-lpeg \
- lua-luv-dev \
- lua-nvim \
- luajit \
- ninja-build \
- pkg-config
+ ./.github/scripts/install_deps_ubuntu.sh
+ sudo apt-get install -y lua-check
- name: Cache uncrustify
id: cache-uncrustify
@@ -85,41 +64,40 @@ jobs:
mkdir -p $HOME/.cache
cp $build_dir/uncrustify ${{ env.CACHE_UNCRUSTIFY }}
- - name: Cache artifacts
- uses: actions/cache@v3
- with:
- path: |
- ${{ env.CACHE_NVIM_DEPS_DIR }}
- key: lint-${{ hashFiles('cmake/*', '**/CMakeLists.txt', '!cmake.deps/**CMakeLists.txt') }}-${{ github.base_ref }}
+ - uses: ./.github/actions/cache
- name: Build third-party deps
run: ./ci/before_script.sh
- if: "!cancelled()"
+ name: Determine if run should be aborted
+ id: abort_job
+ run: echo "status=${{ job.status }}" >> $GITHUB_OUTPUT
+
+ - if: success() || failure() && steps.abort_job.outputs.status == 'success'
name: lintstylua
- uses: JohnnyMorganz/stylua-action@1.0.0
+ uses: JohnnyMorganz/stylua-action@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
+ version: latest
args: --check runtime/
- - if: "!cancelled()"
- name: lintlua
- run: make lintlua
-
- - if: "!cancelled()"
- name: lintpy
- run: make lintpy
+ - if: success() || failure() && steps.abort_job.outputs.status == 'success'
+ name: luacheck
+ run: |
+ cmake -B $BUILD_DIR -G Ninja
+ cmake --build $BUILD_DIR --target lintlua-luacheck
- - if: "!cancelled()"
+ - if: success() || failure() && steps.abort_job.outputs.status == 'success'
name: lintsh
run: make lintsh
- - if: "!cancelled()"
+ - if: success() || failure() && steps.abort_job.outputs.status == 'success'
name: uncrustify
run: |
${{ env.CACHE_UNCRUSTIFY }} -c ./src/uncrustify.cfg -q --replace --no-backup $(find ./src/nvim -name "*.[ch]")
- - if: "!cancelled()"
+ - if: success() || failure() && steps.abort_job.outputs.status == 'success'
name: suggester / uncrustify
uses: reviewdog/action-suggester@v1
with:
@@ -127,7 +105,7 @@ jobs:
tool_name: uncrustify
cleanup: false
- - if: "!cancelled()"
+ - if: success() || failure() && steps.abort_job.outputs.status == 'success'
name: check uncrustify
run: |
git diff --color --exit-code
@@ -142,7 +120,7 @@ jobs:
# of the bundled dependencies.
if: (github.event_name == 'pull_request' && github.base_ref == 'master') || (github.event_name == 'push' && github.ref == 'refs/heads/master')
- runs-on: ubuntu-20.04
+ runs-on: ubuntu-22.04
timeout-minutes: 10
env:
CC: gcc
@@ -155,39 +133,24 @@ jobs:
- name: Install apt packages
run: |
sudo add-apt-repository ppa:neovim-ppa/stable
- sudo apt-get update
+ ./.github/scripts/install_deps_ubuntu.sh
sudo apt-get install -y \
- autoconf \
- automake \
- build-essential \
- cmake \
- gettext \
libluajit-5.1-dev \
libmsgpack-dev \
libtermkey-dev \
- libtool-bin \
libtree-sitter-dev \
libunibilium-dev \
libuv1-dev \
libvterm-dev \
- locales \
lua-busted \
- lua-check \
lua-filesystem \
lua-inspect \
lua-lpeg \
lua-luv-dev \
lua-nvim \
- luajit \
- ninja-build \
- pkg-config
+ luajit
- - name: Cache artifacts
- uses: actions/cache@v3
- with:
- path: |
- ${{ env.CACHE_NVIM_DEPS_DIR }}
- key: lint-${{ hashFiles('cmake/*', '**/CMakeLists.txt', '!cmake.deps/**CMakeLists.txt') }}-${{ github.base_ref }}
+ - uses: ./.github/actions/cache
- name: Build third-party deps
run: ./ci/before_script.sh
@@ -196,10 +159,15 @@ jobs:
run: ./ci/run_tests.sh build_nvim
- if: "!cancelled()"
- name: lintc
- run: make lintc
+ name: Determine if run should be aborted
+ id: abort_job
+ run: echo "status=${{ job.status }}" >> $GITHUB_OUTPUT
- - if: "!cancelled()"
+ - if: success() || failure() && steps.abort_job.outputs.status == 'success'
+ name: clint.py
+ run: cmake --build build --target lintc-clint
+
+ - if: success() || failure() && steps.abort_job.outputs.status == 'success'
name: check-single-includes
run: make check-single-includes
@@ -213,19 +181,19 @@ jobs:
matrix:
include:
- flavor: asan
- cc: clang-13
- runner: ubuntu-20.04
+ cc: clang
+ runner: ubuntu-22.04
os: linux
- flavor: tsan
- cc: clang-13
- runner: ubuntu-20.04
+ cc: clang
+ runner: ubuntu-22.04
os: linux
- flavor: uchar
cc: gcc
- runner: ubuntu-20.04
+ runner: ubuntu-22.04
os: linux
- cc: clang
- runner: macos-11
+ runner: macos-12
os: osx
# functionaltest-lua is our dumping ground for non-mainline configurations.
@@ -236,7 +204,7 @@ jobs:
# 3. No treesitter parsers installed.
- flavor: functionaltest-lua
cc: gcc
- runner: ubuntu-20.04
+ runner: ubuntu-22.04
os: linux
cmake: minimum_required
runs-on: ${{ matrix.runner }}
@@ -252,9 +220,7 @@ jobs:
- name: Install apt packages
if: matrix.os == 'linux'
- run: |
- sudo apt-get update
- sudo apt-get install -y autoconf automake build-essential cmake cpanminus cscope gcc-multilib gdb gettext language-pack-tr libtool-bin locales ninja-build pkg-config python3 python3-pip python3-setuptools unzip valgrind xclip
+ run: ./.github/scripts/install_deps_ubuntu.sh
- name: Install minimum required version of cmake
if: matrix.cmake == 'minimum_required'
@@ -274,14 +240,6 @@ jobs:
exit 1
}
- - name: Install new clang
- if: matrix.flavor == 'asan' || matrix.flavor == 'tsan'
- run: |
- wget https://apt.llvm.org/llvm.sh
- chmod a+x llvm.sh
- sudo ./llvm.sh 13
- rm llvm.sh
-
- name: Install brew packages
if: matrix.os == 'osx'
run: |
@@ -291,12 +249,7 @@ jobs:
- name: Setup interpreter packages
run: ./ci/install.sh
- - name: Cache dependencies
- uses: actions/cache@v3
- with:
- path: |
- ${{ env.CACHE_NVIM_DEPS_DIR }}
- key: ${{ matrix.runner }}-${{ matrix.flavor }}-${{ matrix.cc }}-${{ hashFiles('cmake/*', 'cmake.deps/**', '**/CMakeLists.txt') }}-${{ github.base_ref }}
+ - uses: ./.github/actions/cache
- name: Build third-party deps
run: ./ci/before_script.sh
@@ -304,19 +257,24 @@ jobs:
- name: Build
run: ./ci/run_tests.sh build_nvim
- - if: matrix.flavor != 'tsan' && matrix.flavor != 'functionaltest-lua' && !cancelled()
+ - if: "!cancelled()"
+ name: Determine if run should be aborted
+ id: abort_job
+ run: echo "status=${{ job.status }}" >> $GITHUB_OUTPUT
+
+ - if: matrix.flavor != 'tsan' && matrix.flavor != 'functionaltest-lua' && (success() || failure() && steps.abort_job.outputs.status == 'success')
name: Unittests
run: ./ci/run_tests.sh unittests
- - if: matrix.flavor != 'tsan' && !cancelled()
+ - if: success() || failure() && steps.abort_job.outputs.status == 'success'
name: Functionaltests
run: ./ci/run_tests.sh functionaltests
- - if: "!cancelled()"
+ - if: matrix.flavor != 'tsan' && (success() || failure() && steps.abort_job.outputs.status == 'success')
name: Oldtests
run: ./ci/run_tests.sh oldtests
- - if: "!cancelled()"
+ - if: success() || failure() && steps.abort_job.outputs.status == 'success'
name: Install nvim
run: ./ci/run_tests.sh install_nvim
@@ -327,32 +285,67 @@ jobs:
runs-on: windows-2019
timeout-minutes: 45
env:
- DEPS_BUILD_DIR: ${{ format('{0}/nvim-deps', github.workspace) }}
- DEPS_PREFIX: ${{ format('{0}/nvim-deps/usr', github.workspace) }}
- CMAKE_BUILD_TYPE: "RelWithDebInfo"
+ DEPS_BUILD_DIR: ${{ github.workspace }}/nvim-deps
+ CACHE_NVIM_DEPS_DIR: ${{ github.workspace }}/nvim-deps
+ DEPS_PREFIX: ${{ github.workspace }}/nvim-deps/usr
name: windows (MSVC_64)
steps:
- uses: actions/checkout@v3
- - uses: actions/cache@v3
- with:
- path: ${{ env.DEPS_BUILD_DIR }}
- key: ${{ hashFiles('cmake.deps\**') }}
+ - uses: ./.github/actions/cache
+
+ - name: Set env
+ run: ./.github/workflows/env.ps1
- name: Build deps
- run: .\ci\build.ps1 -BuildDeps
+ run: |
+ cmake -S cmake.deps -B $env:DEPS_BUILD_DIR -G Ninja -DCMAKE_BUILD_TYPE='RelWithDebInfo'
+ cmake --build $env:DEPS_BUILD_DIR
- name: Build nvim
- run: .\ci\build.ps1 -Build
+ run: |
+ cmake -B build -G Ninja -DCMAKE_BUILD_TYPE='RelWithDebInfo' -DDEPS_PREFIX="$env:DEPS_PREFIX" -DCI_BUILD=ON
+ cmake --build build
- name: Install test deps
- continue-on-error: false
- run: .\ci\build.ps1 -EnsureTestDeps
+ run: |
+ $PSNativeCommandArgumentPassing = 'Legacy'
- - if: "!cancelled()"
- name: Run tests
- run: .\ci\build.ps1 -Test
+ & build\bin\nvim.exe "--version"
+
+ # Ensure that the "win32" feature is set.
+ & build\bin\nvim -u NONE --headless -c 'exe !has(\"win32\").\"cq\"'
+
+ python -m pip install pynvim
+ # Sanity check
+ python -c "import pynvim; print(str(pynvim))"
+
+ gem.cmd install --pre neovim
+ Get-Command -CommandType Application neovim-ruby-host.bat
+
+ node --version
+ npm.cmd --version
+
+ npm.cmd install -g neovim
+ Get-Command -CommandType Application neovim-node-host.cmd
+ npm.cmd link neovim
- if: "!cancelled()"
- name: Run old tests
- run: .\ci\build.ps1 -TestOld
+ name: Determine if run should be aborted
+ id: abort_job
+ run: |
+ "status=${{ job.status }}" >> $env:GITHUB_OUTPUT
+
+ - if: success() || failure() && steps.abort_job.outputs.status == 'success'
+ name: Run functionaltests
+ run: cmake --build build --target functionaltest
+
+ - if: success() || failure() && steps.abort_job.outputs.status == 'success'
+ name: Run oldtests
+ run: |
+ # Add MSYS to path, required for e.g. `find` used in test scripts.
+ # But would break functionaltests, where its `more` would be used then.
+ $OldPath = $env:PATH
+ $env:PATH = "C:\msys64\usr\bin;$env:PATH"
+ & "C:\msys64\mingw64\bin\mingw32-make.exe" -C $(Convert-Path src\nvim\testdir) VERBOSE=1
+ $env:PATH = $OldPath
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql.yml
index b31382af37..a11a87f93a 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql.yml
@@ -16,7 +16,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- language: [ 'cpp', 'python' ]
+ language: [ 'cpp' ]
steps:
- name: Checkout repository
@@ -26,9 +26,7 @@ jobs:
run: ./.github/workflows/env.sh
- name: Install apt packages
- run: |
- sudo apt-get update
- sudo apt-get install -y autoconf automake build-essential cmake cpanminus cscope gcc-multilib gdb gettext language-pack-tr libtool-bin locales ninja-build pkg-config python3 python3-pip python3-setuptools unzip valgrind xclip
+ run: ./.github/scripts/install_deps_ubuntu.sh
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
diff --git a/.github/workflows/coverity-scan.yml b/.github/workflows/coverity.yml
index ce7822b5c1..87e2cb1453 100644
--- a/.github/workflows/coverity-scan.yml
+++ b/.github/workflows/coverity.yml
@@ -37,7 +37,7 @@ jobs:
--form email=$EMAIL \
--form file=@cov-scan.tgz \
--form version="$(git rev-parse HEAD)" \
- --form description="Weekly GHA scan" \
+ --form description="Daily GHA scan" \
'https://scan.coverity.com/builds?project=neovim%2Fneovim'
env:
TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
diff --git a/.github/workflows/env.ps1 b/.github/workflows/env.ps1
new file mode 100644
index 0000000000..8ac267f2f9
--- /dev/null
+++ b/.github/workflows/env.ps1
@@ -0,0 +1,7 @@
+$installationPath = vswhere.exe -latest -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath
+if ($installationPath -and (Test-Path "$installationPath\Common7\Tools\vsdevcmd.bat")) {
+ & "${env:COMSPEC}" /s /c "`"$installationPath\Common7\Tools\vsdevcmd.bat`" -arch=x64 -no_logo && set" | ForEach-Object {
+ $name, $value = $_ -split '=', 2
+ "$name=$value" >> $env:GITHUB_ENV
+ }
+}
diff --git a/.github/workflows/env.sh b/.github/workflows/env.sh
index 061588da1a..d93552fed3 100755
--- a/.github/workflows/env.sh
+++ b/.github/workflows/env.sh
@@ -18,7 +18,6 @@ VALGRIND_LOG=$GITHUB_WORKSPACE/build/log/valgrind-%p.log
CACHE_NVIM_DEPS_DIR=$HOME/.cache/nvim-deps
CACHE_MARKER=$HOME/.cache/nvim-deps/.ci_cache_marker
CACHE_UNCRUSTIFY=$HOME/.cache/uncrustify
-UNCRUSTIFY_VERSION=uncrustify-0.75.0
EOF
DEPS_CMAKE_FLAGS=
@@ -30,7 +29,6 @@ case "$FLAVOR" in
BUILD_FLAGS="$BUILD_FLAGS -DPREFER_LUA=ON"
cat <<EOF >> "$GITHUB_ENV"
CLANG_SANITIZER=ASAN_UBSAN
-SYMBOLIZER=asan_symbolize-13
ASAN_OPTIONS=detect_leaks=1:check_initialization_order=1:log_path=$GITHUB_WORKSPACE/build/log/asan:intercept_tls_get_addr=0
UBSAN_OPTIONS=print_stacktrace=1 log_path=$GITHUB_WORKSPACE/build/log/ubsan
EOF
@@ -57,7 +55,7 @@ EOF
functionaltest-lua)
BUILD_FLAGS="$BUILD_FLAGS -DPREFER_LUA=ON"
FUNCTIONALTEST=functionaltest-lua
- DEPS_CMAKE_FLAGS="$DEPS_CMAKE_FLAGS -DUSE_BUNDLED_LUAJIT=OFF -DUSE_BUNDLED_TS_PARSERS=OFF"
+ DEPS_CMAKE_FLAGS="$DEPS_CMAKE_FLAGS -DUSE_BUNDLED_LUAJIT=OFF"
;;
*)
;;
diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml
index f85f9d0cda..60689029a3 100644
--- a/.github/workflows/labeler.yml
+++ b/.github/workflows/labeler.yml
@@ -44,6 +44,7 @@ jobs:
- name: 'Request reviewers'
uses: actions/github-script@v6
with:
+ github-token: ${{ secrets.TEAM_REVIEW }}
script: |
const script = require('./.github/scripts/reviews.js')
await script({github, context})
diff --git a/.github/workflows/commitlint.yml b/.github/workflows/lintcommit.yml
index 68be5436f6..a7a227865d 100644
--- a/.github/workflows/commitlint.yml
+++ b/.github/workflows/lintcommit.yml
@@ -1,8 +1,6 @@
name: "Commit Linter"
on:
- # Only pull_request and push honor [skip ci]. Since this workflow must pass
- # to merge a PR, it can't be skipped, so use pull_request_target
- pull_request_target:
+ pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches:
- 'master'
@@ -10,6 +8,8 @@ jobs:
lint-commits:
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
with:
diff --git a/.github/workflows/news.yml b/.github/workflows/news.yml
new file mode 100644
index 0000000000..46ac0ec02d
--- /dev/null
+++ b/.github/workflows/news.yml
@@ -0,0 +1,31 @@
+name: "news.txt check"
+on:
+ pull_request:
+ branches:
+ - 'master'
+jobs:
+ check:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ fetch-depth: 0
+ ref: ${{ github.event.pull_request.head.sha }}
+ - name: news.txt needs to be updated
+ run: |
+ for commit in $(git rev-list HEAD~${{ github.event.pull_request.commits }}..HEAD); do
+ message=$(git log -n1 --pretty=format:%s $commit)
+ type="$(echo "$message" | sed -E 's|([[:alpha:]]+)(\(.*\))?!?:.*|\1|')"
+ breaking="$(echo "$message" | sed -E 's|[[:alpha:]]+(\(.*\))?!:.*|breaking-change|')"
+ if [[ "$type" == "feat" ]] || [[ "$breaking" == "breaking-change" ]]; then
+ ! git diff HEAD~${{ github.event.pull_request.commits }}..HEAD --quiet runtime/doc/news.txt ||
+ {
+ echo "
+ Pull request includes a new feature or a breaking change, but
+ news.txt hasn't been updated yet. news.txt is our primary way of
+ communicating changes to users so it's important to keep it up to
+ date."
+ exit 1
+ }
+ fi
+ done
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index d6933e9330..1df33962e5 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -36,8 +36,10 @@ jobs:
id: build
run: |
CC=gcc-10 make CMAKE_BUILD_TYPE=${NVIM_BUILD_TYPE} CMAKE_EXTRA_FLAGS="-DCMAKE_INSTALL_PREFIX:PATH="
- printf '::set-output name=version::%s\n' "$(./build/bin/nvim --version | head -n 3 | sed -z 's/\n/%0A/g')"
- printf '::set-output name=release::%s\n' "$(./build/bin/nvim --version | head -n 1)"
+ printf 'version<<END\n' >> $GITHUB_OUTPUT
+ ./build/bin/nvim --version | head -n 3 >> $GITHUB_OUTPUT
+ printf 'END\n' >> $GITHUB_OUTPUT
+ printf 'release=%s\n' "$(./build/bin/nvim --version | head -n 1)" >> $GITHUB_OUTPUT
make DESTDIR="$GITHUB_WORKSPACE/build/release/nvim-linux64" install
cd "$GITHUB_WORKSPACE/build/"
cpack -C $NVIM_BUILD_TYPE
@@ -51,14 +53,28 @@ jobs:
appimage:
runs-on: ubuntu-20.04
+ container:
+ image: ubuntu:18.04
+ options: --privileged # Privileged mode is needed to load fuse module.
steps:
+ - name: Prepare container
+ run: |
+ apt-get update
+ apt-get install -y software-properties-common
+ add-apt-repository -y ppa:ubuntu-toolchain-r/test # For gcc-10.
+ add-apt-repository -y ppa:git-core/ppa # For git>=2.18.
+ apt-get update
+ apt-get install -y git gcc-10
+ apt-get install -y fuse libfuse2 # For linuxdeploy.
+ # Workaround for https://github.com/actions/checkout/issues/766.
+ git config --global --add safe.directory "$GITHUB_WORKSPACE"
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install dependencies
run: |
- sudo apt-get update
- sudo apt-get install -y autoconf automake build-essential cmake gettext libtool-bin locales ninja-build pkg-config unzip
+ apt-get update
+ apt-get install -y autoconf automake build-essential cmake gettext libtool-bin locales ninja-build pkg-config unzip
- if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name != 'nightly')
run: CC=gcc-10 make appimage-latest
- if: github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name == 'nightly')
@@ -113,6 +129,11 @@ jobs:
DEPS_CMAKE_FLAGS="$OSX_FLAGS"
make DESTDIR="$GITHUB_WORKSPACE/build/release/nvim-macos" install
cd "$GITHUB_WORKSPACE/build/"
+ # Make sure we build everything for M1 as well
+ for macho in bin/* lib/nvim/parser/*.so
+ do
+ lipo -info "$macho" | grep -q arm64 || exit 1
+ done
cpack -C "$NVIM_BUILD_TYPE"
- uses: actions/upload-artifact@v3
with:
@@ -126,26 +147,27 @@ jobs:
DEPS_BUILD_DIR: ${{ format('{0}/nvim-deps', github.workspace) }}
DEPS_PREFIX: ${{ format('{0}/nvim-deps/usr', github.workspace) }}
CMAKE_BUILD_TYPE: "RelWithDebInfo"
- strategy:
- matrix:
- include:
- - config: MSVC_64
- archive: nvim-win64
- name: windows (${{ matrix.config }})
+ name: windows (MSVC_64)
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
+ - name: Set env
+ run: ./.github/workflows/env.ps1
- name: Build deps
- run: .\ci\build.ps1 -BuildDeps
+ run: |
+ cmake -S cmake.deps -B $env:DEPS_BUILD_DIR -G Ninja -DCMAKE_BUILD_TYPE='RelWithDebInfo'
+ cmake --build $env:DEPS_BUILD_DIR
- name: build package
- run: .\ci\build.ps1 -Package
+ run: |
+ cmake -B build -G Ninja -DCMAKE_BUILD_TYPE='RelWithDebInfo' -DDEPS_PREFIX="$env:DEPS_PREFIX"
+ cmake --build build --target package
- uses: actions/upload-artifact@v3
with:
- name: ${{ matrix.archive }}
+ name: nvim-win64
path: |
- build/${{ matrix.archive }}.msi
- build/${{ matrix.archive }}.zip
+ build/nvim-win64.msi
+ build/nvim-win64.zip
retention-days: 1
publish:
@@ -227,16 +249,31 @@ jobs:
if [ "$TAG_NAME" != "nightly" ]; then
gh release create stable $PRERELEASE --notes-file "$RUNNER_TEMP/notes.md" --title "$SUBJECT" --target $GITHUB_SHA nvim-macos/* nvim-linux64/* appimage/* nvim-win64/*
fi
+
publish-winget:
- needs: publish # run after publish job is finished
- # publish to winget only on stable releases
- if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name != 'nightly')
- runs-on: windows-latest # action can only be run on windows
+ needs: publish
+ runs-on: windows-latest
steps:
- - uses: vedantmgoyal2009/winget-releaser@latest
+ - if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name != 'nightly')
+ name: Publish stable
+ uses: vedantmgoyal2009/winget-releaser@v1
with:
identifier: Neovim.Neovim
- # the latter one is a fallback value, reference:
- # https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
- release-tag: ${{ github.event.inputs.tag_name || github.ref }}
+ release-tag: ${{ github.event.inputs.tag_name || github.ref_name }}
+ token: ${{ secrets.WINGET_TOKEN }}
+ - if: github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name == 'nightly')
+ name: Get nightly version
+ id: get-version
+ run: |
+ Invoke-WebRequest https://github.com/neovim/neovim/releases/download/nightly/nvim-win64.msi -OutFile setup.msi
+ Install-Module -Name 'Carbon.Windows.Installer' -Force
+ $VERSION = (Get-CMsi (Resolve-Path .\setup.msi).Path).ProductVersion
+ "version=$VERSION" >> $env:GITHUB_OUTPUT
+ - if: github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name == 'nightly')
+ name: Publish nightly
+ uses: vedantmgoyal2009/winget-releaser@v1
+ with:
+ identifier: Neovim.Neovim.Nightly
+ version: ${{ steps.get-version.outputs.version }}
+ release-tag: nightly
token: ${{ secrets.WINGET_TOKEN }}
diff --git a/.github/workflows/remove-reviewers-on-draft.yml b/.github/workflows/remove-reviewers.yml
index f707f79737..7ab3ef568c 100644
--- a/.github/workflows/remove-reviewers-on-draft.yml
+++ b/.github/workflows/remove-reviewers.yml
@@ -12,6 +12,7 @@ jobs:
- name: 'Remove reviewers'
uses: actions/github-script@v6
with:
+ github-token: ${{ secrets.TEAM_REVIEW }}
script: |
const script = require('./.github/scripts/remove-reviewers.js')
await script({github, context})
diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml
new file mode 100644
index 0000000000..c1d3ee3ff3
--- /dev/null
+++ b/.github/workflows/stale.yml
@@ -0,0 +1,42 @@
+name: 'Close stale issues and PRs'
+on:
+ schedule:
+ - cron: '30 1 * * *' # Run every day at 01:30
+ workflow_dispatch:
+ issue_comment:
+
+jobs:
+ close:
+ if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
+ runs-on: ubuntu-latest
+ permissions:
+ issues: write
+ pull-requests: write
+ steps:
+ - uses: actions/stale@v7
+ with:
+ days-before-close: 30
+ days-before-stale: -1
+ stale-issue-label: needs:response
+ stale-pr-label: needs:response
+ remove-stale-when-updated: false
+ close-issue-message: "This issue has been closed since a request for
+ information has not been answered for 30 days. It can be reopened
+ when the requested information is provided."
+ close-pr-message: "This PR has been closed since a request for
+ changes has not been answered for 30 days. It can be reopened when
+ the requested changes are provided."
+
+ remove-label:
+ if: github.event_name == 'issue_comment'
+ runs-on: ubuntu-latest
+ permissions:
+ issues: write
+ pull-requests: write
+ steps:
+ - uses: actions/checkout@v3
+ - uses: actions/github-script@v6
+ with:
+ script: |
+ const script = require('./.github/scripts/unstale.js')
+ await script({github, context})
diff --git a/.github/workflows/vim-patches.yml b/.github/workflows/vim-patches.yml
index df8c8116b5..159eb09e7c 100644
--- a/.github/workflows/vim-patches.yml
+++ b/.github/workflows/vim-patches.yml
@@ -2,6 +2,7 @@ name: vim-patches
on:
schedule:
- cron: '3 3 * * *'
+ workflow_dispatch:
jobs:
update-vim-patches:
@@ -24,6 +25,8 @@ jobs:
path: ${{ env.VIM_SOURCE_DIR }}
fetch-depth: 0
+ - run: sudo apt-get install libfuse2
+
- run: |
gh release download -R neovim/neovim -p nvim.appimage
chmod a+x nvim.appimage
@@ -40,8 +43,8 @@ jobs:
id: update-version
run: |
git checkout -b ${VERSION_BRANCH}
- nvim -i NONE -u NONE --headless +'luafile scripts/vimpatch.lua' +q
- printf '::set-output name=NEW_PATCHES::%s\n' $([ -z "$(git diff)" ]; echo $?)
+ nvim -V1 -es -i NONE +'luafile scripts/vimpatch.lua' +q
+ printf 'NEW_PATCHES=%s\n' $([ -z "$(git diff)" ]; echo $?) >> $GITHUB_OUTPUT
- name: Automatic PR
if: ${{ steps.update-version.outputs.NEW_PATCHES != 0 }}