Commit Graph

537 Commits

Author SHA1 Message Date
James McCoy
9695650c0c
ci: run tests directly rather than via the Makefile
Since the Makefile is not used to build, running the tests via the Makefile causes cmake to reconfigure and revert the release build back to debug.
2024-12-04 21:30:52 -05:00
James McCoy
a930b2666e
ci(test): remove the .git directory for Linux
Tests should not rely on being run inside a git clone, so the Linux
builds cover this use case. The macOS builds will continue running with
the .git directory so there's still unix-ish coverage within a git
clone.
2024-12-04 21:30:51 -05:00
James McCoy
c36c4ddae2
ci: run one set of tests with a release build
This ensures that no tests fail due to differences between release and debug builds.

The release build-type check is now unnecessary, too, so remove it.
2024-12-04 21:30:43 -05:00
dundargoc
34a976ec2b ci: downgrade to clang 19
Clang 20 is still in development at the time of this commit and is
unsuitable for CI.

(cherry picked from commit 7d8dd8234a)
2024-11-09 15:09:52 +00:00
Christian Clason
6550227110 ci: bump Intel macOS runners to 13
Problem: macos-12 GH runners are deprecated and will be removed soon.

Solution: use macos-13 runners instead.
2024-11-09 13:11:47 +01:00
dundargoc
b7f025e45b ci: adjust reviewers 2024-11-09 13:11:47 +01:00
dundargoc
6c12cfe18c ci: work around flaky python tests (#31063)
It's the same workaround as 88ed9ffcd1,
which was later removed in f707ce76ac
after it turned out to be stable after a while.
2024-11-09 13:11:47 +01:00
dundargoc
7774ca9107 ci: bump macos runner version to macos-15 2024-11-09 13:11:47 +01:00
dundargoc
1a4e78832f ci: bump ubuntu runner version to ubuntu-24.04
Also bump clang to version 20.
2024-11-09 13:11:47 +01:00
dundargoc
b65e978a23 ci: update labeler configuration and add reviewers
(cherry picked from commit 783f6079b8)
2024-09-21 11:39:42 +00:00
dundargoc
1db8824fbc build: remove nix flakes (#28863)
It does not work and we don't plan on maintaining these anymore.

The flake files are being moved to
https://github.com/nix-community/neovim-nightly-overlay/pull/516
instead.

(cherry picked from commit 0e9c92a900)
2024-09-20 21:51:13 +00:00
bfredl
d5a0e4ec5b fix(build): issues with s390x CI
Does not fix everything, but at least let's test run to finish before
timeout

(cherry picked from commit 176bfea135)
2024-09-20 21:44:30 +00:00
dundargoc
2c95d48083 ci: remove "skip ci" tag
We can't skip CI runs as there are required checks that needs to always
be run.

(cherry picked from commit dafd944a46)
2024-09-20 15:28:41 +00:00
dundargoc
9d7711a732 ci: don't add reviewers for PRs created by a bot
This will ensure automatic backports created by the backport action does
not request reviewers (since the commit in question has already been
vetted and merged), but manual backports created by users does request
reviewers as these commits has not been vetted previously.

(cherry picked from commit 755512ed60)
2024-09-20 14:51:55 +00:00
dundargoc
d585f3103d ci: skip automerge step if backport failed
(cherry picked from commit 67d6b6f27e)
2024-09-14 00:18:58 +00:00
dundargoc
b020b66005 ci: add needs:backport label on backport PRs with conflict
This makes it easy to keep track of which backport PRs have failed and
need manual intervention to fix.

(cherry picked from commit 4c23b83456)
2024-09-13 15:16:35 +00:00
dundargoc
6f34f07a31 ci: enable automerge by default when backporting
This will automatically merge backported PRs without human intervention
if the tests pass.

(cherry picked from commit 057314345a)
2024-09-13 10:57:22 +00:00
dundargoc
575136c178 ci: always add target:release label when backporting
Previously the label was not added if the backport PR was created
manually. The new code is also easier to maintain as it's close to other
label-related code.

(cherry picked from commit 4c788b1757)
2024-07-21 16:03:10 +02:00
dundargoc
0e81c62405 ci: skip lintcommit workflow on release branches
Since lintcommit is a required check, it will always need to be run.
However, the lintcommit script is not designed to work on PRs that
doesn't target master branch (and it's not clear whether it's even
desirable).

To circumvent this we create a "dummy" lintcommit check that is run on
release branches that always passes, thus fulfilling the condition of
the required check.

(cherry picked from commit 0500804df5)
2024-07-17 17:29:18 +02:00
dundargoc
b94b341ef2 ci: run workflows on release branches
Github doesn't allow workflows to be run from the `github-actions`
account, which is the default account. This caused the CI on backport
PRs to not be run. The way to circumvent this is to use a token that
essentially "pretends" to be another user, which in turn triggers the CI
as desired.

Also run lintcommit on release branches as that is now a required check,
meaning it must always be run.
2024-07-16 20:12:13 +02:00
dundargoc
410f43c0ae ci: bump backport action to version 3 2024-07-16 20:12:13 +02:00
dundargoc
7400f9dfe5 ci: adjust workflows to enable required checks
Auto-merging is a useful feature by github, but it requires required
checks which requires a few adjustments. The primary change is that
required checks can't use `paths` or `paths-ignore` as that risks not
running the job, and required checks must always be run.

A workaround for this is to introduce a dummy workflow which is used for
every path not used in the real workflow. That way the required job is
"always" run as far as github is concerned. The workaround is unweildly
so it's only useful to do it for costly workflows where the potential
benefits are big. If not it's better to simply remove any `paths` or
`paths-ignore` from a workflow instead.

(cherry picked from commit 3c803483ac)
2024-07-15 18:16:57 +02:00
dundargoc
9a2760a01f ci: change label backport to target:release
`backport` is too similar `ci:backport release-x.y` and causes
confusion.
2024-05-17 22:52:56 +02:00
dundargoc
b83d5fabc6 ci(labeler): adjust configuration 2024-05-14 19:45:51 +02:00
dundargoc
c1396afa7c ci(build): use latest over explicit image version
These jobs should be safe to just use the latest as there's not many
moving parts as opposed to `test.yml`.
2024-05-11 12:58:35 +02:00
dundargoc
d26943a6e1 ci: don't try to label backport PR if it was not created 2024-05-02 11:45:07 +02:00
dundargoc
631d5189ad ci: improve default backport pull request title
`[Backport release-x.y]` will no longer be part of the pull request
title. This means the PR titles will go from looking like

```
[Backport release-0.9] fix(languagetree): remove double recursion in LanguageTree:parse
```

to

```
fix(languagetree): remove double recursion in LanguageTree:parse
```

The benefit of this is that pull requests merged with the "Squash and
Merge" strategy (which uses the PR title as the commit message), will
still follow the conventional commits specification. This will help
tools that rely on conventional commits such as git-cliff.

The `backport` label is added to backported PRs to help distinguish
between backport PRs with regular PRs in the "Pull Requests" tab on
github.

To reduce confusion with the `backport` label, the label to trigger the
backporting has been changed from `backport release-x.y` to
`ci:backport release-x.y`. This is also more consistent with other
labels that trigger a CI job which all use the `ci:` prefix.
2024-05-01 22:30:17 +02:00
dundargoc
947335be91 ci: update vim_patches.yml to follow conventional commits
This will change the commits messages from

```
version.c: update [skip ci]
```

to

```
docs: update version.c [skip ci]
```
2024-05-01 22:26:11 +02:00
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