Commit Graph

72 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
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
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
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
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
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
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
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
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
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
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
98bb1d66b1
ci: remove UBSAN_OPTIONS environment variable (#25963)
Because it overrides log_path from ASAN_OPTIONS.

Ref https://github.com/google/sanitizers/issues/1675
2023-11-10 15:47:34 +08:00
dundargoc
88ed9ffcd1 ci: work around flaky python3 tests
Python3 provider tests suddenly became extremely flaky on macos for
unknown reasons. For some reason, installing python with the
setup-python action over using the default python fixes the flakiness.
Use this workaround for the time being to unblock CI while we figure out
the root cause.
2023-11-06 23:06:35 +01:00
dundargoc
5cefec7349 build: various cmake fixes
- silence false warnings on MSVC
- merge `clang-tidy` cmake target into `lintc` and remove the
  corresponding make target
- use cmake's built-in endianness detection
2023-11-04 18:32:47 +01:00
dundargoc
9ad239690f ci: various fixes
- adjust reviewers
- add workflow as cache key
- install attr only when tesitng
- fix s390x workflow by checking out the merge PR instead of master
2023-11-03 22:16:45 +01:00
dundargoc
1997ef134a build: set char to always be signed
Sticking to the same convention makes it easier to reason about the code
and reduces complexity.
2023-11-01 08:20:24 +01:00
dundargoc
bc850ba2a0 ci: run tests in parallel
This will run the three test suites (unit, functional and old) in
parallel, meaning that neovim is built for each test and run separately.
This has a slight increase in total CI usage, but it allows rerunning
only the specific test suite that failed for flaky tests, which will
save some time.

Ideally we'd remove any drawbacks by building neovim once and reusing it
for each test suite, but that is not currently possible due to poor
upload/download speeds of the upload-artifact and download-artifact
actions. This has been addressed in
https://github.com/actions/toolkit/pull/1488, but will only be made
available in upload-artifact@v4 and download-artifact@v4.
2023-10-22 16:13:34 +02:00
dundargoc
3a3e025126 ci: install perl provider on mac
Perl provider installation was previously disabled on mac due to a
version conflict in 79bf507449. It is no
longer present, so we enable it.
2023-10-21 21:54:11 +02:00
dundargoc
40bd96b6f9 ci: use clang 17 as the default clang version is too old 2023-10-09 21:52:56 +02:00
dundargoc
9eb5d9f13f ci: various cleanups
- add reviewers
- correct cache key
2023-10-09 20:27:48 +02:00
dundargoc
6c0f900699 ci: enable clang-analyzer warnings
This adds the checks in https://neovim.io/doc/reports/clang/ when using
clang-tidy. The strategy is to enable all clang-analyzer checks, and
disable only the checks for the warnings that exist currently. This
allows us to eliminate each warning type without blocking ongoing work,
but also without adding bugs for already eliminated warnings.

The plan is to eventually eliminate https://neovim.io/doc/reports/clang/
by completely integrating it into the clang-tidy check.

Also add make and cmake targets `clang-analyzer` to run this check.
2023-10-09 16:52:28 +02:00
dundargoc
b6b70ae199 ci: install stylua from their releases
It's quicker to grab the .zip file rather than using homebrew.
2023-09-10 16:23:21 +02:00
dundargoc
6e26964e0e revert: "ci: trigger tests when pushing"
This reverts commit e71c7898ca.

Triggering jobs on users own fork turned out to be not that useful, and
only necessary in rare moments. It's easier to adjust the CI scripts if
the users wants CI results before creating a pull request. It also
reduces the complexity of the CI code.
2023-09-09 15:21:46 +02:00
dependabot[bot]
cf7d37ad13 ci: bump actions/checkout from 3 to 4
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-04 23:20:30 +02:00
dundargoc
3bf2839dec
ci: move external_deps job from cirrus-ci back to github actions
This partially reverts commit 7d0479c558.

The job has been particularly unstable when used with docker on
cirrus-ci, which is especially bad as it's meant to be a non-flaky and
simple test.
2023-09-03 12:06:32 +02:00
dundargoc
46e95909bf
ci: introduce CI_LINT option
This will abort if lint programs are not found, and is meant primarily
for the lint job in CI. Supersedes the REQUIRED argument in
add_glob_target as it's a superior replacement by being a built-in
solution.
2023-06-24 00:29:53 +02:00
dundargoc
aa130d0c7e
docs: small fixes (#23619)
Co-authored-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com>
Co-authored-by: Gustavo Ferreira <gustavo.ferreira@imaginecurve.com>
Co-authored-by: Kai Moschcau <mail@kmoschcau.de>
Co-authored-by: Lampros <hauahx@gmail.com>
2023-06-02 22:59:58 +08:00
dundargoc
2d289589b7
ci: remove reviewdog for uncrustify
Now that uncrustify is bundled it is no longer necessary.
2023-05-27 13:27:29 +02:00
dundargoc
ebb10d6248
build: remove functionaltest-lua target
It's not needed anymore as it does the exact same thing as
functionaltest. The functionaltest target will test the lua type neovim
was built with, which can be toggled with the PREFER_LUA option.
2023-05-24 21:14:47 +02:00
dundargoc
826b95203a
build: bundle uncrustify
Uncrustify is sensitive to version changes, which causes friction for
contributors that doesn't have that exact version. It's also simpler to
download and install the correct version than to have bespoke version
checking.
2023-05-18 16:27:47 +02:00
ii14
bd247d835f
ci: remove redundant asan and ubsan options
We now have default options for ASAN and UBSAN (#23259)
2023-05-15 23:21:04 +02:00
dundargoc
e71c7898ca
ci: trigger tests when pushing
This will allow contributors to test changes in their own fork when
pushing without needing to make a pull request. This can be useful when
wanting to test out an idea before initiating a review process.

Make the following assumptions when defining concurrency:
- Pull request will work the same.
- Pushes to the neovim repo will work the same: each unique commit will
  trigger a test run that won't cancel each other.
- Pushes to forks will cancel older CI runs on the same branch, similar
  to how pull requests work.

This will create duplicate CI runs when doing a pull request, one in the
neovim repo for the pull request event and one in the fork for the push
event. This is an acceptable trade as the runs in the fork doesn't count
towards the CI limit of neovim. Contributors are also free to disable
these actions in their own fork if they wish.
2023-05-15 00:08:57 +02:00
dundargoc
08991b0782
docs: small fixes
Co-authored-by: Christian Clason <c.clason@uni-graz.at>
Co-authored-by: Gregory Anders <greg@gpanders.com>
Co-authored-by: HiPhish <hiphish@posteo.de>
Co-authored-by: Julio B <julio.bacel@gmail.com>
Co-authored-by: T727 <74924917+T-727@users.noreply.github.com>
Co-authored-by: camoz <camoz@users.noreply.github.com>
Co-authored-by: champignoom <66909116+champignoom@users.noreply.github.com>
2023-05-13 21:33:22 +02:00
dundargoc
933fdff466
ci: make install_deps.sh more flexible
This will allow us to use it in containers as well as specify whether we
want to install test dependencies.
2023-04-29 15:43:54 +02:00
dundargoc
9f2fd89948
ci: install uncrustify through homebrew
It will result in less CI code, and the additional CI time is
negligible.
2023-04-29 13:39:36 +02:00
dundargoc
057af3203b
ci: replace stylua action with our own lint target
This will prevent situations where the linting works on CI but not
locally, at the cost of increased CI time.

Also manually ignore `runtime/vim/lua/re.lua`, as the .styluaignore
isn't respected when specifying a file instead of a directory.
2023-04-29 01:48:14 +02:00
dundargoc
7d0479c558
ci: containerize the external dependencies test
Cirrus ci automatically pushes/caches docker images, which makes
containerization much simpler to handle. Moving this job to cirrus ci
shortens the job by a minute, and reduces github actions CI usage by two
minutes per PR.
2023-04-26 23:22:12 +02:00
dundargoc
664f2749e6
build: add "ci" configure preset to reduce verbosity
`cmake --preset ci`

is equivalent to

`cmake -B build -G Ninja -D CI_BUILD=ON`

Also remove build presets as they're not very useful without workflow
presets, which are only available in schema versions 6 and above.
2023-04-23 17:12:46 +02:00
dundargoc
943ac2be55
ci: reuse script to enable Developer Command Prompt 2023-04-23 16:35:49 +02:00
dundargoc
801ac2accb
build: drop diff.exe from windows builds
The shipped versions of xdiff already does everything diff does, so this
duplication of tools isn't necessary. Furthermore, this setup is more
consistent overall, as the 'diffopt=external' option should be for
external programs rather than programs we bundle neovim with.

Install diffutils for oldtests in CI to avoid needing to modify tests.
2023-04-22 18:36:33 +02:00