aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2023-01-25 18:31:31 +0000
committerJosh Rahm <joshuarahm@gmail.com>2023-01-25 18:31:31 +0000
commit9243becbedbb6a1592208051f8fa2b090dcc5e7d (patch)
tree607c2a862ec3f4399b8766383f6f8e04c4aa43b4 /.github
parent9e40b6e9e1bc67f2d856adb837ee64dd0e25b717 (diff)
parent3c48d3c83fc21dbc0841f9210f04bdb073d73cd1 (diff)
downloadrneovim-usermarks.tar.gz
rneovim-usermarks.tar.bz2
rneovim-usermarks.zip
Merge remote-tracking branch 'upstream/master' into usermarksusermarks
Diffstat (limited to '.github')
-rw-r--r--.github/ISSUE_TEMPLATE/bug_report.yml53
-rw-r--r--.github/ISSUE_TEMPLATE/feature_request.yml13
-rw-r--r--.github/ISSUE_TEMPLATE/lsp_bug_report.yml34
-rw-r--r--.github/SECURITY.md2
-rw-r--r--.github/actions/cache/action.yml22
-rw-r--r--.github/labeler.yml6
-rwxr-xr-x.github/scripts/install_deps_ubuntu.sh19
-rw-r--r--.github/scripts/remove-reviewers.js4
-rw-r--r--.github/scripts/reviews.js42
-rw-r--r--.github/scripts/unstale.js19
-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
25 files changed, 437 insertions, 203 deletions
diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml
index 11f27dde21..5fd7bc37b6 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.yml
+++ b/.github/ISSUE_TEMPLATE/bug_report.yml
@@ -8,6 +8,33 @@ body:
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.
+ - type: textarea
+ attributes:
+ label: "Describe the bug"
+ 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)"`.
+ placeholder: |
+ nvim --clean
+ :edit foo
+ yiwp
+ validations:
+ required: true
+
+ - type: textarea
+ attributes:
+ label: "Expected behavior"
+ description: "Describe the behavior you expect."
+ validations:
+ required: true
+
- type: input
attributes:
label: "Neovim version (nvim -v)"
@@ -47,29 +74,3 @@ body:
placeholder: "Arch User Repository (AUR)"
validations:
required: true
-
- - type: textarea
- attributes:
- label: "How to reproduce the issue"
- description: |
- - Steps to reproduce using `nvim --clean` ("factory defaults").
- - For build failures: list the exact steps including CMake flags (if any).
- - For shell-related problems: try `env -i TERM=ansi-256color "$(which nvim)"`.
- placeholder: |
- nvim --clean
- :edit foo
- yiwp
- validations:
- required: true
-
- - type: textarea
- attributes:
- label: "Expected behavior"
- description: "Describe the behavior you expect. May include logs, images, or videos."
- validations:
- required: true
- - type: textarea
- attributes:
- label: "Actual behavior"
- validations:
- required: true
diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml
index 2b6fa3daf4..4b9a443064 100644
--- a/.github/ISSUE_TEMPLATE/feature_request.yml
+++ b/.github/ISSUE_TEMPLATE/feature_request.yml
@@ -8,14 +8,17 @@ body:
value: |
Before requesting: search [existing issues](https://github.com/neovim/neovim/labels/enhancement) and check the [FAQ](https://github.com/neovim/neovim/wiki/FAQ).
- - type: input
+ - type: textarea
attributes:
- label: "Feature already in Vim?"
- description: "Does the feature already exist in Vim? If possible, specify which version (or commit) that introduced it."
- placeholder: "Yes, Vim 7.3.432"
+ label: "Problem"
+ description: "Describe the problem to be solved. Include references to other projects (Vim, Emacs, etc.) if relevant."
+ placeholder: "No smurf icons available. Smurfs are useful because ..."
+ validations:
+ required: true
- type: textarea
attributes:
- label: "Feature description"
+ label: "Expected behavior"
+ description: "Describe what the new feature or behavior would look like. How does it solve the problem? Is it worth the cost?"
validations:
required: true
diff --git a/.github/ISSUE_TEMPLATE/lsp_bug_report.yml b/.github/ISSUE_TEMPLATE/lsp_bug_report.yml
index 0ed163c9be..88867ce644 100644
--- a/.github/ISSUE_TEMPLATE/lsp_bug_report.yml
+++ b/.github/ISSUE_TEMPLATE/lsp_bug_report.yml
@@ -31,8 +31,38 @@ body:
attributes:
label: 'Steps to reproduce using "nvim -u minimal_init.lua"'
description: |
- - Download the minimal config with `curl -LO https://raw.githubusercontent.com/neovim/nvim-lspconfig/master/test/minimal_init.lua` and modify it to include any specific commands or servers pertaining to your issues.
- - _Note_: if the issue is with an autocompletion or other LSP plugin, report to that plugin's issue tracker.
+ - Create a minimal_init.lua using vim.lsp.start:
+
+ ```lua
+ --- CHANGE THESE
+ local pattern = 'the-filetype'
+ local cmd = {'name-of-language-server-executable'}
+ -- Add files/folders here that indicate the root of a project
+ local root_markers = {'.git', '.editorconfig'}
+ -- Change to table with settings if required
+ local settings = vim.empty_dict()
+
+ vim.api.nvim_create_autocmd('FileType', {
+ 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
+ vim.lsp.start({
+ name = 'bugged-ls',
+ cmd = cmd,
+ root_dir = root_dir,
+ settings = settings
+ })
+ end
+ })
+ ```
+
+ See `:h lsp-quickstart` and `:h vim.lsp.start` for more information
+
+ - Provide a short code example and describe the folder layout
+ - Describe how to trigger the issue. E.g. using `:lua vim.lsp.buf.*` commands
+
+ _Note_: if the issue is with an autocompletion or other LSP plugin, report to that plugin's issue tracker.
validations:
required: true
diff --git a/.github/SECURITY.md b/.github/SECURITY.md
new file mode 100644
index 0000000000..a376d87912
--- /dev/null
+++ b/.github/SECURITY.md
@@ -0,0 +1,2 @@
+To report a security vulnerability to Neovim, use
+https://github.com/neovim/neovim/security/advisories/new
diff --git a/.github/actions/cache/action.yml b/.github/actions/cache/action.yml
new file mode 100644
index 0000000000..858045c02a
--- /dev/null
+++ b/.github/actions/cache/action.yml
@@ -0,0 +1,22 @@
+name: 'Cache'
+description: "This action caches neovim dependencies"
+runs:
+ using: "composite"
+ steps:
+ - run: echo "CACHE_KEY=${{ github.job }}-${{ github.base_ref }}" >> $GITHUB_ENV
+ shell: bash
+
+ - if: ${{ matrix }}
+ run: echo "CACHE_KEY=$CACHE_KEY-${{ join(matrix.*, '-') }}" >> $GITHUB_ENV
+ 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',
+ 'runtime/CMakeLists.txt', 'src/nvim/**/CMakeLists.txt') }}
diff --git a/.github/labeler.yml b/.github/labeler.yml
index e86c7aabe8..ad48287246 100644
--- a/.github/labeler.yml
+++ b/.github/labeler.yml
@@ -13,6 +13,7 @@
- src/nvim/lua/treesitter.*
- runtime/lua/vim/treesitter.lua
- runtime/lua/vim/treesitter/*
+ - runtime/queries/**/*
"diagnostic":
- runtime/lua/vim/diagnostic.lua
@@ -62,3 +63,8 @@
"filetype":
- runtime/lua/vim/filetype.lua
+ - runtime/lua/vim/filetype/detect.lua
+
+"platform:nix":
+ - contrib/flake.lock
+ - contrib/flake.nix
diff --git a/.github/scripts/install_deps_ubuntu.sh b/.github/scripts/install_deps_ubuntu.sh
new file mode 100755
index 0000000000..012409ba4a
--- /dev/null
+++ b/.github/scripts/install_deps_ubuntu.sh
@@ -0,0 +1,19 @@
+#!/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 631f08e57d..40a8eca423 100644
--- a/.github/scripts/remove-reviewers.js
+++ b/.github/scripts/remove-reviewers.js
@@ -6,11 +6,13 @@ module.exports = async ({github, context}) => {
});
const reviewers = requestedReviewers.data.users.map(e => e.login)
+ const team_reviewers = requestedReviewers.data.teams.map(e => e.name);
github.rest.pulls.removeRequestedReviewers({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.issue.number,
- reviewers: reviewers
+ reviewers: reviewers,
+ team_reviewers: team_reviewers
});
}
diff --git a/.github/scripts/reviews.js b/.github/scripts/reviews.js
index 6e9a829353..cc6aaa1e8b 100644
--- a/.github/scripts/reviews.js
+++ b/.github/scripts/reviews.js
@@ -7,24 +7,29 @@ module.exports = async ({github, context}) => {
const labels = pr_data.data.labels.map(e => e.name)
const reviewers = new Set()
+ const team_reviewers = new Array()
if (labels.includes('api')) {
reviewers.add("bfredl")
- reviewers.add("gpanders")
reviewers.add("muniter")
}
if (labels.includes('build')) {
reviewers.add("jamessan")
+ reviewers.add("justinmk")
}
if (labels.includes('ci')) {
- reviewers.add("jamessan")
+ team_reviewers.push('ci');
}
if (labels.includes('column')) {
reviewers.add("lewis6991")
}
+ if (labels.includes('dependencies')) {
+ reviewers.add("jamessan")
+ }
+
if (labels.includes('diagnostic')) {
reviewers.add("gpanders")
}
@@ -33,10 +38,6 @@ module.exports = async ({github, context}) => {
reviewers.add("lewis6991")
}
- if (labels.includes('dependencies')) {
- reviewers.add("jamessan")
- }
-
if (labels.includes('distribution')) {
reviewers.add("jamessan")
}
@@ -52,20 +53,32 @@ module.exports = async ({github, context}) => {
if (labels.includes('filetype')) {
reviewers.add("clason")
reviewers.add("gpanders")
+ reviewers.add("smjonas")
}
- if (labels.includes('gui')) {
- reviewers.add("glacambre")
- reviewers.add("smolck")
+ if (labels.includes('lsp')) {
+ team_reviewers.push('lsp');
}
- if (labels.includes('lsp')) {
- reviewers.add("mfussenegger")
+ if (labels.includes('platform:nix')) {
+ reviewers.add("teto")
}
- if (labels.includes('treesitter')) {
+ if (labels.includes('project-management')) {
+ reviewers.add("bfredl")
+ reviewers.add("justinmk")
+ }
+
+ if (labels.includes('refactor')) {
reviewers.add("bfredl")
- reviewers.add("vigoux")
+ }
+
+ if (labels.includes('test')) {
+ reviewers.add("justinmk")
+ }
+
+ if (labels.includes('treesitter')) {
+ team_reviewers.push('treesitter');
}
if (labels.includes('typo')) {
@@ -89,6 +102,7 @@ module.exports = async ({github, context}) => {
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.issue.number,
- reviewers: Array.from(reviewers)
+ reviewers: Array.from(reviewers),
+ team_reviewers: team_reviewers
});
}
diff --git a/.github/scripts/unstale.js b/.github/scripts/unstale.js
new file mode 100644
index 0000000000..f645fca5cb
--- /dev/null
+++ b/.github/scripts/unstale.js
@@ -0,0 +1,19 @@
+module.exports = async ({ github, context }) => {
+ const commenter = context.actor;
+ const issue = await github.rest.issues.get({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ issue_number: context.issue.number,
+ });
+ const author = issue.data.user.login;
+ const labels = issue.data.labels.map((e) => e.name);
+
+ if (author === commenter && labels.includes("needs:response")) {
+ github.rest.issues.removeLabel({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ issue_number: context.issue.number,
+ name: "needs:response",
+ });
+ }
+};
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"