Commit Graph

509 Commits

Author SHA1 Message Date
Joey Gouly c34c31af73
ci: enable unittests on macos-14
Add more filters so that LuaJIT can parse headers on macOS 14.

The system headers use a style of enum introduced in C++11 (and allowed
as an extension in C by clang) of the form:

    enum Name : Type {

The system headers also use bitfields in the mach_vm_range_recipe* types:

    struct Foo { int bar : 32; }

Neither of these constructs can be parsed by LuaJIT, so filter the lines
out. Neither of these declarations are used by neovim's unittests.

There is a (now closed) issue about bitfields for LuaJIT:

    https://github.com/LuaJIT/LuaJIT/issues/951

Fixes #26145.
2024-04-14 15:27:04 +02:00
dundargoc 36acb2a8ec ci: use `--break-system-packages` on mac when installing pynvim
Python 3.12+ throws an error if you try to install a package in an
externally managed environment. Using `--break-system-packages` is not
recommended for personal use, but for CI it should be fine and is
probably the most straightforward solution.
2024-03-29 17:11:29 +01:00
dundargoc a89ce89742
docs: fix typos (#27868)
Co-authored-by: ite-usagi <77563904+ite-usagi@users.noreply.github.com>
Co-authored-by: v-sim <56476039+v-sim@users.noreply.github.com>
Co-authored-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Co-authored-by: Quico Augustijn <quico.public@gmail.com>
Co-authored-by: nhld <nahnera@gmail.com>
Co-authored-by: francisco souza <108725+fsouza@users.noreply.github.com>
2024-03-28 09:32:32 +08:00
dundargoc 1bfe6fdceb ci: add workflow_dispatch event to testing workflows
This allows us to easily test the release branch if needed.
2024-03-27 16:37:59 +01:00
dundargoc 2bcf88d354 ci: use the same logic to determine build type for all releases 2024-03-25 19:42:17 +01:00
dundargoc 036f86feac ci: provide separate macos releases for intel and arm
This will immensely reduce the complexity required to support both
architectures, reduce overall lines of code and unblock follow-up
simplifications.
2024-03-24 20:58:30 +01:00
dundargoc d3e51603bc ci(windows): optionally test windows with ASAN
Add the label `ci:windows-asan` to enable it.
2024-03-23 23:19:29 +01:00
dundargoc 924a7ef8bb ci: don't assign reviewers for "api" and "ui" labels
The labels as they're currently defined are too broad to meaningfully
add specific reviewers for them.
2024-03-16 15:11:26 +01:00
dundargoc bf24298fea ci: simplify concurrency string
`github.ref` is now defined for both pull requests and pushes, meaning
that it can be used to simplify the concurrency group.
`cancel-in-progress` is set to true only if the trigger is a pull
request, as we don't want master runs to cancel each other out.
2024-03-16 15:00:09 +01:00
dundargoc 5da0d513b9 ci: update clang version to 18
This fixes the false TSAN errors in CI.
2024-03-16 14:40:39 +01:00
dundargoc 8ba552bd59 ci: allow skipping news workflow with a label
Setting the label `ci:skip-news` will skip the job. This is useful for
maintainers to indicate to contributors that a feature isn't big enough
to warrant a news entry, or for contributors who dislike red CI even if
there's nothing wrong.

Also change label `ci-s390x` to `ci:s390x`; this way it'll be easier to
see that `ci:` are a subcategory of labels that affect CI in some way.
2024-03-08 17:55:33 +01:00
Lewis Russell 4ff3217bbd feat(lsp): add fswatch watchfunc backend
Problem:
  vim._watch.watchdirs has terrible performance.

Solution:
  - On linux use fswatch as a watcher backend if available.

  - Add File watcher section to health:vim.lsp. Warn if watchfunc is
    libuv-poll.
2024-03-01 23:00:20 +00:00
Lewis Russell 9beb40a4db feat(docs): replace lua2dox.lua
Problem:

The documentation flow (`gen_vimdoc.py`) has several issues:
- it's not very versatile
- depends on doxygen
- doesn't work well with Lua code as it requires an awkward filter script to convert it into pseudo-C.
- The intermediate XML files and filters makes it too much like a rube goldberg machine.

Solution:

Re-implement the flow using Lua, LPEG and treesitter.

- `gen_vimdoc.py` is now replaced with `gen_vimdoc.lua` and replicates a portion of the logic.
- `lua2dox.lua` is gone!
- No more XML files.
- Doxygen is now longer used and instead we now use:
  - LPEG for comment parsing (see `scripts/luacats_grammar.lua` and `scripts/cdoc_grammar.lua`).
  - LPEG for C parsing (see `scripts/cdoc_parser.lua`)
  - Lua patterns for Lua parsing (see `scripts/luacats_parser.lua`).
  - Treesitter for Markdown parsing (see `scripts/text_utils.lua`).
- The generated `runtime/doc/*.mpack` files have been removed.
   - `scripts/gen_eval_files.lua` now instead uses `scripts/cdoc_parser.lua` directly.
- Text wrapping is implemented in `scripts/text_utils.lua` and appears to produce more consistent results (the main contributer to the diff of this change).
2024-02-27 14:41:17 +00:00
casswedson d94adff48b
ci(labeler_issue): split on word boundaries
Splitting it on word boundaries rather than only spaces allows for better
detection. The issue labeler previously didn't catch titles such as
`treesitter: noisy "Invalid node type" error`.

Co-authored-by: casswedson <casswedson@users.noreply.github.com>
2024-02-18 12:29:07 +01:00
Christian Clason 01c15a30c0
ci(release): run universal_macos build on M1 (#27505)
Run the release workflow on macos-14 to use faster M1 runners.

Lock the deployment target to the oldest supported version (11.0,
due to libuv support) instead of relying on the host OS version.
2024-02-17 13:35:47 +01:00
Christian Clason bf830a53f5
ci: test on macOS M1 (#27276)
Problem: No test coverage on ARM.

Solution: Add `macos-14` tests, which now run on M1. Skip unit tests as these don't work on M1, see #26145. Also test universal build on M1.

Note: `macos-14` will be `macos-latest` in Q2 2024, so we'll want to switch these to keep Intel and unittest coverage on macos (while GH still offers Intel runners).
2024-02-17 13:12:39 +01:00
zeertzjq ea0737c838
ci(test.yml): explicitly set build type (#27503)
Explicitly set the build type for both deps and Nvim. They are already
explicitly set on Windows to RelWithDebInfo. Now also explicitly set
them to Debug on POSIX.
2024-02-17 18:35:25 +08:00
dundargoc 7f4627fe48 ci(release): bump mac runner version to macos-12 2024-02-06 14:57:19 +01:00
dundargoc 4c91194611 build: various fixes
- Consistently use the variable CMAKE_BUILD_TYPE to select build type.
- Remove broken `doc_html` target.
- Remove swap files created by oldtest when cleaning.
- Only rerun `lintdoc` if any documentation files has changed.
2024-02-01 12:06:55 +01:00
Justin M. Keyes 4ddd999f65
docs: update FAQ URLs #27236 2024-01-28 14:53:05 -08:00
Jongwook Choi 095f731af0
docs: include backtrace for bug-crash #27065
Github Issue template:

- Add pointers to |dev-tools-backtrace|.
- Add pointers to CONTRIBUTING.md (Reporting Problems), which includes
  additional helpful instructions for issue reporting.
- Search existing issues: include label `bug-crash` as well as `bug`.

CONTRIBUTING.md:

- Fix broken link on "stacktrace" after moving to help from wiki.
2024-01-28 14:26:13 -08:00
Jongwook Choi 01e82eba20
build(docs): separate lint job to validate vimdoc #27227
Summary: Separate the lint job (`make lintdoc`) to validate runtime/doc,
it is no longer as a part of functionaltest (help_spec).

Build (cmake) and CI:

- `make lintdoc`: validate vimdoc files and test-generate HTML docs.
  CI will run this as a part of the "docs" workflow.

- `scripts/lintdoc.lua` is added as an entry point (executable script)
  for validating vimdoc files.

scripts/gen_help_html.lua:

- Move the tests for validating docs and generating HTMLs from
  `help_spec.lua` to `gen_help_html`. Added:
  - `gen_help_html.run_validate()`.
  - `gen_help_html.test_gen()`.

- Do not hard-code `help_dir` to `build/runtime/doc`, but resolve from
  `$VIMRUNTIME`. Therefore, the `make lintdoc` job will check doc files
  on `./runtime/doc`, not on `./build/runtime/doc`.

- Add type annotations for gen_help_html.
2024-01-28 14:22:39 -08:00
Junghyeon Park 7421a4d8b5 ci: update notes.md
Change the link to point to INSTALL.md.

The contents were moved in https://github.com/neovim/neovim/pull/26533
2024-01-26 14:54:57 +01:00
dundargoc ed103cde28 ci: bump cache action to version 4 2024-01-20 12:49:43 +01:00
Jongwook Choi 6a4c4fa198 ci: stale bot should close the issue with "not planned"
Problem: When the stable bot automatically closes an issue, the issue
will be marked as "closed as completed". It'd be better to mark the
as "closed as not planned".

Solution: Use `state_reason: "not_planned"` from the issues REST API.

References (REST API):
https://docs.github.com/en/rest/issues/issues?apiVersion=2022-11-28#update-an-issue
2024-01-16 08:59:43 +01:00
dundargoc 965dbd0e01 ci(s390x): enable CI_BUILD 2024-01-14 23:16:40 +01:00
Jongwook Choi bcd111bd12 ci: write the correct cherry-picked commit id when backporting
Problem: Commits backport-merged to release branches are cherry-picked
from the original commits in the PR from a fork repository, NOT the
actual commit that are merged to neovim/neovim (HEAD). Therefore the
commit reference in the commit message `cherry picked from commit ...`
usually refers to a commit that does NOT exist in the repository,
given that our preferred way of merging PR (rebasing, squashing, etc.)
would rewrite commits.

Solution: Turn on new feature 'detect_merge_method' of backport-action
workflow.
2024-01-01 15:17:56 +01:00
dundargoc 9aed26079c ci: add workflow_dispatch to optional.yml workflow
This makes it convenient to test optional.yml on release branch.
2023-12-29 20:01:20 +01:00
dundargoc 0f22ea400c
ci: disable libintl on mac release
The releases doesn't work on intel mac as libintl isn't available on the system
by default. This makes `:language` not work for the shipped macos releases,
though the reduction in build system complexity most likely outweighs that.
2023-12-26 22:46:10 +01:00
dundargoc 0da50da6e2 ci: remove winget workflow
All releases that aren't directly maintained by us should live in the
`neovim/neovim-releases` repository to make it clear that neovim isn't
directly responsible for it and to correctly manage expectations that
it's provided on a best-effort case.

Closes https://github.com/neovim/neovim/issues/26717.
2023-12-26 21:48:20 +01:00
zeertzjq 99d1e7da28
ci(release): create version tag after "stable" tag (#26671) 2023-12-20 21:53:30 +08:00
James McCoy 3d8cd0c5d3
ci(s390x): run build & test as a non-root user 2023-12-18 21:43:00 -05:00
James McCoy 1beef6cd21
ci(s390x): double TEST_TIMEOUT since tests are running via qemu 2023-12-18 17:46:25 -05:00
dundargoc 7840760776 build: bump minimum cmake version to 3.13
The benefits are primarily being able to use FetchContent, which allows
for a more flexible dependency handling. Other various quality-of-life
features such as `-B` and `-S` flags are also included.

This also removes broken `--version` generation as it does not work for
version 3.10 and 3.11 due to the `JOIN` generator expression.

Reference: https://github.com/neovim/neovim/issues/24004
2023-12-16 17:17:24 +01:00
dependabot[bot] d82168e41c
ci: bump actions/upload-artifact from 3 to 4
Uploads are significantly faster, upwards of 90% improvement in worst case
scenarios.
2023-12-15 13:53:14 +01:00
dependabot[bot] 0463403030
ci: bump actions/download-artifact from 3 to 4
Notable changes:
- Downloads are significantly faster, upwards of 90% improvement in worst case
  scenarios.
- Artifacts can be downloaded from other workflow runs and repositories when
  supplied with a PAT.
2023-12-15 13:51:51 +01:00
dependabot[bot] 7db9992445
ci: bump github/codeql-action from 2 to 3
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2 to 3.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v2...v3)
2023-12-14 14:16:35 +01:00
Gregory Anders 36552adb39
ci: add gpanders as reviewer for defaults and tui labels (#26567) 2023-12-13 20:06:59 -06:00
dundargoc 2c96f1c4f0 docs: move minimum reproduction template from wiki to repo
Instead of a markdown file, just use a lua file instead that users can
use directly.
2023-12-12 18:32:45 +01:00
zeertzjq 31fbd38066
ci: fix PR labeler 2023-12-10 06:40:51 +08:00
dundargoc dd81e1e334 ci: refactor CI files
Mostly rename file and variable names to be more consistent. This makes
it easier to locate them in the "Actions" tab on github.
2023-12-09 14:14:38 +01:00
dundargoc 9706ee59d0 ci: bump actions/labeler from 4 to 5 2023-12-08 22:13:07 +01:00
dundargoc f707ce76ac ci: remove python workaround
The provider tests seems to work now without this workaround.
2023-12-08 22:00:49 +01:00
dundargoc 32c8f951bb ci: use the latest stylua version
Using `jq` is not needed as github provides a "latest" shortcut to do
what download the latest release.
2023-12-05 09:43:06 +00:00
dundargoc ce6fefbab9 ci: create setup action
This deduplicates common operations.
2023-12-01 16:59:23 +01:00
zeertzjq 52d738826c
ci(release): perform a full checkout when building (#26323)
Ref #13471
2023-11-30 21:03:25 +08:00
dundargoc 5b765fcab4 ci: fix api-docs workflow
`git diff-index` only works for tracked files, and unchanged
documentation files counts as untracked when shallow cloning.
2023-11-27 14:44:03 +01:00
dundargoc aad701abe7 docs: recommend testing nightly or stable for bug reports 2023-11-25 12:36:57 +01:00
dependabot[bot] 64c2c7c40d
ci: bump actions/github-script from 6 to 7 (#26041)
Bumps [actions/github-script](https://github.com/actions/github-script) from 6 to 7.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](https://github.com/actions/github-script/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/github-script
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-15 12:57:54 +08:00
dundargoc b2ca768196 ci: skip api-doc workflow on draft PRs
Checking the documentation generation is mostly useful towards the end
of a pull request like with the lintcommit workflow.
2023-11-11 13:50:53 +01:00