Commit Graph

456 Commits

Author SHA1 Message Date
James McCoy
c410375d4d
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-03 06:31:09 -05:00
James McCoy
05dd41f3e9
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-03 06:31:09 -05:00
James McCoy
747e84a256
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-03 06:31:01 -05:00
Christian Clason
2024c10d74
ci(win): remove python workaround (#31212)
Explicitly installing Python 3.13 using (deprecated version of) `setup-python` looks to be no longer required for provider tests to pass.
2024-11-15 08:47:22 +01:00
dundargoc
0da4d89558
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-03 23:00:18 +08:00
Christian Clason
f8632c51f1 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-10-19 13:40:30 +02:00
dundargoc
00d1078ede ci: bump macos runner version to macos-15 2024-10-06 16:06:28 +02:00
dundargoc
0c9b3ef34d ci: bump ubuntu runner version to ubuntu-24.04
Also bump clang to version 20.
2024-10-05 17:35:41 +02:00
Justin M. Keyes
3f6bc34e66
docs: lua error patterns #30240
Co-authored-by: Mathias Fussenegger <f.mathias@zignar.net>
Co-authored-by: Ananth Bhaskararaman <antsub@gmail.com>
2024-09-24 04:46:50 -07:00
dundargoc
1d815acd78 build: bump minimum cmake version to 3.16 2024-09-21 23:42:03 +02:00
dundargoc
67d6b6f27e ci: skip automerge step if backport failed 2024-09-14 01:55:36 +02:00
dundargoc
755512ed60 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.
2024-09-13 16:58:15 +02:00
dundargoc
4c23b83456 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.
2024-09-13 16:49:35 +02:00
dundargoc
057314345a ci: enable automerge by default when backporting
This will automatically merge backported PRs without human intervention
if the tests pass.
2024-09-13 12:31:33 +02:00
bfredl
176bfea135 fix(build): issues with s390x CI
Does not fix everything, but at least let's test run to finish before
timeout
2024-08-29 15:15:50 +02:00
Lewis Russell
688b961d13 feat(treesitter): add support for wasm parsers
Problem: Installing treesitter parser is hard (harder than
climbing to heaven).

Solution: Add optional support for wasm parsers with `wasmtime`.

Notes:

* Needs to be enabled by setting `ENABLE_WASMTIME` for tree-sitter and
  Neovim. Build with
  `make CMAKE_EXTRA_FLAGS=-DENABLE_WASMTIME=ON
  DEPS_CMAKE_FLAGS=-DENABLE_WASMTIME=ON`
* Adds optional Rust (obviously) and C11 dependencies.
* Wasmtime comes with a lot of features that can negatively affect
  Neovim performance due to library and symbol table size. Make sure to
  build with minimal features and full LTO.
* To reduce re-compilation times, install `sccache` and build with
  `RUSTC_WRAPPER=<path/to/sccache> make ...`
2024-08-26 16:44:03 +02:00
Christian Clason
fa79a8ad6d build(deps): vendor libvterm at v0.3.3
Problem: Adding support for modern Nvim features (reflow, OSC 8, full
utf8/emoji support) requires coupling libvterm to Nvim internals
(e.g., utf8proc).

Solution: Vendor libvterm at v0.3.3.
2024-08-10 10:26:07 +02:00
zeertzjq
9307a53c7b
vim-patch:9.1.0661: the zip plugin is not tested. (#29993)
Problem:  the zip plugin is not tested.
Solution: include tests (Damien)

closes: vim/vim#15411

d7af21e746

Co-authored-by: Damien <141588647+xrandomname@users.noreply.github.com>
2024-08-06 22:53:05 +00:00
Gregory Anders
b3641b8008 build(deps): remove libtermkey dependency
It's been vendored since https://github.com/neovim/neovim/pull/25870.
2024-08-05 19:04:09 +02:00
bfredl
1247684ae1 build(deps): remove msgpack-c dependency 2024-08-05 12:22:12 +02:00
dundargoc
4c788b1757 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.
2024-07-21 15:39:47 +02:00
dundargoc
0500804df5 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.
2024-07-17 16:40:59 +02:00
dundargoc
dafd944a46 ci: remove "skip ci" tag
We can't skip CI runs as there are required checks that needs to always
be run.
2024-07-17 14:54:16 +02:00
dundargoc
a5d4e3467d 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 14:15:50 +02:00
dundargoc
3c803483ac 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.
2024-07-15 13:02:09 +02:00
dundargoc
f70af5c3ca ci: bump backport action to version 3 2024-05-27 19:47:49 +02:00
dundargoc
512d228111 ci: change label backport to target:release
`backport` is too similar `ci:backport release-x.y` and causes
confusion.
2024-05-17 22:46:20 +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
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
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
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
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
965dbd0e01 ci(s390x): enable CI_BUILD 2024-01-14 23:16:40 +01:00