aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2023-11-30 20:35:25 +0000
committerJosh Rahm <joshuarahm@gmail.com>2023-11-30 20:35:25 +0000
commit1b7b916b7631ddf73c38e3a0070d64e4636cb2f3 (patch)
treecd08258054db80bb9a11b1061bb091c70b76926a /.github
parenteaa89c11d0f8aefbb512de769c6c82f61a8baca3 (diff)
parent4a8bf24ac690004aedf5540fa440e788459e5e34 (diff)
downloadrneovim-aucmd_textputpost.tar.gz
rneovim-aucmd_textputpost.tar.bz2
rneovim-aucmd_textputpost.zip
Merge remote-tracking branch 'upstream/master' into aucmd_textputpostaucmd_textputpost
Diffstat (limited to '.github')
-rw-r--r--.github/ISSUE_TEMPLATE/bug_report.yml13
-rw-r--r--.github/ISSUE_TEMPLATE/config.yml2
-rw-r--r--.github/ISSUE_TEMPLATE/lsp_bug_report.yml44
-rw-r--r--.github/actions/cache/action.yml19
-rw-r--r--.github/dependabot.yml8
-rw-r--r--.github/labeler.yml4
-rwxr-xr-x.github/scripts/build_universal_macos.sh21
-rw-r--r--.github/scripts/close_unresponsive.js55
-rw-r--r--.github/scripts/env.ps1 (renamed from .github/workflows/env.ps1)2
-rwxr-xr-x.github/scripts/install_deps.sh41
-rwxr-xr-x.github/scripts/install_deps_ubuntu.sh19
-rw-r--r--.github/scripts/remove-reviewers.js10
-rw-r--r--.github/scripts/remove_response_label.js (renamed from .github/scripts/unstale.js)0
-rw-r--r--.github/scripts/reviews.js122
-rw-r--r--.github/workflows/add-reviewers.yml6
-rw-r--r--.github/workflows/api-docs-check.yml18
-rw-r--r--.github/workflows/api-docs.yml74
-rw-r--r--.github/workflows/backport.yml17
-rw-r--r--.github/workflows/build.yml94
-rw-r--r--.github/workflows/ci.yml354
-rw-r--r--.github/workflows/codeql.yml33
-rw-r--r--.github/workflows/coverity.yml6
-rwxr-xr-x.github/workflows/env.sh69
-rw-r--r--.github/workflows/issue-open-check.yml34
-rw-r--r--.github/workflows/labeler.yml15
-rw-r--r--.github/workflows/lintcommit.yml22
-rw-r--r--.github/workflows/news.yml4
-rw-r--r--.github/workflows/notes.md27
-rw-r--r--.github/workflows/optional.yml41
-rw-r--r--.github/workflows/release.yml160
-rw-r--r--.github/workflows/remove-reviewers.yml5
-rw-r--r--.github/workflows/response.yml35
-rw-r--r--.github/workflows/stale.yml42
-rw-r--r--.github/workflows/test.yml342
-rw-r--r--.github/workflows/vim-patches.yml8
35 files changed, 911 insertions, 855 deletions
diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml
index 5fd7bc37b6..c07ae66c6f 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.yml
+++ b/.github/ISSUE_TEMPLATE/bug_report.yml
@@ -6,28 +6,33 @@ body:
- type: markdown
attributes:
value: |
- _Before reporting:_ search [existing issues](https://github.com/neovim/neovim/issues?q=is%3Aissue+is%3Aopen+label%3Abug) and check the [FAQ](https://github.com/neovim/neovim/wiki/FAQ). Usage questions such as "How do I...?" belong on the [Neovim Discourse](https://neovim.discourse.group/c/7-category/7) and will be closed.
+ *Before reporting:*
+ - Confirm the problem is reproducible on [**master**](https://github.com/neovim/neovim/releases/nightly) or [**latest stable**](https://github.com/neovim/neovim/releases/stable) release
+ - run `make distclean` when encountering build issues
+ - search [existing issues](https://github.com/neovim/neovim/issues?q=is%3Aissue+is%3Aopen+label%3Abug)
+ - check the [FAQ](https://github.com/neovim/neovim/wiki/FAQ)
+ Usage or "How to" questions belong on the [stackoverflow](https://vi.stackexchange.com/) and will be closed.
- type: textarea
attributes:
- label: "Describe the bug"
+ label: "Problem"
description: "Describe the current behavior. May include logs, images, or videos."
validations:
required: true
-
- type: textarea
attributes:
label: "Steps to reproduce"
description: |
- For build failures: list the exact steps including CMake flags (if any).
- For startup or shell-related problems: try `env -i TERM=ansi-256color "$(which nvim)"`.
+ - See [Minimal-reproduction-template](https://github.com/neovim/neovim/wiki/Minimal-reproduction-template) for how to create a minimal configuration.
+ - Please do **not** include a package manager in the reproduction steps.
placeholder: |
nvim --clean
:edit foo
yiwp
validations:
required: true
-
- type: textarea
attributes:
label: "Expected behavior"
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
index 1e717ba6c5..f25732f90d 100644
--- a/.github/ISSUE_TEMPLATE/config.yml
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -1,5 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Question
- url: https://neovim.discourse.group/
+ url: https://vi.stackexchange.com/
about: Ask questions about configuration and usage of Neovim
diff --git a/.github/ISSUE_TEMPLATE/lsp_bug_report.yml b/.github/ISSUE_TEMPLATE/lsp_bug_report.yml
index 88867ce644..bdad12e412 100644
--- a/.github/ISSUE_TEMPLATE/lsp_bug_report.yml
+++ b/.github/ISSUE_TEMPLATE/lsp_bug_report.yml
@@ -6,27 +6,14 @@ body:
- type: markdown
attributes:
value: |
- _Before reporting:_ search [existing issues](https://github.com/neovim/neovim/issues?q=is%3Aissue+is%3Aopen+label%3Abug) and check the [FAQ](https://github.com/neovim/neovim/wiki/FAQ). Usage questions such as "How do I...?" or "Why isn't X language server/feature working?" belong on the [Neovim Discourse](https://neovim.discourse.group/c/7-category/7) and will be closed.
+ _Before reporting:_ search [existing issues](https://github.com/neovim/neovim/issues?q=is%3Aissue+is%3Aopen+label%3Abug) and check the [FAQ](https://github.com/neovim/neovim/wiki/FAQ). Usage questions or "Why isn't X language server/feature working?" belong on [stackoverflow](https://vi.stackexchange.com/) and will be closed.
- - type: input
- attributes:
- label: "Neovim version (nvim -v)"
- placeholder: "0.6.0 commit db1b0ee3b30f"
- validations:
- required: true
- - type: input
- attributes:
- label: "Language server name/version"
- placeholder: "rls 0.5.2"
- validations:
- required: true
- - type: input
+ - type: textarea
attributes:
- label: "Operating system/version"
- placeholder: "emacs 23"
+ label: "Problem"
+ description: "Describe the bug caused by the Nvim LSP client."
validations:
required: true
-
- type: textarea
attributes:
label: 'Steps to reproduce using "nvim -u minimal_init.lua"'
@@ -46,7 +33,7 @@ body:
pattern = pattern,
callback = function(args)
local match = vim.fs.find(root_markers, { path = args.file, upward = true })[1]
- local root_dir = match and vim.fn.fnamemodify(match, ':p:h') or vim.NIL
+ local root_dir = match and vim.fn.fnamemodify(match, ':p:h') or nil
vim.lsp.start({
name = 'bugged-ls',
cmd = cmd,
@@ -65,14 +52,29 @@ body:
_Note_: if the issue is with an autocompletion or other LSP plugin, report to that plugin's issue tracker.
validations:
required: true
-
- type: textarea
attributes:
label: "Expected behavior"
description: "Describe the behavior you expect. May include logs, images, or videos."
- - type: textarea
+
+ - type: input
+ attributes:
+ label: "Neovim version (nvim -v)"
+ placeholder: "0.6.0 commit db1b0ee3b30f"
+ validations:
+ required: true
+ - type: input
+ attributes:
+ label: "Language server name/version"
+ placeholder: "rls 0.5.2"
+ validations:
+ required: true
+ - type: input
attributes:
- label: "Actual behavior"
+ label: "Operating system/version"
+ placeholder: "emacs 23"
+ validations:
+ required: true
- type: input
attributes:
diff --git a/.github/actions/cache/action.yml b/.github/actions/cache/action.yml
index 858045c02a..d668c7a7cc 100644
--- a/.github/actions/cache/action.yml
+++ b/.github/actions/cache/action.yml
@@ -3,20 +3,31 @@ description: "This action caches neovim dependencies"
runs:
using: "composite"
steps:
- - run: echo "CACHE_KEY=${{ github.job }}-${{ github.base_ref }}" >> $GITHUB_ENV
+ - run: echo "CACHE_KEY=${{ github.workflow }}" >> $GITHUB_ENV
+ shell: bash
+
+ - run: echo "CACHE_KEY=${{ github.job }}" >> $GITHUB_ENV
shell: bash
- if: ${{ matrix }}
run: echo "CACHE_KEY=$CACHE_KEY-${{ join(matrix.*, '-') }}" >> $GITHUB_ENV
shell: bash
+ - if: ${{ matrix.build }}
+ run: echo "CACHE_KEY=$CACHE_KEY-${{ join(matrix.build.*, '-') }}" >> $GITHUB_ENV
+ shell: bash
+
+ - id: image
+ run: echo "version=$ImageVersion" >> $GITHUB_OUTPUT
+ shell: bash
+
# Avoid using '**/CMakeLists.txt' (or any pattern starting with '**/') even
# if it makes the expression below simpler. hashFiles() has a timer that
# will fail the job if it times out, which can happen if there are too many
# files to search through.
- uses: actions/cache@v3
with:
- path: ${{ env.CACHE_NVIM_DEPS_DIR }}
- key: ${{ env.CACHE_KEY }}-${{ hashFiles('cmake**', 'ci/**',
- '.github/workflows/ci.yml', 'CMakeLists.txt',
+ path: .deps
+ key: ${{ env.CACHE_KEY }}-${{ steps.image.outputs.version }}-${{ hashFiles('cmake**',
+ '.github/**', 'CMakeLists.txt',
'runtime/CMakeLists.txt', 'src/nvim/**/CMakeLists.txt') }}
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 0000000000..e96fd5286f
--- /dev/null
+++ b/.github/dependabot.yml
@@ -0,0 +1,8 @@
+version: 2
+updates:
+ - package-ecosystem: "github-actions"
+ directory: "/"
+ schedule:
+ interval: "daily"
+ commit-message:
+ prefix: "ci"
diff --git a/.github/labeler.yml b/.github/labeler.yml
index ad48287246..111fc5f373 100644
--- a/.github/labeler.yml
+++ b/.github/labeler.yml
@@ -2,10 +2,6 @@
- runtime/lua/vim/lsp.lua
- runtime/lua/vim/lsp/*
-"lua":
- - runtime/lua/**/*
- - src/nvim/lua/*
-
"tui":
- src/nvim/tui/tui.*
diff --git a/.github/scripts/build_universal_macos.sh b/.github/scripts/build_universal_macos.sh
new file mode 100755
index 0000000000..d07c395cd6
--- /dev/null
+++ b/.github/scripts/build_universal_macos.sh
@@ -0,0 +1,21 @@
+#!/bin/bash -e
+
+MACOSX_DEPLOYMENT_TARGET="$(sw_vers -productVersion | cut -f1 -d.)"
+export MACOSX_DEPLOYMENT_TARGET
+cmake -S cmake.deps -B .deps -G Ninja \
+ -D CMAKE_BUILD_TYPE=${NVIM_BUILD_TYPE} \
+ -D CMAKE_OSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} \
+ -D CMAKE_OSX_ARCHITECTURES=arm64\;x86_64 \
+ -D CMAKE_FIND_FRAMEWORK=NEVER
+cmake --build .deps
+cmake -B build -G Ninja \
+ -D CMAKE_BUILD_TYPE=${NVIM_BUILD_TYPE} \
+ -D CMAKE_OSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} \
+ -D CMAKE_OSX_ARCHITECTURES=arm64\;x86_64 \
+ -D CMAKE_FIND_FRAMEWORK=NEVER
+cmake --build build
+# Make sure we build everything for M1 as well
+for macho in build/bin/* build/lib/nvim/parser/*.so; do
+ lipo -info "$macho" | grep -q arm64 || exit 1
+done
+cpack --config build/CPackConfig.cmake
diff --git a/.github/scripts/close_unresponsive.js b/.github/scripts/close_unresponsive.js
new file mode 100644
index 0000000000..f0e8bbe93e
--- /dev/null
+++ b/.github/scripts/close_unresponsive.js
@@ -0,0 +1,55 @@
+function labeledEvent(data) {
+ return data.event === "labeled" && data.label.name === "needs:response";
+}
+
+const numberOfDaysLimit = 30;
+const close_message = `This has been closed since a request for information has \
+not been answered for ${numberOfDaysLimit} days. It can be reopened when the \
+requested information is provided.`;
+
+module.exports = async ({ github, context }) => {
+ const owner = context.repo.owner;
+ const repo = context.repo.repo;
+
+ const issues = await github.rest.issues.listForRepo({
+ owner: owner,
+ repo: repo,
+ labels: "needs:response",
+ });
+ const numbers = issues.data.map((e) => e.number);
+
+ for (const number of numbers) {
+ const events = await github.paginate(
+ github.rest.issues.listEventsForTimeline,
+ {
+ owner: owner,
+ repo: repo,
+ issue_number: number,
+ },
+ (response) => response.data.filter(labeledEvent)
+ );
+
+ const latest_response_label = events[events.length - 1];
+
+ const created_at = new Date(latest_response_label.created_at);
+ const now = new Date();
+ const diff = now - created_at;
+ const diffDays = diff / (1000 * 60 * 60 * 24);
+
+ if (diffDays > numberOfDaysLimit) {
+ github.rest.issues.update({
+ owner: owner,
+ repo: repo,
+ issue_number: number,
+ state: "closed",
+ });
+
+ github.rest.issues.createComment({
+ owner: owner,
+ repo: repo,
+ issue_number: number,
+ body: close_message,
+ });
+ }
+ }
+};
diff --git a/.github/workflows/env.ps1 b/.github/scripts/env.ps1
index 8ac267f2f9..d1dba5d558 100644
--- a/.github/workflows/env.ps1
+++ b/.github/scripts/env.ps1
@@ -1,3 +1,5 @@
+# This script enables Developer Command Prompt
+# See https://github.com/microsoft/vswhere/wiki/Start-Developer-Command-Prompt#using-powershell
$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 {
diff --git a/.github/scripts/install_deps.sh b/.github/scripts/install_deps.sh
new file mode 100755
index 0000000000..9a782e9698
--- /dev/null
+++ b/.github/scripts/install_deps.sh
@@ -0,0 +1,41 @@
+#!/bin/bash
+
+while (($# > 0)); do
+ case $1 in
+ --test) # install test dependencies
+ TEST=1
+ shift
+ ;;
+ esac
+done
+
+os=$(uname -s)
+if [[ $os == Linux ]]; then
+ sudo apt-get update
+ sudo apt-get install -y build-essential cmake curl gettext ninja-build
+
+ 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 attr libattr1-dev gdb
+ fi
+elif [[ $os == Darwin ]]; then
+ brew update --quiet
+ brew install ninja
+ if [[ -n $TEST ]]; then
+ brew install cpanminus
+ fi
+fi
diff --git a/.github/scripts/install_deps_ubuntu.sh b/.github/scripts/install_deps_ubuntu.sh
deleted file mode 100755
index 012409ba4a..0000000000
--- a/.github/scripts/install_deps_ubuntu.sh
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/bash
-
-PACKAGES=(
- autoconf
- automake
- build-essential
- cmake
- cpanminus
- curl
- gettext
- libtool-bin
- locales-all
- ninja-build
- pkg-config
- unzip
-)
-
-sudo apt-get update
-sudo apt-get install -y "${PACKAGES[@]}"
diff --git a/.github/scripts/remove-reviewers.js b/.github/scripts/remove-reviewers.js
index 40a8eca423..9e44e4ac86 100644
--- a/.github/scripts/remove-reviewers.js
+++ b/.github/scripts/remove-reviewers.js
@@ -1,18 +1,16 @@
-module.exports = async ({github, context}) => {
+module.exports = async ({ github, context }) => {
const requestedReviewers = await github.rest.pulls.listRequestedReviewers({
owner: context.repo.owner,
repo: context.repo.repo,
- pull_number: context.issue.number
+ pull_number: context.issue.number,
});
- const reviewers = requestedReviewers.data.users.map(e => e.login)
- const team_reviewers = requestedReviewers.data.teams.map(e => e.name);
+ const reviewers = requestedReviewers.data.users.map((e) => e.login);
github.rest.pulls.removeRequestedReviewers({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.issue.number,
reviewers: reviewers,
- team_reviewers: team_reviewers
});
-}
+};
diff --git a/.github/scripts/unstale.js b/.github/scripts/remove_response_label.js
index f645fca5cb..f645fca5cb 100644
--- a/.github/scripts/unstale.js
+++ b/.github/scripts/remove_response_label.js
diff --git a/.github/scripts/reviews.js b/.github/scripts/reviews.js
index cc6aaa1e8b..d28d91c2f6 100644
--- a/.github/scripts/reviews.js
+++ b/.github/scripts/reviews.js
@@ -1,108 +1,118 @@
-module.exports = async ({github, context}) => {
+module.exports = async ({ github, context }) => {
const pr_data = await github.rest.pulls.get({
owner: context.repo.owner,
repo: context.repo.repo,
- pull_number: context.issue.number
- })
- const labels = pr_data.data.labels.map(e => e.name)
+ pull_number: context.issue.number,
+ });
+ const labels = pr_data.data.labels.map((e) => e.name);
+ const reviewers = new Set();
+
+ if (labels.includes("api")) {
+ reviewers.add("bfredl");
+ reviewers.add("famiu");
+ }
- const reviewers = new Set()
- const team_reviewers = new Array()
- if (labels.includes('api')) {
- reviewers.add("bfredl")
- reviewers.add("muniter")
+ if (labels.includes("build")) {
+ reviewers.add("dundargoc");
+ reviewers.add("jamessan");
+ reviewers.add("justinmk");
}
- if (labels.includes('build')) {
- reviewers.add("jamessan")
- reviewers.add("justinmk")
+ if (labels.includes("ci")) {
+ reviewers.add("dundargoc");
+ reviewers.add("jamessan");
+ reviewers.add("justinmk");
}
- if (labels.includes('ci')) {
- team_reviewers.push('ci');
+ if (labels.includes("column")) {
+ reviewers.add("lewis6991");
}
- if (labels.includes('column')) {
- reviewers.add("lewis6991")
+ if (labels.includes("dependencies")) {
+ reviewers.add("jamessan");
}
- if (labels.includes('dependencies')) {
- reviewers.add("jamessan")
+ if (labels.includes("diagnostic")) {
+ reviewers.add("gpanders");
}
- if (labels.includes('diagnostic')) {
- reviewers.add("gpanders")
+ if (labels.includes("diff")) {
+ reviewers.add("lewis6991");
}
- if (labels.includes('diff')) {
- reviewers.add("lewis6991")
+ if (labels.includes("distribution")) {
+ reviewers.add("jamessan");
}
- if (labels.includes('distribution')) {
- reviewers.add("jamessan")
+ if (labels.includes("documentation")) {
+ reviewers.add("clason");
}
- if (labels.includes('documentation')) {
- reviewers.add("clason")
+ if (labels.includes("extmarks")) {
+ reviewers.add("bfredl");
}
- if (labels.includes('extmarks')) {
- reviewers.add("bfredl")
+ if (labels.includes("filetype")) {
+ reviewers.add("clason");
+ reviewers.add("gpanders");
+ reviewers.add("smjonas");
}
- if (labels.includes('filetype')) {
- reviewers.add("clason")
- reviewers.add("gpanders")
- reviewers.add("smjonas")
+ if (labels.includes("lsp")) {
+ reviewers.add("folke");
+ reviewers.add("MariaSolOs");
+ reviewers.add("mfussenegger");
}
- if (labels.includes('lsp')) {
- team_reviewers.push('lsp');
+ if (labels.includes("options")) {
+ reviewers.add("famiu");
}
- if (labels.includes('platform:nix')) {
- reviewers.add("teto")
+ if (labels.includes("platform:nix")) {
+ reviewers.add("teto");
}
- if (labels.includes('project-management')) {
- reviewers.add("bfredl")
- reviewers.add("justinmk")
+ if (labels.includes("project-management")) {
+ reviewers.add("bfredl");
+ reviewers.add("justinmk");
}
- if (labels.includes('refactor')) {
- reviewers.add("bfredl")
+ if (labels.includes("statusline")) {
+ reviewers.add("famiu");
}
- if (labels.includes('test')) {
- reviewers.add("justinmk")
+ if (labels.includes("test")) {
+ reviewers.add("justinmk");
}
- if (labels.includes('treesitter')) {
- team_reviewers.push('treesitter');
+ if (labels.includes("treesitter")) {
+ reviewers.add("bfredl");
+ reviewers.add("clason");
+ reviewers.add("lewis6991");
}
- if (labels.includes('typo')) {
- reviewers.add("dundargoc")
+ if (labels.includes("typo")) {
+ reviewers.add("dundargoc");
}
- if (labels.includes('ui')) {
- reviewers.add("bfredl")
+ if (labels.includes("ui")) {
+ reviewers.add("bfredl");
+ reviewers.add("famiu");
}
- if (labels.includes('vim-patch')) {
- reviewers.add("seandewar")
- reviewers.add("zeertzjq")
+ if (labels.includes("vim-patch")) {
+ reviewers.add("seandewar");
+ reviewers.add("zeertzjq");
}
// Remove person that opened the PR since they can't review themselves
- const pr_opener = pr_data.data.user.login
- reviewers.delete(pr_opener)
+ const pr_opener = pr_data.data.user.login;
+ reviewers.delete(pr_opener);
github.rest.pulls.requestReviewers({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.issue.number,
reviewers: Array.from(reviewers),
- team_reviewers: team_reviewers
});
-}
+};
diff --git a/.github/workflows/add-reviewers.yml b/.github/workflows/add-reviewers.yml
index f1abab5c53..22c68b6ef7 100644
--- a/.github/workflows/add-reviewers.yml
+++ b/.github/workflows/add-reviewers.yml
@@ -2,6 +2,7 @@ name: "Request reviews"
on:
pull_request_target:
types: [labeled, ready_for_review, reopened]
+ workflow_call:
jobs:
request-reviewer:
if: github.event.pull_request.state == 'open' && github.event.pull_request.draft == false
@@ -9,11 +10,10 @@ jobs:
permissions:
pull-requests: write
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- name: 'Request reviewers'
- uses: actions/github-script@v6
+ uses: actions/github-script@v7
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-check.yml b/.github/workflows/api-docs-check.yml
deleted file mode 100644
index 0a57df7c33..0000000000
--- a/.github/workflows/api-docs-check.yml
+++ /dev/null
@@ -1,18 +0,0 @@
-name: Missing API docs
-on:
- pull_request:
- branches-ignore:
- - 'marvim/api-doc-update**'
- paths:
- - 'src/nvim/api/*.[ch]'
- - 'runtime/lua/**.lua'
- - 'runtime/doc/**'
-
-jobs:
- call-regen-api-docs:
- permissions:
- contents: write
- pull-requests: write
- uses: ./.github/workflows/api-docs.yml
- with:
- check_only: true
diff --git a/.github/workflows/api-docs.yml b/.github/workflows/api-docs.yml
index fa8a7dbca0..6f8fe107d2 100644
--- a/.github/workflows/api-docs.yml
+++ b/.github/workflows/api-docs.yml
@@ -1,74 +1,34 @@
-# Autogenerate the API docs on new commit to important branches
-# Also work as a check for PR's to not forget committing their doc changes
-# called from api-docs-check.yml
-name: Autogenerate API docs
+# Check if any PR needs to run the autogenerate script
+name: Autogenerate API docs and types
on:
- push:
+ pull_request:
+ types: [opened, synchronize, reopened, ready_for_review]
paths:
- 'src/nvim/api/*.[ch]'
+ - 'src/nvim/eval.lua'
- 'runtime/lua/**.lua'
- 'runtime/doc/**'
- branches:
- - 'master'
- - 'release-[0-9]+.[0-9]+'
- workflow_dispatch:
- workflow_call:
- inputs:
- check_only:
- type: boolean
- default: false
- required: false
jobs:
- regen-api-docs:
+ regen-api-docs-and-types:
runs-on: ubuntu-latest
+ if: github.event.pull_request.draft == false
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
- # to create a PR we need to access other branches, which requires a
- # full clone.
- fetch-depth: 0
-
+ - uses: actions/checkout@v4
- name: Install dependencies
run: |
- sudo apt-get update
- sudo env DEBIAN_FRONTEND=noninteractive apt-get install -y doxygen python3 python3-msgpack
-
- - name: Setup git config
- run: |
- git config --global user.name 'marvim'
- git config --global user.email 'marvim@users.noreply.github.com'
-
- - run: printf 'DOC_BRANCH=marvim/api-doc-update/%s\n' ${GITHUB_REF#refs/heads/} >> $GITHUB_ENV
+ ./.github/scripts/install_deps.sh
+ sudo apt-get install -y doxygen python3-msgpack
+ - uses: ./.github/actions/cache
- name: Generate docs
- id: docs
- run: |
- git checkout -b ${DOC_BRANCH}
- python3 scripts/gen_vimdoc.py
- 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 }}
- run: |
- echo "Job failed, run ./scripts/gen_vimdoc.py and commit your doc changes"
- echo "The doc generation produces the following changes:"
- git diff --color --exit-code
-
- - name: Automatic PR
- if: ${{ steps.docs.outputs.UPDATED_DOCS != 0 && !inputs.check_only }}
run: |
- git add -u
- git commit -m 'docs: regenerate [skip ci]'
- git push --force https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY} ${DOC_BRANCH}
- gh pr create --draft --fill --base ${GITHUB_REF#refs/heads/} --head ${DOC_BRANCH} || true
+ make doc
+ if [ -n "$(git status --porcelain)" ]; then
+ echo "::error::Job failed, run 'make doc' and commit your doc changes."
+ echo "::error::The doc generation produces the following changes:"
+ git diff --color --exit-code
+ fi
diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml
index 019fb20689..321cd02b0c 100644
--- a/.github/workflows/backport.yml
+++ b/.github/workflows/backport.yml
@@ -8,20 +8,9 @@ jobs:
contents: write
pull-requests: write
name: Backport Pull Request
- if: >
- github.repository_owner == 'neovim' && (
- github.event_name == 'pull_request_target' &&
- github.event.pull_request.merged
- )
+ if: github.event.pull_request.merged
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
- with:
- # required to find all branches
- fetch-depth: 0
- ref: ${{ github.event.pull_request.head.sha }}
+ - uses: actions/checkout@v4
- name: Create backport PRs
- uses: zeebe-io/backport-action@v0
- with:
- github_token: ${{ secrets.GITHUB_TOKEN }}
- github_workspace: ${{ github.workspace }}
+ uses: korthout/backport-action@v2
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 0000000000..d6e11fcdcb
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,94 @@
+name: build
+on:
+ pull_request:
+ branches:
+ - 'master'
+ - 'release-[0-9]+.[0-9]+'
+ paths:
+ - '**.cmake'
+ - '**/CMakeLists.txt'
+ - '**/CMakePresets.json'
+ - 'cmake.*/**'
+ - '.github/**'
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.head_ref }}
+ cancel-in-progress: true
+
+env:
+ BIN_DIR: ${{ github.workspace }}/bin
+ INSTALL_PREFIX: ${{ github.workspace }}/nvim-install
+
+jobs:
+ macos-universal:
+ runs-on: macos-latest
+ timeout-minutes: 20
+ steps:
+ - uses: actions/checkout@v4
+ - run: ./.github/scripts/install_deps.sh
+ - run: printf 'NVIM_BUILD_TYPE=Release\n' >> $GITHUB_ENV
+
+ - name: Build universal binary
+ run: ./.github/scripts/build_universal_macos.sh
+
+ old-cmake:
+ name: Test oldest supported cmake
+ runs-on: ubuntu-22.04
+ timeout-minutes: 15
+ env:
+ CMAKE_URL: 'https://cmake.org/files/v3.10/cmake-3.10.0-Linux-x86_64.sh'
+ 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 minimum required version of cmake
+ run: |
+ curl --retry 5 --silent --show-error --fail -o /tmp/cmake-installer.sh "$CMAKE_URL"
+ mkdir -p "$BIN_DIR" /opt/cmake-custom
+ chmod a+x /tmp/cmake-installer.sh
+ /tmp/cmake-installer.sh --prefix=/opt/cmake-custom --skip-license
+ ln -sfn /opt/cmake-custom/bin/cmake "$BIN_DIR/cmake"
+ cmake_version="$(cmake --version | head -1)"
+ echo "$cmake_version" | grep -qF "cmake version $CMAKE_VERSION" || {
+ echo "Unexpected CMake version: $cmake_version"
+ exit 1
+ }
+
+ - name: Build dependencies
+ run: make deps
+
+ - name: Build
+ run: make CMAKE_FLAGS="-D CI_BUILD=ON -D CMAKE_INSTALL_PREFIX:PATH=$INSTALL_PREFIX"
+
+ - name: Install
+ run: make install
+
+ use-existing-src:
+ name: Test USE_EXISTING_SRC_DIR=ON builds with no network access
+ runs-on: ubuntu-22.04
+ steps:
+ - uses: actions/checkout@v4
+ - run: ./.github/scripts/install_deps.sh
+
+ - name: Build bundled dependencies
+ run: make deps
+
+ - name: Clean bundled dependencies à la neovim/deps
+ run: |
+ rm -rf ./build
+ find .deps .deps/build -maxdepth 1 '!' \( -name .deps -o -name build -o -name src \) -exec rm -r '{}' +
+ cd .deps/build/src
+ rm -rf ./*-build
+ rm -rf ./*-stamp/*-{configure,build,install,done}
+ for d in *; do (cd "$d"; rm -rf ./autom4te.cache; make clean || true; make distclean || true); done
+
+ - name: Re-build bundled dependencies with no network access
+ run: unshare --map-root-user --net make deps DEPS_CMAKE_FLAGS=-DUSE_EXISTING_SRC_DIR=ON
+
+ - name: Build
+ run: make CMAKE_FLAGS="-D CI_BUILD=ON"
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
deleted file mode 100644
index 83ee4f0358..0000000000
--- a/.github/workflows/ci.yml
+++ /dev/null
@@ -1,354 +0,0 @@
-name: CI
-on:
- push:
- branches:
- - 'master'
- - 'release-[0-9]+.[0-9]+'
- pull_request:
- branches:
- - 'master'
- - 'release-[0-9]+.[0-9]+'
- paths-ignore:
- - '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-22.04
- timeout-minutes: 10
- env:
- CC: gcc
- steps:
- - uses: actions/checkout@v3
-
- - name: Setup common environment variables
- run: ./.github/workflows/env.sh lint
-
- - name: Install apt packages
- run: |
- ./.github/scripts/install_deps_ubuntu.sh
- sudo apt-get install -y lua-check
-
- - name: Cache uncrustify
- id: cache-uncrustify
- uses: actions/cache@v3
- with:
- path: ${{ env.CACHE_UNCRUSTIFY }}
- key: ${{ env.UNCRUSTIFY_VERSION }}
-
- - name: Clone uncrustify
- if: steps.cache-uncrustify.outputs.cache-hit != 'true'
- uses: actions/checkout@v3
- with:
- repository: uncrustify/uncrustify
- ref: ${{ env.UNCRUSTIFY_VERSION }}
- path: uncrustify
-
- - name: Install uncrustify
- if: steps.cache-uncrustify.outputs.cache-hit != 'true'
- run: |
- source_dir=uncrustify
- build_dir=uncrustify/build
- cmake -S $source_dir -B $build_dir -G Ninja -DCMAKE_BUILD_TYPE=Release
- cmake --build $build_dir
- mkdir -p $HOME/.cache
- cp $build_dir/uncrustify ${{ env.CACHE_UNCRUSTIFY }}
-
- - 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@v2
- with:
- token: ${{ secrets.GITHUB_TOKEN }}
- version: latest
- args: --check runtime/
-
- - 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: success() || failure() && steps.abort_job.outputs.status == 'success'
- name: lintsh
- run: make lintsh
-
- - 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: success() || failure() && steps.abort_job.outputs.status == 'success'
- name: suggester / uncrustify
- uses: reviewdog/action-suggester@v1
- with:
- github_token: ${{ secrets.GITHUB_TOKEN }}
- tool_name: uncrustify
- cleanup: false
-
- - if: success() || failure() && steps.abort_job.outputs.status == 'success'
- name: check uncrustify
- run: |
- git diff --color --exit-code
-
- - name: Cache dependencies
- run: ./ci/before_cache.sh
-
- lintc:
- # This job tests two things: it lints the code but also builds neovim using
- # system dependencies instead of bundled dependencies. This is to make sure
- # we are able to build neovim without pigeonholing ourselves into specifics
- # 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-22.04
- timeout-minutes: 10
- env:
- CC: gcc
- steps:
- - uses: actions/checkout@v3
-
- - name: Setup common environment variables
- run: ./.github/workflows/env.sh lintc
-
- - name: Install apt packages
- run: |
- sudo add-apt-repository ppa:neovim-ppa/stable
- ./.github/scripts/install_deps_ubuntu.sh
- sudo apt-get install -y \
- libluajit-5.1-dev \
- libmsgpack-dev \
- libtermkey-dev \
- libtree-sitter-dev \
- libunibilium-dev \
- libuv1-dev \
- lua-busted \
- lua-filesystem \
- lua-inspect \
- lua-lpeg \
- lua-nvim \
- luajit
- # libvterm-dev \
- # lua-luv-dev
-
- # Remove comments from packages once we start using these external
- # dependencies. See env.sh for more context.
-
- - uses: ./.github/actions/cache
-
- - name: Build third-party deps
- run: ./ci/before_script.sh
-
- - name: Build nvim
- run: make
-
- - 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: 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
-
- - name: Cache dependencies
- run: ./ci/before_cache.sh
-
- posix:
- name: ${{ matrix.runner }} ${{ matrix.flavor }} (cc=${{ matrix.cc }})
- strategy:
- fail-fast: false
- matrix:
- include:
- - flavor: asan
- cc: clang
- runner: ubuntu-22.04
- os: linux
- - flavor: tsan
- cc: clang
- runner: ubuntu-22.04
- os: linux
- - flavor: uchar
- cc: gcc
- runner: ubuntu-22.04
- os: linux
- - cc: clang
- runner: macos-12
- os: osx
-
- # functionaltest-lua is our dumping ground for non-mainline configurations.
- # 1. Check that the tests pass with PUC Lua instead of LuaJIT.
- # 2. Use as oldest/minimum versions of dependencies/build tools we
- # still explicitly support so we don't accidentally rely on
- # features that is only available on later versions.
- # 3. No treesitter parsers installed.
- - flavor: functionaltest-lua
- cc: gcc
- runner: ubuntu-22.04
- os: linux
- cmake: minimum_required
- runs-on: ${{ matrix.runner }}
- timeout-minutes: 45
- env:
- CC: ${{ matrix.cc }}
- CI_OS_NAME: ${{ matrix.os }}
- steps:
- - uses: actions/checkout@v3
-
- - name: Setup common environment variables
- run: ./.github/workflows/env.sh ${{ matrix.flavor }}
-
- - name: Install apt packages
- if: matrix.os == 'linux'
- run: ./.github/scripts/install_deps_ubuntu.sh
-
- - name: Install minimum required version of cmake
- if: matrix.cmake == 'minimum_required'
- env:
- CMAKE_URL: 'https://cmake.org/files/v3.10/cmake-3.10.0-Linux-x86_64.sh'
- CMAKE_VERSION: '3.10.0'
- shell: bash
- run: |
- curl --retry 5 --silent --show-error --fail -o /tmp/cmake-installer.sh "$CMAKE_URL"
- mkdir -p "$HOME/.local/bin" /opt/cmake-custom
- chmod a+x /tmp/cmake-installer.sh
- /tmp/cmake-installer.sh --prefix=/opt/cmake-custom --skip-license
- ln -sfn /opt/cmake-custom/bin/cmake "$HOME/.local/bin/cmake"
- cmake_version="$(cmake --version | head -1)"
- echo "$cmake_version" | grep -qF "cmake version $CMAKE_VERSION" || {
- echo "Unexpected CMake version: $cmake_version"
- exit 1
- }
-
- - name: Install brew packages
- if: matrix.os == 'osx'
- run: |
- brew update --quiet
- brew install automake cpanminus ninja
-
- - name: Setup interpreter packages
- run: ./ci/install.sh
-
- - uses: ./.github/actions/cache
-
- - name: Build third-party deps
- run: ./ci/before_script.sh
-
- - name: Build
- run: ./ci/run_tests.sh build_nvim
-
- - 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: success() || failure() && steps.abort_job.outputs.status == 'success'
- name: Functionaltests
- run: ./ci/run_tests.sh functionaltests
-
- - if: matrix.flavor != 'tsan' && (success() || failure() && steps.abort_job.outputs.status == 'success')
- name: Oldtests
- run: ./ci/run_tests.sh oldtests
-
- - if: success() || failure() && steps.abort_job.outputs.status == 'success'
- name: Install nvim
- run: ./ci/run_tests.sh install_nvim
-
- - name: Cache dependencies
- run: ./ci/before_cache.sh
-
- windows:
- runs-on: windows-2019
- timeout-minutes: 45
- env:
- 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: ./.github/actions/cache
-
- - name: Set env
- run: ./.github/workflows/env.ps1
-
- - name: Build deps
- 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: |
- cmake -B build -G Ninja -DCMAKE_BUILD_TYPE='RelWithDebInfo' -DDEPS_PREFIX="$env:DEPS_PREFIX" -DCI_BUILD=ON
- cmake --build build
-
- - name: Install test deps
- run: |
- $PSNativeCommandArgumentPassing = 'Legacy'
-
- & 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: 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.yml b/.github/workflows/codeql.yml
index a11a87f93a..365c3fdf56 100644
--- a/.github/workflows/codeql.yml
+++ b/.github/workflows/codeql.yml
@@ -1,9 +1,15 @@
name: "CodeQL"
+concurrency:
+ group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
+ cancel-in-progress: true
+
on:
- schedule:
- - cron: '42 0 * * 0'
- workflow_dispatch:
+ push:
+ branches: [ "master" ]
+ pull_request:
+ # The branches below must be a subset of the branches above
+ branches: [ "master" ]
jobs:
analyze:
name: Analyze
@@ -13,28 +19,21 @@ jobs:
contents: read
security-events: write
- strategy:
- fail-fast: false
- matrix:
- language: [ 'cpp' ]
-
steps:
- name: Checkout repository
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
- - name: Setup common environment variables
- run: ./.github/workflows/env.sh
-
- - name: Install apt packages
- run: ./.github/scripts/install_deps_ubuntu.sh
+ - name: Install dependencies
+ run: ./.github/scripts/install_deps.sh
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
- languages: ${{ matrix.language }}
+ languages: cpp
+
+ - uses: ./.github/actions/cache
- - if: matrix.language == 'cpp'
- run: make
+ - run: make
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
diff --git a/.github/workflows/coverity.yml b/.github/workflows/coverity.yml
index 87e2cb1453..3eed1e51df 100644
--- a/.github/workflows/coverity.yml
+++ b/.github/workflows/coverity.yml
@@ -8,12 +8,10 @@ jobs:
scan:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- 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
+ run: ./.github/scripts/install_deps.sh
- name: Download Coverity
run: |
diff --git a/.github/workflows/env.sh b/.github/workflows/env.sh
deleted file mode 100755
index 42a355da44..0000000000
--- a/.github/workflows/env.sh
+++ /dev/null
@@ -1,69 +0,0 @@
-#!/bin/bash
-set -e -u
-
-FLAVOR=${1:-}
-
-cat <<EOF >> "$GITHUB_PATH"
-$HOME/.local/bin
-EOF
-
-cat <<EOF >> "$GITHUB_ENV"
-CI_BUILD_DIR=$GITHUB_WORKSPACE
-BUILD_DIR=$GITHUB_WORKSPACE/build
-DEPS_BUILD_DIR=$HOME/nvim-deps
-INSTALL_PREFIX=$HOME/nvim-install
-LOG_DIR=$GITHUB_WORKSPACE/build/log
-NVIM_LOG_FILE=$GITHUB_WORKSPACE/build/.nvimlog
-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
-EOF
-
-DEPS_CMAKE_FLAGS=
-FUNCTIONALTEST=functionaltest
-BUILD_FLAGS="CMAKE_FLAGS=-DCI_BUILD=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX:PATH=$HOME/nvim-install -DBUSTED_OUTPUT_TYPE=nvim -DDEPS_PREFIX=$HOME/nvim-deps/usr -DMIN_LOG_LEVEL=3"
-
-case "$FLAVOR" in
- asan)
- cat <<EOF >> "$GITHUB_ENV"
-CLANG_SANITIZER=ASAN_UBSAN
-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
- ;;
- tsan)
- cat <<EOF >> "$GITHUB_ENV"
-TSAN_OPTIONS=log_path=$GITHUB_WORKSPACE/build/log/tsan
-CLANG_SANITIZER=TSAN
-EOF
- ;;
- uchar)
- cat <<EOF >> "$GITHUB_ENV"
-BUILD_UCHAR=1
-EOF
- ;;
- lintc)
-# Re-enable once system deps are available
-# BUILD_FLAGS="$BUILD_FLAGS -DLIBLUV_LIBRARY:FILEPATH=/usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)/lua/5.1/luv.so -DLIBLUV_INCLUDE_DIR:PATH=/usr/include/lua5.1"
-
- # Ideally all dependencies should external for this job, but some
- # dependencies don't have the required version available. We use the
- # bundled versions for these with the hopes of being able to remove them
- # later on.
- DEPS_CMAKE_FLAGS="$DEPS_CMAKE_FLAGS -DUSE_BUNDLED=OFF -DUSE_BUNDLED_LUV=ON -DUSE_BUNDLED_LIBVTERM=ON"
- ;;
- functionaltest-lua)
- BUILD_FLAGS="$BUILD_FLAGS -DPREFER_LUA=ON"
- FUNCTIONALTEST=functionaltest-lua
- DEPS_CMAKE_FLAGS="$DEPS_CMAKE_FLAGS -DUSE_BUNDLED_LUAJIT=OFF"
- ;;
- *)
- ;;
-esac
-
-cat <<EOF >> "$GITHUB_ENV"
-$BUILD_FLAGS
-DEPS_CMAKE_FLAGS=$DEPS_CMAKE_FLAGS
-FUNCTIONALTEST=$FUNCTIONALTEST
-EOF
diff --git a/.github/workflows/issue-open-check.yml b/.github/workflows/issue-open-check.yml
new file mode 100644
index 0000000000..eac1c2ee4d
--- /dev/null
+++ b/.github/workflows/issue-open-check.yml
@@ -0,0 +1,34 @@
+name: Issue Open Check
+
+on:
+ issues:
+ types: [opened]
+
+jobs:
+ issue-open-check:
+ permissions:
+ issues: write
+ runs-on: ubuntu-latest
+ steps:
+ - name: check issue title
+ id: check-issue
+ uses: actions/github-script@v7
+ with:
+ script: |
+ const title = context.payload.issue.title;
+ const titleSplit = title.split(/\s+/).map(e => e.toLowerCase());
+ const keywords = ['api', 'treesitter', 'ui', 'lsp'];
+ var match = new Set();
+ for (const keyword of keywords) {
+ if (titleSplit.includes(keyword)) {
+ match.add(keyword)
+ }
+ }
+ if (match.size !== 0) {
+ github.rest.issues.addLabels({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ issue_number: context.issue.number,
+ labels: Array.from(match)
+ })
+ }
diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml
index 60689029a3..52682d93dd 100644
--- a/.github/workflows/labeler.yml
+++ b/.github/workflows/labeler.yml
@@ -3,7 +3,6 @@ on:
pull_request_target:
types: [opened]
jobs:
-
triage:
runs-on: ubuntu-latest
permissions:
@@ -12,10 +11,10 @@ jobs:
steps:
- uses: actions/labeler@v4
with:
- repo-token: "${{ secrets.GITHUB_TOKEN }}"
sync-labels: ""
type-scope:
+ needs: triage
runs-on: ubuntu-latest
permissions:
contents: write
@@ -34,17 +33,7 @@ jobs:
run: gh pr edit "$PR_NUMBER" --add-label "$(echo "$PR_TITLE" | sed -E 's|[[:alpha:]]+(\(.*\))?!:.*|breaking-change|')" || true
request-reviewer:
- if: github.event.pull_request.state == 'open' && github.event.pull_request.draft == false
- runs-on: ubuntu-latest
needs: ["triage", "type-scope"]
permissions:
pull-requests: write
- steps:
- - uses: actions/checkout@v3
- - 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})
+ uses: ./.github/workflows/add-reviewers.yml
diff --git a/.github/workflows/lintcommit.yml b/.github/workflows/lintcommit.yml
index a7a227865d..8f56c057ae 100644
--- a/.github/workflows/lintcommit.yml
+++ b/.github/workflows/lintcommit.yml
@@ -8,16 +8,20 @@ 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
+ - uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- path: pr_nvim
- - uses: rhysd/action-setup-vim@v1
- with:
- neovim: true
- - run: wget https://raw.githubusercontent.com/neovim/neovim/master/scripts/lintcommit.lua
- - run: nvim --clean -es +"cd pr_nvim" +"lua dofile('../lintcommit.lua').main({trace=true})"
+
+ - run: ./.github/scripts/install_deps.sh
+ - uses: ./.github/actions/cache
+ - name: Build
+ run: |
+ cmake -S cmake.deps --preset ci
+ cmake --build .deps
+ cmake --preset ci
+ cmake --build build
+
+ - name: lintcommit
+ run: cmake --build build --target lintcommit
diff --git a/.github/workflows/news.yml b/.github/workflows/news.yml
index 11807e9b42..d4f8e5ad65 100644
--- a/.github/workflows/news.yml
+++ b/.github/workflows/news.yml
@@ -1,13 +1,15 @@
name: "news.txt check"
on:
pull_request:
+ types: [opened, synchronize, reopened, ready_for_review]
branches:
- 'master'
jobs:
check:
runs-on: ubuntu-latest
+ if: github.event.pull_request.draft == false
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
diff --git a/.github/workflows/notes.md b/.github/workflows/notes.md
index d752f10609..8c518b0bdb 100644
--- a/.github/workflows/notes.md
+++ b/.github/workflows/notes.md
@@ -9,14 +9,14 @@ ${NVIM_VERSION}
#### Zip
1. Download **nvim-win64.zip**
-2. Extract the zip.
-3. Run `nvim-qt.exe`
+2. Extract the zip
+3. Run `nvim.exe` on your CLI of choice
#### MSI
1. Download **nvim-win64.msi**
2. Run the MSI
-3. Search and run `nvim-qt.exe` or run `nvim.exe` on your CLI of choice.
+3. Run `nvim.exe` on your CLI of choice
### macOS
@@ -27,17 +27,9 @@ ${NVIM_VERSION}
### Linux (x64)
-#### Tarball
-
-1. Download **nvim-linux64.tar.gz**
-2. Extract: `tar xzvf nvim-linux64.tar.gz`
-3. Run `./nvim-linux64/bin/nvim`
-
-#### Debian Package
-
-1. Download **nvim-linux64.deb**
-2. Install the package using `sudo apt install ./nvim-linux64.deb`
-3. Run `nvim`
+Minimum glibc version to run these releases is 2.31. People requiring releases
+that work on older glibc versions can find them at
+https://github.com/neovim/neovim-releases.
#### AppImage
1. Download **nvim.appimage**
@@ -48,6 +40,12 @@ ${NVIM_VERSION}
./squashfs-root/usr/bin/nvim
```
+#### Tarball
+
+1. Download **nvim-linux64.tar.gz**
+2. Extract: `tar xzvf nvim-linux64.tar.gz`
+3. Run `./nvim-linux64/bin/nvim`
+
### Other
- Install by [package manager](https://github.com/neovim/neovim/wiki/Installing-Neovim)
@@ -56,7 +54,6 @@ ${NVIM_VERSION}
```
${SHA_LINUX_64_TAR}
-${SHA_LINUX_64_DEB}
${SHA_APP_IMAGE}
${SHA_APP_IMAGE_ZSYNC}
${SHA_MACOS}
diff --git a/.github/workflows/optional.yml b/.github/workflows/optional.yml
new file mode 100644
index 0000000000..ebaf23d29b
--- /dev/null
+++ b/.github/workflows/optional.yml
@@ -0,0 +1,41 @@
+name: optional
+on:
+ pull_request:
+ types: [labeled, opened, synchronize, reopened]
+
+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: contains(github.event.pull_request.labels.*.name, 'ci-s390x')
+ strategy:
+ fail-fast: false
+ matrix:
+ test: [functionaltest, oldtest]
+ runs-on: ubuntu-latest
+ timeout-minutes: 60
+ steps:
+ - run: docker run --rm --privileged multiarch/qemu-user-static:register --reset
+ - uses: docker://multiarch/ubuntu-core:s390x-focal
+ with:
+ args: >
+ bash -c
+ "
+ apt-get -y update &&
+ DEBIAN_FRONTEND=noninteractive apt-get -y install build-essential cmake curl gettext ninja-build 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 &&
+ make ${{ matrix.test }}
+ "
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 1df33962e5..b19019d06d 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -17,124 +17,57 @@ on:
jobs:
linux:
runs-on: ubuntu-20.04
+ env:
+ CC: gcc-10
outputs:
version: ${{ steps.build.outputs.version }}
- release: ${{ steps.build.outputs.release }}
steps:
- - 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
+ - uses: actions/checkout@v4
+ - run: ./.github/scripts/install_deps.sh
- if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name != 'nightly')
- run: printf 'NVIM_BUILD_TYPE=Release\n' >> $GITHUB_ENV
+ run: |
+ echo 'NVIM_BUILD_TYPE=Release' >> $GITHUB_ENV
+ echo 'APPIMAGE_TAG=latest' >> $GITHUB_ENV
- if: github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name == 'nightly')
- run: printf 'NVIM_BUILD_TYPE=RelWithDebInfo\n' >> $GITHUB_ENV
- - name: Build release
- id: build
run: |
- CC=gcc-10 make CMAKE_BUILD_TYPE=${NVIM_BUILD_TYPE} CMAKE_EXTRA_FLAGS="-DCMAKE_INSTALL_PREFIX:PATH="
- 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
+ echo 'NVIM_BUILD_TYPE=RelWithDebInfo' >> $GITHUB_ENV
+ echo 'APPIMAGE_TAG=nightly' >> $GITHUB_ENV
+ - name: appimage
+ run: ./scripts/genappimage.sh ${APPIMAGE_TAG}
+ - name: tar.gz
+ run: cpack --config build/CPackConfig.cmake -G TGZ
- uses: actions/upload-artifact@v3
with:
- name: nvim-linux64
+ name: appimage
path: |
- build/nvim-linux64.tar.gz
- build/nvim-linux64.deb
+ build/bin/nvim.appimage
+ build/bin/nvim.appimage.zsync
retention-days: 1
-
- 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: |
- 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')
- run: CC=gcc-10 make appimage-nightly
- uses: actions/upload-artifact@v3
with:
- name: appimage
+ name: nvim-linux64
path: |
- build/bin/nvim.appimage
- build/bin/nvim.appimage.zsync
+ build/nvim-linux64.tar.gz
retention-days: 1
+ - name: Export version
+ id: build
+ run: |
+ printf 'version<<END\n' >> $GITHUB_OUTPUT
+ ./build/bin/nvim --version | head -n 3 >> $GITHUB_OUTPUT
+ printf 'END\n' >> $GITHUB_OUTPUT
macOS:
runs-on: macos-11
steps:
- - uses: actions/checkout@v3
- with:
- fetch-depth: 0
- - name: Install brew packages
- run: |
- brew update --quiet
- brew install automake ninja
+ - uses: actions/checkout@v4
+ - name: Install dependencies
+ run: ./.github/scripts/install_deps.sh
- if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name != 'nightly')
run: printf 'NVIM_BUILD_TYPE=Release\n' >> $GITHUB_ENV
- if: github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name == 'nightly')
run: printf 'NVIM_BUILD_TYPE=RelWithDebInfo\n' >> $GITHUB_ENV
- - name: Provision universal `libintl`
- run: |
- GETTEXT_PREFIX="$(brew --prefix gettext)"
- printf 'GETTEXT_PREFIX=%s\n' "$GETTEXT_PREFIX" >> $GITHUB_ENV
- bottle_tag="arm64_big_sur"
- brew fetch --bottle-tag="$bottle_tag" gettext
- cd "$(mktemp -d)"
- tar xf "$(brew --cache)"/**/*gettext*${bottle_tag}*.tar.gz
- lipo gettext/*/lib/libintl.a "${GETTEXT_PREFIX}/lib/libintl.a" -create -output libintl.a
- mv -f libintl.a /usr/local/lib/
- - name: Ensure static linkage to `libintl`
- run: |
- # We're about to mangle `gettext`, so let's remove any potentially broken
- # installs (e.g. curl, git) as those could interfere with our build.
- brew uninstall $(brew uses --installed --recursive gettext)
- brew unlink gettext
- ln -sf "$(brew --prefix)/opt/$(readlink "${GETTEXT_PREFIX}")/bin"/* /usr/local/bin/
- ln -sf "$(brew --prefix)/opt/$(readlink "${GETTEXT_PREFIX}")/include"/* /usr/local/include/
- rm -f "$GETTEXT_PREFIX"
- - name: Build release
- run: |
- export MACOSX_DEPLOYMENT_TARGET="$(sw_vers -productVersion | cut -f1 -d.)"
- OSX_FLAGS="-DCMAKE_OSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} -DCMAKE_OSX_ARCHITECTURES=arm64\;x86_64"
- make CMAKE_BUILD_TYPE=${NVIM_BUILD_TYPE} \
- CMAKE_EXTRA_FLAGS="-DCMAKE_INSTALL_PREFIX:PATH= $OSX_FLAGS" \
- 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"
+ - name: Build universal binary
+ run: ./.github/scripts/build_universal_macos.sh
- uses: actions/upload-artifact@v3
with:
name: nvim-macos
@@ -143,24 +76,17 @@ jobs:
windows:
runs-on: windows-2019
- env:
- DEPS_BUILD_DIR: ${{ format('{0}/nvim-deps', github.workspace) }}
- DEPS_PREFIX: ${{ format('{0}/nvim-deps/usr', github.workspace) }}
- CMAKE_BUILD_TYPE: "RelWithDebInfo"
name: windows (MSVC_64)
steps:
- - uses: actions/checkout@v3
- with:
- fetch-depth: 0
- - name: Set env
- run: ./.github/workflows/env.ps1
+ - uses: actions/checkout@v4
+ - run: .github/scripts/env.ps1
- name: Build deps
run: |
- cmake -S cmake.deps -B $env:DEPS_BUILD_DIR -G Ninja -DCMAKE_BUILD_TYPE='RelWithDebInfo'
- cmake --build $env:DEPS_BUILD_DIR
+ cmake -S cmake.deps -B .deps -G Ninja -DCMAKE_BUILD_TYPE='RelWithDebInfo'
+ cmake --build .deps
- name: build package
run: |
- cmake -B build -G Ninja -DCMAKE_BUILD_TYPE='RelWithDebInfo' -DDEPS_PREFIX="$env:DEPS_PREFIX"
+ cmake -B build -G Ninja -DCMAKE_BUILD_TYPE='RelWithDebInfo'
cmake --build build --target package
- uses: actions/upload-artifact@v3
with:
@@ -171,7 +97,7 @@ jobs:
retention-days: 1
publish:
- needs: [linux, appimage, macOS, windows]
+ needs: [linux, macOS, windows]
runs-on: ubuntu-latest
env:
GH_REPO: ${{ github.repository }}
@@ -181,7 +107,7 @@ jobs:
steps:
# Must perform checkout first, since it deletes the target directory
# before running, and would therefore delete the downloaded artifacts
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- uses: actions/download-artifact@v3
@@ -215,8 +141,6 @@ jobs:
cd ./nvim-linux64
sha256sum nvim-linux64.tar.gz > nvim-linux64.tar.gz.sha256sum
echo "SHA_LINUX_64_TAR=$(cat nvim-linux64.tar.gz.sha256sum)" >> $GITHUB_ENV
- sha256sum nvim-linux64.deb > nvim-linux64.deb.sha256sum
- echo "SHA_LINUX_64_DEB=$(cat nvim-linux64.deb.sha256sum)" >> $GITHUB_ENV
- name: Generate App Image SHA256 checksums
run: |
cd ./appimage
@@ -256,22 +180,24 @@ jobs:
steps:
- if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name != 'nightly')
name: Publish stable
- uses: vedantmgoyal2009/winget-releaser@v1
+ uses: vedantmgoyal2009/winget-releaser@v2
with:
identifier: Neovim.Neovim
release-tag: ${{ github.event.inputs.tag_name || github.ref_name }}
token: ${{ secrets.WINGET_TOKEN }}
+ - name: Fetch nightly build msi from previous job
+ if: github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name == 'nightly')
+ uses: actions/download-artifact@v3
- if: github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name == 'nightly')
- name: Get nightly version
+ name: Get version from nightly build msi
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 = (Get-CMsi (Resolve-Path .\nvim-win64\nvim-win64.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
+ uses: vedantmgoyal2009/winget-releaser@v2
with:
identifier: Neovim.Neovim.Nightly
version: ${{ steps.get-version.outputs.version }}
diff --git a/.github/workflows/remove-reviewers.yml b/.github/workflows/remove-reviewers.yml
index 7ab3ef568c..3fe7493b93 100644
--- a/.github/workflows/remove-reviewers.yml
+++ b/.github/workflows/remove-reviewers.yml
@@ -8,11 +8,10 @@ jobs:
permissions:
pull-requests: write
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- name: 'Remove reviewers'
- uses: actions/github-script@v6
+ uses: actions/github-script@v7
with:
- github-token: ${{ secrets.TEAM_REVIEW }}
script: |
const script = require('./.github/scripts/remove-reviewers.js')
await script({github, context})
diff --git a/.github/workflows/response.yml b/.github/workflows/response.yml
new file mode 100644
index 0000000000..663ae6ad87
--- /dev/null
+++ b/.github/workflows/response.yml
@@ -0,0 +1,35 @@
+name: no_response
+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/checkout@v4
+ - uses: actions/github-script@v7
+ with:
+ script: |
+ const script = require('./.github/scripts/close_unresponsive.js')
+ await script({github, context})
+
+ remove_label:
+ if: github.event_name == 'issue_comment'
+ runs-on: ubuntu-latest
+ permissions:
+ issues: write
+ pull-requests: write
+ steps:
+ - uses: actions/checkout@v4
+ - uses: actions/github-script@v7
+ with:
+ script: |
+ const script = require('./.github/scripts/remove_response_label.js')
+ await script({github, context})
diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml
deleted file mode 100644
index c1d3ee3ff3..0000000000
--- a/.github/workflows/stale.yml
+++ /dev/null
@@ -1,42 +0,0 @@
-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/test.yml b/.github/workflows/test.yml
new file mode 100644
index 0000000000..acf0f195b9
--- /dev/null
+++ b/.github/workflows/test.yml
@@ -0,0 +1,342 @@
+name: test
+on:
+ push:
+ branches:
+ - 'master'
+ - 'release-[0-9]+.[0-9]+'
+ pull_request:
+ branches:
+ - 'master'
+ - 'release-[0-9]+.[0-9]+'
+ paths-ignore:
+ - 'contrib/**'
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
+ cancel-in-progress: true
+
+env:
+ ASAN_OPTIONS: detect_leaks=1:check_initialization_order=1:log_path=${{ github.workspace }}/build/log/asan:intercept_tls_get_addr=0
+ BIN_DIR: ${{ github.workspace }}/bin
+ BUILD_DIR: ${{ github.workspace }}/build
+ INSTALL_PREFIX: ${{ github.workspace }}/nvim-install
+ LOG_DIR: ${{ github.workspace }}/build/log
+ NVIM_LOG_FILE: ${{ github.workspace }}/build/.nvimlog
+ TSAN_OPTIONS: log_path=${{ github.workspace }}/build/log/tsan
+ VALGRIND_LOG: ${{ github.workspace }}/build/log/valgrind-%p.log
+ # TEST_FILE: test/functional/core/startup_spec.lua
+ # TEST_FILTER: foo
+
+jobs:
+ lint:
+ runs-on: ubuntu-22.04
+ timeout-minutes: 10
+ env:
+ CC: clang
+ steps:
+ - uses: actions/checkout@v4
+ - run: ./.github/scripts/install_deps.sh
+ - uses: ./.github/actions/cache
+
+ - name: Install stylua
+ run: |
+ URL=$(curl -L https://api.github.com/repos/JohnnyMorganz/StyLua/releases/latest | jq -r '.assets[] | select(.name == "stylua-linux-x86_64.zip") | .browser_download_url')
+ wget --directory-prefix="$BIN_DIR" "$URL"
+ (cd "$BIN_DIR"; unzip stylua*.zip)
+ echo "$BIN_DIR" >> $GITHUB_PATH
+
+ - name: Build third-party deps
+ run: |
+ cmake -S cmake.deps -B .deps -G Ninja
+ cmake --build .deps
+
+ - run: cmake -B build -G Ninja -D CI_LINT=ON
+
+ - 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: stylua
+ run: cmake --build build --target lintlua-stylua
+
+ - if: success() || failure() && steps.abort_job.outputs.status == 'success'
+ name: luacheck
+ run: cmake --build build --target lintlua-luacheck
+
+ - if: success() || failure() && steps.abort_job.outputs.status == 'success'
+ name: lintsh
+ run: cmake --build build --target lintsh
+
+ - 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: clang-tidy
+ run: cmake --build build --target lintc-clang-tidy
+
+ - if: success() || failure() && steps.abort_job.outputs.status == 'success'
+ name: uncrustify
+ run: cmake --build build --target lintc-uncrustify
+
+ clang-analyzer:
+ runs-on: ubuntu-22.04
+ timeout-minutes: 20
+ env:
+ CC: clang
+ steps:
+ - uses: actions/checkout@v4
+ - run: ./.github/scripts/install_deps.sh
+ - uses: ./.github/actions/cache
+ - name: Build third-party deps
+ run: |
+ cmake -S cmake.deps --preset ci
+ cmake --build .deps
+ cmake --preset ci
+ - run: cmake --build build --target clang-analyzer
+
+ posix:
+ name: ${{ matrix.build.runner }} ${{ matrix.build.flavor }} ${{ matrix.build.cc }} ${{ matrix.test }}
+ strategy:
+ fail-fast: false
+ matrix:
+ build:
+ [
+ { runner: ubuntu-22.04, flavor: asan, cc: clang, flags: -D ENABLE_ASAN_UBSAN=ON },
+ { runner: ubuntu-22.04, flavor: tsan, cc: clang, flags: -D ENABLE_TSAN=ON },
+ { runner: ubuntu-22.04, cc: gcc },
+ { runner: macos-12, cc: clang, flags: -D CMAKE_FIND_FRAMEWORK=NEVER, deps_flags: -D CMAKE_FIND_FRAMEWORK=NEVER },
+ { runner: ubuntu-22.04, flavor: functionaltest-lua, cc: gcc, deps_flags: -D USE_BUNDLED_LUAJIT=OFF -D USE_BUNDLED_LUA=ON, flags: -D PREFER_LUA=ON },
+ ]
+ test: [unittest, functionaltest, oldtest]
+ exclude:
+ - test: unittest
+ build: { flavor: tsan }
+ - test: unittest
+ build: { flavor: functionaltest-lua }
+ - test: oldtest
+ build: { flavor: tsan }
+ runs-on: ${{ matrix.build.runner }}
+ timeout-minutes: 45
+ env:
+ 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: |
+ ulimit -c unlimited
+ echo "$BIN_DIR" >> $GITHUB_PATH
+
+ - name: Create log dir
+ run: mkdir -p "$LOG_DIR"
+
+ # FIXME(dundargoc): this workaround is needed for macos as the python3
+ # provider tests suddenly started to become extremely flaky, and this
+ # removes the flakiness for some reason.
+ - uses: actions/setup-python@v4
+ with:
+ python-version: '3.11'
+
+ - if: ${{ matrix.test != 'unittest' }}
+ name: Set up interpreter packages
+ run: |
+ # Use default CC to avoid compilation problems when installing Python modules.
+ echo "Install neovim module for Python."
+ CC=cc python3 -m pip -q install --user --upgrade pynvim
+
+ echo "Install neovim RubyGem."
+ gem install --no-document --bindir "$BIN_DIR" --user-install --pre neovim
+
+ echo "Install neovim npm package"
+ npm install -g neovim
+ npm link neovim
+
+ sudo cpanm -n Neovim::Ext || cat "$HOME/.cpanm/build.log"
+ perl -W -e 'use Neovim::Ext; print $Neovim::Ext::VERSION'
+
+ - name: Build third-party deps
+ run: |
+ cmake -S cmake.deps --preset ci ${{ matrix.build.deps_flags }}
+ cmake --build .deps
+
+ - name: Build
+ run: |
+ cmake --preset ci -D CMAKE_INSTALL_PREFIX:PATH=$INSTALL_PREFIX ${{ matrix.build.flags }}
+ cmake --build build
+
+ - name: ${{ matrix.test }}
+ timeout-minutes: 20
+ run: make ${{ matrix.test }}
+
+ - name: Install
+ run: |
+ cmake --install build
+ "$INSTALL_PREFIX/bin/nvim" --version
+ if ! "$INSTALL_PREFIX/bin/nvim" -u NONE -e -c ':help' -c ':qall'; then
+ echo "Running ':help' in the installed nvim failed."
+ echo "Maybe the helptags have not been generated properly."
+ echo 'Failed running :help'
+ exit 1
+ fi
+
+ # Check that all runtime files were installed
+ for file in $(git -C runtime ls-files '*.vim' '*.ps' '*.dict' '*.py' '*.tutor' '*.awk' '*.sh' '*.bat'); do
+ if ! test -e "$INSTALL_PREFIX/share/nvim/runtime/$file"; then
+ printf "It appears that %s is not installed." "$file"
+ exit 1
+ fi
+ done
+
+ # Check that generated syntax file has function names, #5060.
+ genvimsynf=syntax/vim/generated.vim
+ gpat='syn keyword vimFuncName .*eval'
+ if ! grep -q "$gpat" "$INSTALL_PREFIX/share/nvim/runtime/$genvimsynf"; then
+ echo "It appears that $genvimsynf does not contain $gpat."
+ exit 1
+ fi
+
+ - if: '!cancelled()'
+ name: Show logs
+ run: cat $(find "$LOG_DIR" -type f)
+
+ windows:
+ runs-on: windows-2022
+ timeout-minutes: 45
+ strategy:
+ fail-fast: false
+ matrix:
+ test: [functional, old]
+ steps:
+ - uses: actions/checkout@v4
+ - uses: ./.github/actions/cache
+ - run: .github/scripts/env.ps1
+
+ - name: Build deps
+ run: |
+ cmake -S cmake.deps -B .deps -G Ninja -D CMAKE_BUILD_TYPE='RelWithDebInfo'
+ cmake --build .deps
+
+ - name: Build
+ run: |
+ cmake --preset ci -D CMAKE_BUILD_TYPE='RelWithDebInfo'
+ cmake --build build
+
+ - name: Install test deps
+ run: |
+ $PSNativeCommandArgumentPassing = 'Legacy'
+
+ & 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))"
+
+ node --version
+ npm.cmd --version
+
+ npm.cmd install -g neovim
+ Get-Command -CommandType Application neovim-node-host.cmd
+ npm.cmd link neovim
+
+ - if: ${{ matrix.test == 'functional' }}
+ name: functionaltest
+ timeout-minutes: 20
+ run: cmake --build build --target functionaltest
+
+ - if: ${{ matrix.test == 'old' }}
+ uses: msys2/setup-msys2@v2
+ with:
+ update: true
+ pacboy: >-
+ make:p gcc:p diffutils:p
+ release: false
+
+ - if: ${{ matrix.test == 'old' }}
+ name: oldtest
+ shell: msys2 {0}
+ run: |
+ cd test/old/testdir
+ mingw32-make VERBOSE=1
+
+ # This job tests the following things:
+ # - Check if Release, MinSizeRel and RelWithDebInfo compiles correctly.
+ # - Test the above build types with the GCC compiler specifically.
+ # Empirically the difference in warning levels between GCC and other
+ # compilers is particularly big.
+ # - Test if the build works with multi-config generators. We mostly use
+ # single-config generators so it's nice to have a small sanity check for
+ # multi-config.
+ build-types:
+ runs-on: ubuntu-22.04
+ timeout-minutes: 10
+ env:
+ CC: gcc
+ steps:
+ - uses: actions/checkout@v4
+ - run: ./.github/scripts/install_deps.sh
+ - uses: ./.github/actions/cache
+
+ - name: Build third-party deps
+ run: |
+ cmake -S cmake.deps -B .deps -G "Ninja Multi-Config"
+ cmake --build .deps
+
+ - name: Configure
+ run: cmake --preset ci -G "Ninja Multi-Config"
+
+ - name: Release
+ run: cmake --build build --config Release
+
+ - name: RelWithDebInfo
+ run: cmake --build build --config RelWithDebInfo
+
+ - name: MinSizeRel
+ run: cmake --build build --config MinSizeRel
+
+ with-external-deps:
+ runs-on: ubuntu-22.04
+ timeout-minutes: 10
+ env:
+ CC: gcc
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Install dependencies
+ run: |
+ sudo add-apt-repository ppa:neovim-ppa/stable
+ ./.github/scripts/install_deps.sh
+ sudo apt-get install -y \
+ libluajit-5.1-dev \
+ libmsgpack-dev \
+ libtermkey-dev \
+ libunibilium-dev \
+ libuv1-dev \
+ lua-filesystem \
+ lua-lpeg \
+ luajit \
+ lua-luv-dev
+ # libtree-sitter-dev \
+ # libvterm-dev
+
+ # Remove comments from packages once we start using these external
+ # dependencies.
+
+ - uses: ./.github/actions/cache
+
+ - name: Build third-party deps
+ run: |
+ cmake -S cmake.deps --preset external_deps
+ cmake --build .deps
+
+ - name: Build
+ run: |
+ cmake --preset ci
+ cmake --build build
diff --git a/.github/workflows/vim-patches.yml b/.github/workflows/vim-patches.yml
index 159eb09e7c..711ddae815 100644
--- a/.github/workflows/vim-patches.yml
+++ b/.github/workflows/vim-patches.yml
@@ -11,15 +11,15 @@ jobs:
contents: write
pull-requests: write
env:
- VIM_SOURCE_DIR: ${{ format('{0}/vim-src', github.workspace) }}
+ VIM_SOURCE_DIR: ${{ github.workspace }}/vim-src
VERSION_BRANCH: marvim/ci-version-update
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
with:
fetch-depth: 0
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
with:
repository: vim/vim
path: ${{ env.VIM_SOURCE_DIR }}
@@ -34,7 +34,7 @@ jobs:
mv nvim.appimage $HOME/.local/bin/nvim
printf '%s\n' "$HOME/.local/bin" >> $GITHUB_PATH
- - name: Setup git config
+ - name: Set up git config
run: |
git config --global user.name 'marvim'
git config --global user.email 'marvim@users.noreply.github.com'