Commit Graph

451 Commits

Author SHA1 Message Date
Vedant
3264cb294e
fix(ci/release/winget): bump action version 2023-02-20 21:23:08 +01:00
dundargoc
b62c0c8d9c
docs: fix typos (#21961)
Co-authored-by: Ben Morgan <cassava@iexu.de>
2023-02-20 15:12:59 +08:00
dundargoc
9301abdf74
ci: enable CI_BUILD automatically if environment variable CI is true (#22312)
Having to specify CI_BUILD for every CI job requires boilerplate. More
importantly, it's easy to forget to enable CI_BUILD, as seen by
8a20f9f98a. It's simpler to remember to
turn CI_BUILD off when a job errors instead of remembering that every
new job should have CI_BUILD on.
2023-02-18 17:43:39 +01:00
dundargoc
6ed5a9ab8c
build: test multi-config generator (#22310)
Multi-config generators can be tricky so testing them would be good.
Also test GCC release and MinSizeRel build types as they're prone to
unusual warnings. Remove release testing from test.yml as this is a
sufficient replacement.
2023-02-18 16:54:19 +01:00
dundargoc
fc8c77a69f
ci: split ci.yml into a test workflow and a build test workflow (#22302)
Having a workflow that only builds neovim without running all of the
tests is a cheap way to test the build still works without burning too
much CI time.
2023-02-18 10:47:22 +01:00
dundargoc
fbb27a101f
ci: remove former dependencies that are no longer needed (#22301)
libtool, autoconf, automake and perl are no longer dependencies of
neovim and doesn't need to be installed in CI anymore. The dependencies
and the commit that removed them as dependencies are the following:

libtool: b05100a9ea
perl: 20a932cb72
autoconf+automake: e23c5fda0a
2023-02-18 00:09:51 +01:00
zeertzjq
d079c8cc5d
ci: change functionaltest timeout to 20 minutes (#22294)
15 minutes is too short for TSAN.
2023-02-17 11:06:56 +08:00
dundargoc
f1c5887377
ci: add GCC Release testing (#22274)
ci: add GCC release testing

We currently have no release testing, so it's good to check for any
unwanted behavior on release builds as well. Prefer GCC over clang, as
GCC release builds seem to create more warnings on release compared to
debug.
2023-02-16 00:15:09 +01:00
dundargoc
bb9c673d2c
ci: automatically maximize MIN_LOG_LEVEL if CI detected (#22248)
Detect if on CI by checking that the CI environment variable is set to "true".
This is a common pattern among CI providers, including github actions and
cirrus.
2023-02-13 20:04:54 +01:00
dundargoc
9de9bd4bed
ci: replace cmake script with bash script (#22246)
Bash has better error handling than cmake, and seem overall slightly
more suited to scripting than cmake.
2023-02-13 18:26:01 +01:00
dundargoc
5d3769ea23
ci: install dependencies with a single script (#22241)
It's easier if the os-specific installations are done by the script itself
2023-02-12 22:09:10 +01:00
dundargoc
2b1c07a1d4
ci: remove unnecessary matrix from codeql workflow (#22239) 2023-02-12 18:12:17 +01:00
dundargoc
477d4bbf5f
ci: inline external environment scripts (#22237)
Scripts that define the build itself shouldn't be external as they lead
to hard to find bugs.
2023-02-12 18:08:37 +01:00
dundargoc
c099836168
ci: convert environment variables to matrix variables (#22224)
Having as few indirections as possible makes it easier to understand the
code.
2023-02-12 13:09:46 +01:00
dundargoc
e81b4274fc
ci: delete ci/ (#22227)
Having CI scripts that is separate from the build system causes
tremendous amounts of problems, headaches and bugs. Testing the validity
of the scripts locally become near impossible as time goes on as they're
only vetted if it works on whatever CI provider we happened to have at
the time, with their own quirks and behavior.

The extra indirection between "cmake <-> general CI scripts <-> GHA" is
also a frequent source of problems, as the orchestration needs to be
done with environment variables, cmake flags and github actions matrix
strategy. This combination has turned out to be exceptionally fragile.

Examples:
15394b6855
13aa23b62a
https://github.com/neovim/neovim/pull/22072#discussion_r1094390713

A lot of the code was inlined to .github/workflows/ci.yml without
further modifications. While this in itself doesn't integrate with our
build system any more than the current situation, it does
1. remove a level of indirection, and more importantly
2. allow us to slowly start integrating the CI into our build system now
   that all the relevant code is in one place.
2023-02-12 11:50:08 +01:00
dundargoc
3a5dddf24f
ci: show all logs at the end of a run (#22226)
* ci: show all logs at the end of a run

The current CI won't show the logs on error due to early exit. This will
at least show the logs, although for all tests at once.
2023-02-11 18:16:04 +01:00
dundargoc
883ec20d9f
ci: inline build commands and remove before_script.sh (#22202)
Abstracting the build commands to a separate script makes it more
difficult to reason about it and more error-prone.
2023-02-11 13:27:43 +01:00
dundargoc
b0d156c00b
ci: run lintcommit file from PR branch (#22219)
As the trigger type is no longer pull_request_target there is no longer
any risk of using the lintcommit script directly from the user PR.
2023-02-11 13:22:54 +01:00
bfredl
87d0809545 build(ci): let ASAN print tracebacks for more errors (SIGABORT, SIGILL) 2023-02-10 22:14:45 +01:00
dundargoc
d5b1712dc4
ci: remove unnecessary environment variables (#22175) 2023-02-10 13:56:07 +01:00
dundargoc
827947447e
ci: split functionaltest-lua into two separate jobs (#22201)
More specifically, move the job testing the oldest supported cmake into
its own job. This opens the way for other jobs to use powerful and
advanced cmake features such as choosing which files to use with the -S
flag.

Removed testing from this job as this probably won't reveal anything
that other jobs already doesn't already show, since the only difference
is the cmake version.
2023-02-10 12:04:00 +01:00
dundargoc
eb3f8989a0
ci(lintcommit): turn off debug tracing (#22196)
The default output is too verbose and messy for someone not already
familiar with lintcommit, which defeats it purpose.
2023-02-09 23:23:48 +01:00
dundargoc
ec932961cc
ci: inline internal caching script to Github actions (#22192)
I don't think it's possible to meaningfully abstract away caching on
multiple providers, as each provider has different mechanisms
on how they work.
2023-02-09 21:13:03 +01:00
dundargoc
05d3bef836
ci: add individual timeout limits for all tests (#22193)
The CI somtimes freezes on a specific test, wasting 45 minutes for the
entire job. Adding a timeout of 15 minutes to functionaltest and 5
minutes to unittests will mitigate the problem.
2023-02-09 20:13:05 +01:00
dundargoc
d6d3a92013
build: replace check-single-includes with clang-tidy (#22061)
Clang-tidy already does what check-single-includes does automatically on
top of its regular linting. It is also generator independent, so it
doesn't take an eternity to run on slower generators such as Visual
Studio.
2023-02-08 18:16:48 +01:00
dundargoc
81c5483dcb
ci: add universal macos job (#22156)
The universal macos release is particularly sensitive to build system
changes. Adding a job that builds a universal binary whenever a cmake
file is changed will help prevent future release breaks.
2023-02-07 23:09:08 +01:00
dundargoc
c1d76363ac
ci: simplify how environment variables are used (#22067)
Having a clear separation between when we manipulate variables and when
we export them to GITHUB_ENV makes it less error-prone.
2023-02-07 14:43:45 +01:00
bfredl
13aa23b62a refactor(tests): run unittests using main nvim binary in interpreter mode
This allows us to get rid of the separate "nvim-test" target
2023-01-31 19:28:26 +01:00
dundargoc
9cb3b276bd
ci(news): mention that ignoring news.txt is fine (#22043)
news.txt is only meant as a reminder, but contributors have no way of
knowing this automatically without such a message.
2023-01-29 17:03:53 +01:00
dundargoc
15394b6855
ci: fix lintc to use external dependencies instead of bundled (#21995)
Use the bundled libvterm dependency as the external package is outdated,
with the hopes of being able to use the external package once its
version meets our required version.

Co-authored-by: Christian Clason <c.clason@uni-graz.at>
2023-01-25 20:33:18 +01:00
dundargoc
42d5142367
ci: enable CI_BUILD on windows (#21557)
This will ensure warnings are treated as errors when using MSVC.

Also fix const correctness warnings. The warnings in mbyte.c are false
positives that triggers this warning on MSVC v19.32 and lower, which our
CI still use. The (void *) casts can be removed once the CI MSVC version
has been upgraded to v19.33 or higher.
2023-01-18 20:23:46 +01:00
dundargoc
6383e454ab
ci: run each linter once (#21825)
Running "make lintlua" will run both stylua and luacheck if both exist.
But this is not necessary as we already lint with stylua with the
stylua-action, so we only need to lint with luacheck on our own.
2023-01-16 11:11:48 +01:00
dundargoc
909abfbd87
ci: deduplicate TEST_FILE environment variable (#21667) 2023-01-15 12:25:28 +01:00
zeertzjq
3d49d39cd8
ci(tsan): run functionaltests instead of oldtests (#21744)
With TUI as an external process oldtests no longer involve threads, so
TSAN isn't useful. Meanwhile functionaltests may involve threads.
2023-01-11 14:36:26 +01:00
dundargoc
d89290b453
ci(news): checkout to HEAD commit instead of merge commit (#21679)
The default merge branch is unreliable when trying to determine number
of commits in a PR. Using the HEAD branch of the PR removes this
ambiguity.
2023-01-07 16:51:52 +01:00
Justin M. Keyes
599e1d019a ci: use nvim -l in api-docs job 2023-01-05 17:10:02 +01:00
Justin M. Keyes
7c94bcd2d7 feat(lua)!: execute Lua with "nvim -l"
Problem:
Nvim has Lua but the "nvim" CLI can't easily be used to execute Lua
scripts, especially scripts that take arguments or produce output.

Solution:
- support "nvim -l [args...]" for running scripts. closes #15749
- exit without +q
- remove lua2dox_filter
- remove Doxyfile. This wasn't used anyway, because the doxygen config
  is inlined in gen_vimdoc.py (`Doxyfile` variable).
- use "nvim -l" in docs-gen CI job

Examples:

    $ nvim -l scripts/lua2dox.lua --help
    Lua2DoX (0.2 20130128)
    ...

    $ echo "print(vim.inspect(_G.arg))" | nvim -l - --arg1 --arg2
    $ echo 'print(vim.inspect(vim.api.nvim_buf_get_text(1,0,0,-1,-1,{})))' | nvim +"put ='text'" -l -

TODO?
  -e executes Lua code
  -l loads a module
  -i enters REPL _after running the other arguments_.
2023-01-05 17:10:02 +01:00
zeertzjq
2732759bff
ci(release): properly set multiline output variable (#21560) 2022-12-28 19:48:19 +08:00
dundargoc
788eb65494
ci: remove needs:response label if author responds (#21489)
ci: remove "needs:response" label if author responds

The default behavior of the stale action is to indiscriminately remove
the `needs:response` label for any activity whatsoever, from anyone. The
other option is to turn it off completely, meaning the maintainers needs
to manually remove the label themselves when the author responds for an
issue to not close automatically. Neither of these behaviors are useful
to us.
2022-12-23 12:54:30 +01:00
dundargoc
fa6ab48926
ci: bump api-docs runner to ubuntu-latest (#21501)
This was set explicitly to ubuntu.22.04 as ubuntu-latest pointed to
ubuntu.20.04, and we needed 22.04 to have a new enough doxygen version
for this job to work. Now that ubuntu-latest points to 22.04 this
workaround is no longer needed.
2022-12-22 13:18:17 +01:00
dundargoc
b1ca49a002 ci: don't use asan_symbolize for the ASAN job
asan_symbolize-14 gives a deprecation as it relies on outdated python
features. We can safely stop using asan_symbolize as it's only needed
for special cases such as cross compilation which we don't have to worry
about.
2022-12-21 23:53:45 +01:00
dundargoc
5d5fa886ff
ci: bump stale action version (#21490) 2022-12-21 16:54:46 +01:00
dundargoc
d65684f0c7
ci: bump stylua action to v2 (#21455) 2022-12-17 13:32:20 +01:00
dundargoc
ef95174694
ci: add team reviewers (#21434)
Using team reviewers when possible reduces the churn on the git history
as we'll be able to add or remove reviewers without needing to change
the workflow files.

This requires using Github fine-grained personal access tokens with Pull
Requests set to "Read and write" and Members to "Read-only".
2022-12-15 20:40:30 +01:00
dundargoc
b12bb97fee
docs: fix typos (#21328) 2022-12-12 08:53:07 +08:00
James McCoy
2ecb401f8b
fix(vim-patches): ensure libfuse is installed 2022-12-09 09:56:56 -05:00
dundargoc
73ddb6daf9
ci(news): fetch full history (#21312)
We seem to need the parent commit of the earliest PR commit in order to
perform common git functionality to check which files were changed.
2022-12-06 17:38:24 +01:00
dundargoc
6c285a6e49
ci: create CI job to check if news needs to be updated (#21142)
If any commit message in the PR is either of type "feat" or is a
breaking change, then there's a high probability that news.txt should be
updated. Give an error if news.txt hasn't been updated in that case.

This workflow cannot 100% correctly determine if news.txt should be
updated even if the commit messages were exactly correct. The entries in
news.txt is determined by changes between releases, while the commit
messages are based on the master branch. While it is an approximation,
it is still a useful enough one that it's still valuable to have this
job as a reminder even if it gives an error if it shouldn't. In these
cases it is perfectly fine to ignore the failure for this job.
2022-12-05 11:58:30 +01:00
dundargoc
5c52971f60
ci: use shell script to deduplicate workflow (#21079) 2022-12-05 11:58:13 +01:00
dundargoc
9d8dbd9846
ci: use local action to make make cache keys consistent (#20538)
The advantages of using an action is that it reduces boilerplate and
repetition from the main ci.yml workflow.
2022-12-05 11:57:52 +01:00
dundargoc
adda751407
ci: rename workflow files to be simpler and more consistent (#21253) 2022-12-01 10:55:34 +01:00
Vedant
488e99311f
ci(release/winget): correctly set output variable (#21077) 2022-11-17 09:43:45 +01:00
zeertzjq
6aa5520763
ci(windows): set $PSNativeCommandArgumentPassing = 'Legacy' (#21083)
Ref https://github.com/actions/runner-images/issues/6586

Some runners are using new images, while some others are using old
image. This is the only way I can find that makes it work on both.
2022-11-17 15:57:59 +08:00
zeertzjq
c404f9b4ba
ci(stale): disable remove-stale-when-updated (#21075)
The needs:response label should only be added and removed manually, and
the action's behavior of removing the label on any activity (e.g. title
change, removing reviewers) is unwanted.
2022-11-16 16:32:05 +01:00
dundargoc
ce198102bd
ci: add stale bot #20884
Stale strategy is to never automatically stale anything. Only mark stale
issues or PRs if they get the `needs:response` label. In that case close
after 30 days if there hasn't been any activity.
2022-11-06 19:05:51 -08:00
dundargoc
c4f3d41d6b
ci: install only necessary dependencies #20970 2022-11-06 17:35:27 -08:00
dundargoc
897186f409
ci: request reviewers when PR is reopened #20972 2022-11-06 16:42:59 -08:00
dundargoc
a966347cab
ci: replace deprecated feature set-output (#20834)
The new recommended way to share values between Github Actions steps is
to use environment files:
https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-output-parameter
2022-11-05 23:22:39 +01:00
dundargoc
9a52a8e1ec
ci: remove ci/build.ps1 (#20891)
Main benefit is that this will return the correct exit code by default,
meaning the lengthy workarounds to properly fail a test aren't needed.
2022-11-05 22:57:11 +01:00
dundargoc
27ff59fb07
ci: fix incorrect asan_symbolize name (#20900) 2022-11-05 22:29:44 +01:00
dundargoc
5723b19210
revert: "ci(commitlint): use pull_request_target to avoid "skip ci"" (#20845)
This reverts commit d7e2229b41.

This workflow isn't required to pass to merge a PR any more. Using
pull_request_target to bypass the required check when using [skip ci] is
therefore no longer needed.
2022-11-05 22:09:50 +01:00
dundargoc
0aba176171
ci: skip tests if build fails (#20908)
It's currently difficult to pinpoint the cause of a failure since all
tests are run even if the build steps fail. But since the build failed
the test will almost always fail as well as it's dependent on a
successful build, leading to many steps being marked as a failure even
though the real problem was the build step. Even worse, the default
behavior of GitHub Actions is to only automatically show the last failed
step, which is misleading if the build process fails since it'll show
the logs of the failing test step.

An easy solution would be to abort all subsequent steps if any steps
fail. This isn't optimal however, as we want all lint and test failures
to show on a single run instead of prematurely aborting on a single test
step.

We can solve both problems by dividing each job into two phases: the
build/installation phase and the test/lint phase, with a checkmark step
in between. The strategy is simple: if any step before the checkmark
step fails (the build phase), then abort all following steps. If any
step after the checkmark fails (the test phase), then show that test as
failed but continue running all tests.
2022-11-04 13:26:12 +01:00
dundargoc
6e84a46abc
ci(stylua): explicitly set the version to latest (#20869)
This will silence the warning about needing to pin the version in the
Summary Page.
2022-10-30 11:08:59 +01:00
dundargoc
cf0f53037c
ci(windows): build dependencies with Ninja (#20800)
This will save around a minute of CI time for each run. Also clean up
build.ps1 by removing unnecessary code.
2022-10-30 10:06:13 +01:00
dundargoc
49fbcb5b82
ci: use GHA default clang for asan, tsan jobs #20846
Default is currently clang 14. GHA images are updated at least once per year, so
we don't need to manually install a newer clang version.

Also remove step for installing clang-13 since it's not needed anymore.
2022-10-29 12:11:56 -07:00
dundargoc
1d625a3cf7
build: remove python linting #20851
This includes both the `lintpy` make target and for CI. We're actively
trying to reduce our python usage, so this only seems to give warnings
for unimportant things such as exceeding the line after deleting python
code.
2022-10-29 10:42:10 -07:00
Justin M. Keyes
24c9561a68
vim-patch: bump VIM_VERSION from 8.0 => 8.1 #20762
There are 6 remaining 8.0.x patches, tracked in:
https://github.com/neovim/neovim/issues/5431
2022-10-21 03:56:09 -07:00
dundargoc
be43cf16cc
ci: bump ubuntu and macos to latest stable versions (#20479) 2022-10-17 19:40:54 +02:00
Lewis Russell
288208257c feat(cscope)!: remove 2022-10-13 16:37:23 +01:00
James McCoy
9207ad5c84
Merge pull request #20528 from mliszcz/build-appimage-in-container
ci: Use ubuntu docker container to build appimage
2022-10-08 10:02:54 -04:00
dundargoc
048baa92be ci(backport): bump version to v0
backport-action now uses "v0" tag to point to the latest stable version.
This helps us avoid having to manually bump the version to get bug
fixes.
2022-10-08 14:24:03 +02:00
mliszcz
f2cab9b5b4 ci: use ubuntu docker container to build appimage
Switch back to Ubuntu 18.04 for buliding the appimage. This allows for
using the appimage on older systems that do not provide GLIBC_2.29.

Fixes #19711.
Fixes #20113.
2022-10-07 15:13:40 +02:00
dundargoc
6cd643dbf9
ci: update which paths to ignore (#20510)
Skipping the CI on documentation-only changes is no longer appropriate
as we now rely on CI to test parts of documentation, e.g.
test/functional/lua/help_spec.lua.

Ignore changes in contrib/ as it's for non-essential user contributions
that we don't need to test.
2022-10-06 18:45:42 +02:00
Vedant
618d21fcc9
ci(publish-winget): use versioned tags for action #20417 2022-10-01 10:13:44 -07:00
dundargoc
63aea857a9 ci(release): remove unnecessary matrix strategy
We only have one Windows release job, so the matrix setup isn't needed.
2022-09-30 16:40:44 +02:00
Christian Clason
eb4844b5ed
build(macos): restore and test universal build (#20383)
Build tree-sitter parsers for arm64 as well as x86
Check that all created binaries contain both architectures
2022-09-28 11:06:11 +02:00
dundargoc
6afe5cce79
ci(backport): bump to backport-action@v0.0.8 #20366
Primary bug fix is allowing backports with empty PR description.
2022-09-27 05:53:48 -07:00
dundargoc
0760379b41
ci(stylua): change action version to v1 (#20273)
Changing the action version to v1 allows us to automatically get patch
updates as it points to the latest stable version.
2022-09-22 20:19:38 +02:00
Vedant
7a091fdfaf
ci(publish-winget): fix errors that prevents release (#20232) 2022-09-19 10:48:05 +02:00
Vedant
c126c1f73a
ci(release-winget): publish nightly winget prerelease #20209 2022-09-16 15:33:06 -07:00
Christian Clason
6254b0fd3b ci(tests): don't skip parsers on functionaltest
Treesitter parsers are now a mandatory part of the installation and
should be tested on all platforms. Remove `pending_c_parser` helper.
2022-09-06 07:57:46 +02:00
Christian Clason
39494be2a4
ci: add codeql action (#19810)
replaces deprecated LGTM workflow:
https://github.blog/2022-08-15-the-next-step-for-lgtm-com-github-code-scanning/
2022-08-18 11:55:15 +02:00
Lewis Russell
0cd39c2f50 ci(lint): separate lintc from lint
All steps in lint now do now require a Neovim build.
2022-08-14 15:47:46 +01:00
Lewis Russell
27c3919a48 ci(lint): move some steps before build 2022-08-14 15:41:43 +01:00
Lewis Russell
49e691f58f ci(line): lintcfull -> lintc
lintcfull == lintc + uncrustify

We are already running uncrustify separately so can just run lintc
instead.
2022-08-14 15:41:07 +01:00
Lewis Russell
0fcc32b707 ci(lint): run uncrustify earlier 2022-08-14 15:37:23 +01:00
Lewis Russell
1dc984eaab ci(lint): generate PR suggestions from uncrustify 2022-08-14 15:37:22 +01:00
Vedant
f9a9956837
ci(release): move release-winget steps into release job #19689 2022-08-13 06:34:28 -07:00
Lewis Russell
5b80d20271 ci(cache): remove ccache
It was never in action since migrating from travis to github actions.
2022-08-12 14:07:23 +01:00
Christian Clason
d212dfd676 ci(release): build with standard gcc on Ubuntu
Ubuntu-20.04 ships with GCC 10.3.0, which is enough to avoid #14150
2022-08-09 18:10:18 +02:00
Christian Clason
48241c3b23 ci(release): bump deprecated ubuntu image to 20.04
`ubuntu-18.04` is now deprecated and subject to outages, see
  https://github.blog/changelog/2022-08-09-github-actions-the-ubuntu-18-04-actions-runner-image-is-being-deprecated-and-will-be-removed-by-12-1-22/
2022-08-09 18:10:18 +02:00
Vedant
6c26d0b068
ci(distribution): auto-release winget #19121
- forked winget-pkgs to https://github.com/neovim/winget-pkgs
- key stored in WINGET_TOKEN at https://github.com/neovim/neovim/settings/secrets/actions
- deploy key public key stored at https://github.com/neovim/winget-pkgs/settings/keys
2022-07-25 03:58:16 -07:00
Carlo Cabrera
3f2e1c1db9
ci(release): use cpack on macOS #19459
We use `cpack` to generate the release tarballs on Linux. Now that we
don't need to bundle `libintl`, we can do the same on macOS.
2022-07-22 07:08:11 -07:00
dundargoc
e8c94697bc
ci: test only a single macos version (#19418)
The differences in MacOS releases are smaller since they're now upgraded
yearly, meaning the need to test each version is reduced.
2022-07-18 18:39:41 +02:00
kylo252
d15a66d803
ci(windows): config and build before publish step (#19416)
Problem: Windows package step failed (silently).
Solution: Make sure to configure cmake before attempting to build the package target.
2022-07-18 15:18:15 +02:00
kylo252
9f4b19b6d0
ci: refactor build.ps1 #19336
Refactor `build.ps1` into a more modular design

9728f3b558/.github/workflows/ci.yml (L283-L296)

- Separate CI steps.
- Remove unneeded code related to setting up CMake.
- Use parallel/incremental builds.
- Fix github's cache.
- Clear the way for the possibility of replacing this file with a cmake-preset:
  https://github.com/neovim/neovim/pull/19128
2022-07-17 15:07:35 -07:00
Dundar Goc
bb1a464467 ci: remove unnecessary file run_lint.sh
It's a leftover artifact that currently just acts as an unnecessary
intermediary script that calls the Makefile. It can be replaced by just
calling the Makefile directly.
2022-07-11 16:41:06 +02:00
Carlo Cabrera
674787feae
ci(release): link gettext include directory
Our previous mangling of gettext broke the `HAVE_WORKING_LIBINTL` test
because it prevented CMake from finding `libintl.h`. Let's fix that by
linking Gettext's `include` directory into `/usr/local` too.
2022-06-29 02:19:45 +08:00
Justin M. Keyes
f05a2891d3 build: rename build-related dirs
Problem:
Dirs "config", "packaging", and "third-party" are all closely related
but this is not obvious from the layout. This adds friction for new
contributors.

Solution:
- rename config/ to cmake.config/
- rename test/config/ to test/cmakeconfig/ because it is used in Lua
  tests: require('test.cmakeconfig.paths').
- rename packaging/ to cmake.packaging/
- rename third-party/ to cmake.deps/ (parallel with .deps/)
2022-06-28 04:02:29 -07:00
Vedant
9ddb481d88
refactor(ci): cleanup release.yml #19132 2022-06-28 03:40:53 -07:00
Carlo Cabrera
ae3e371303
docs(release): suggest "xattr" for macos release #19100 2022-06-26 08:46:37 -07:00
Carlo Cabrera
d0644fa9bf
ci(release): build a universal binary on macOS
After some tweaks to our dep builds, we can now build a universal binary
for macOS by using `CMAKE_OSX_ARCHITECTURES`. So, let's do that. This
requires a number of additional changes:

1. We need to build on macOS 11, since earlier versions do not support
   building universal (M1 + Intel) binaries.
2. We need to provision a universal `libintl`. The linker will look for
   an ARM64 version of this library when linking the `nvim` binary.

While we're here:
1. Link statically to `libintl`. This allows to to avoid having to do
   any install name rewriting or codesigning to package Neovim.
2. Bump the `MACOSX_DEPLOYMENT_TARGET` to `11`. We're already using a
   `libintl` built by Homebrew (through the pre-installed version of
   `gettext`), and that is built for macOS 11.

In order to ensure we link to `libintl.a` instead of `libintl.dylib`, we
have to make sure that CMake can't find the latter. This ideally should
be a matter of doing `brew unlink gettext`. However, CMake is too adept
at finding things that Homebrew has installed (even when not linked), so
we have to do a bit more than that. This appears in the additional step
ensuring static linkage to `libintl`.

We end up breaking some Homebrew-installed software in the process, and
some of these software is called during our build (e.g. curl, git,
wget). To avoid any adverse effects, let's just uninstall them.
2022-06-25 00:25:05 +08:00
Christian Clason
c5c5d980a1
ci(release): skip CoreServices system library on macOS (#19021)
Problem:
The release script bundles a system library (CoreServices) that was
added in #18294, which leads to errors on M1 since the architecture is
different from the Github runner.

Solution:
Skip CoreServices when bundling the libraries (as was done for the
CoreFoundation library that #18294 replaced with CoreServices).
2022-06-19 16:20:27 +02:00
dundargoc
6d57bb89c1
build: add a cmake target for all used linters #18543
* build: move the logic for linters to cmake
Cmake is our source of truth. We should have as much of our build
process there as possible so everyone can make use of it.

* build: remove redundant check for ninja generator
The minimum cmake version as of writing this is 3.10, which has ninja
support.
2022-06-09 08:09:24 -07:00
James McCoy
950ab00c2b
ci: run tests with no treesitter parsers installed 2022-06-08 21:10:34 -04:00
James McCoy
10291bb854
Merge pull request #18788 from dundargoc/ci/api-docs/color
ci(api-docs): show required changes with color
2022-06-08 19:55:51 -04:00
James McCoy
e9803e1de6
Merge pull request #18789 from dundargoc/ci/api-docs/run-in-drafts
ci(api-docs): run in drafts as well
2022-05-29 09:51:18 -04:00
dundargoc
f31a10204c
ci(uncrustify): show diff on failure #18780
This will make it possible to see what needs to be fixed without having
uncrustify installed locally.
2022-05-28 17:00:25 -07:00
Dundar Goc
39613b6a2d ci(api-docs): run in drafts as well
A contributor should be able to be sure their PR passes the CI before
clicking "Ready for review".
2022-05-29 00:55:12 +02:00
Dundar Goc
d353d5f002 ci(api-docs): show required changes with color
It makes it easier to see what needs to be changed.
2022-05-28 21:42:40 +02:00
James McCoy
a3df012845
ci: use ubuntu-latest for vim-patches and coverity-scan
Since we're not running tests or other things that are more sensitive to
changes in the VM environment, use ubuntu-latest to avoid the busy work
of updating the VM image.
2022-05-28 14:22:42 -04:00
James McCoy
eebd682221
Merge pull request #18728 from dundargoc/ci/api/upgrade-to-ubuntu-22
ci(api-docs): upgrade to ubuntu 22 and remove conda dependency
2022-05-24 07:20:40 -04:00
Dundar Goc
db059ed1f1 ci(api-docs): add comment explaining why full clone is required 2022-05-24 12:29:58 +02:00
Dundar Goc
e9f8a478fc ci(api-docs): upgrade to ubuntu 22 and remove conda dependency
Ubuntu 22 has doxygen version 1.9.1 available in apt, which means we
don't need to use conda anymore. This will somewhat simplify the
workflow.
2022-05-24 12:21:17 +02:00
dundargoc
63741176ce
ci(commitlint): only trigger on PRs to master #18679
This will prevent a failure for backported PRs as they use a different
commit message.
2022-05-22 08:03:06 -07:00
dundargoc
12f45fd697
ci: bump github actions versions #18616 2022-05-20 20:45:10 -07:00
dundargoc
045aacc384
ci: lint with uncrustify #18563
This lint job will ensure that the C codebase is properly formatted at
all times. This helps eliminate most of clint.py.

To save CI time, it's faster to manually compile uncrustify and cache
the binary instead of using homebrew (the apt-get package is too old).
2022-05-20 20:41:57 -07:00
James McCoy
3e627f9e55
ci(coverity): run every day instead of once/week
Neovim currently falls in the 100 kLOC - 500 kLOC bucket, which can scan
3x/day.
2022-05-20 08:17:47 -04:00
zeertzjq
cd998f8804
ci(coverity): correct cron job time #18590
The comment says it should be run at 00:10 UTC, and in cron job format
minutes come before hours.
2022-05-16 03:21:55 -07:00
dundargoc
f8af81445b
ci: remove mingw job #18580
Unnecessary CI builds increase the change of spurious failures, which are costly
noise. Of course, we should fix all legitimate bugs, but we also cannot
micro-manage every platform, so there needs to be a clear motivation for the CI
builds that we maintain.

Reasons against maintaining a mingw CI job:
1. The windows mingw build is slow.
2. Failures:
    - https://github.com/neovim/neovim/issues/18494
    - https://github.com/neovim/neovim/issues/18495
3. The mingw artifact is 10x bigger than the windows MSVC artifact:
   https://github.com/neovim/neovim/issues/10560
4. Our releases publish the MSVC (not mingw) artifact for Windows users:
   https://github.com/neovim/neovim/releases
5. Non-MSVCRT has limitations documented by libuv: http://docs.libuv.org/en/v1.x/process.html
   > On Windows file descriptors greater than 2 are available to the child process only if the child processes uses the MSVCRT runtime.

Closes https://github.com/neovim/neovim/issues/18551
2022-05-15 15:59:58 -07:00
dundargoc
a098e304b0
ci: enable tests on drafts as well #18566
previous: https://github.com/neovim/neovim/pull/14123

CI tests were disabled on drafts #18566 to manage the
large number of incoming jobs. While this did help, it had the drawback
of making the purpose of the ready-for-review a bit fuzzier. It went
from a clear "my PR is ready" signal to maintainers to somewhere between
"my PR is ready but I need the tests to confirm" to "please don't merge
yet, I just need to see the test results". Worse is that the specific
case of wanting to see the test results but not wanting it merged is
that this needs to be actively conveyed to the maintainers with a [DNM]
or a comment to not merge the PR yet. All of this causes weird
workarounds and noises which I believe isn't necessary.

The reason why I don't think this workaround is needed anymore is that
our CI now aborts a job if a new job from the same pull requests is
created, which makes the "10 simultaneous jobs per PR" situations that
triggered this not possible.
2022-05-15 08:18:38 -07:00
Justin M. Keyes
b96037e42d
ci: remove remnants of gperf #18550
gperf was removed in 36613b888b
yay!
2022-05-12 16:55:27 -07:00
Christian Clason
676e9e9334 ci: lint runtime with stylua 2022-05-09 16:31:55 +02:00
zeertzjq
21abb24bd0 ci: add a check with -funsigned-char 2022-05-06 08:49:26 +08:00
zeertzjq
cfaf7440fc
ci(backport): remove triggering by comment (#18210)
Triggering by comment is not needed. Applying the label is enough to
trigger the backport action.
2022-04-23 14:26:42 -07:00
Henry Fraser
96b461a000
refactor(packaging): Windows: improve MSI, remove NSIS #18069
- Removed NSIS installer.
  - Prevents undefined behaviour when two installations are performed to the same directory (NSIS + MSI).
  - Reduced cost of maintaining two installers that do the same thing.
  - Chose Wix MSI due to its better integration with Windows.
- Added Wix patch file to add neovim binaries to the system path during installation.
- Replaced neovim installer icons with better looking versions.
- Renamed neovim installer icons from logo.ico -> neovim.ico for all
  icons to better reflect contents.
2022-04-11 07:58:46 -07:00
James McCoy
dbcb76bd7a
Merge pull request #17888 from dundargoc/ci/remove-reviewers-when-drafting 2022-03-31 15:38:26 -04:00
Dundar Göc
da3ef2a538 ci: remove reviewers when drafting or closing a PR 2022-03-27 22:35:26 +02:00
James McCoy
b66cc0f569
Merge pull request #17873 from muniter/jl-apidocs-improvementes
ci(doc): improve missing docs workflow
2022-03-27 16:21:02 -04:00
Javier López
45dbb78747 ci(doc): improve missing docs workflow
1. Add new pattern `runtime/doc/**`. This is a common case were the
   contributor modifies only the help file but the doc gen would discard
   their changes.

2. Add to the output what the changes after running doc gen would be.

[skip ci]
2022-03-26 12:38:36 -05:00
James McCoy
66fff788f2
Merge pull request #17857 from muniter/jl-breaking-change-label
ci: automatic breaking change label
2022-03-26 09:45:54 -04:00
Javier López
ca7d633eaf ci: automatic breaking change label
When the PR title contains the breaking change format apply the
breaking-change label.
2022-03-26 07:18:00 -05:00
dundargoc
61205c1def
chore: fix typos (#17755)
Co-authored-by: Jordan Haine <jhaine@securitycompass.com>
2022-03-25 19:57:59 +01:00
zeertzjq
fc3bff6b7e ci: remove src/nvim/**.lua from docgen pattern
After #17623 this pattern is no longer necessary.
2022-03-24 11:35:24 +08:00
Javier López
b55e65980a fix(ci): provide necessary permissions for calling workflow
Also error on the side of security adding an extra check on the
automatic PR step.
2022-03-21 22:40:24 -05:00
Javier López
9191401025 ci(docs): add a check for PR's to commit their doc changes
Repurpose the api-docs workflow to also run in all PR's but work only as
a check, if the changes in the PR introduce doc changes that are not
committed fail.

[skip ci]
2022-03-18 13:29:55 -05:00
Dundar Göc
815ba835a3 ci: refactor and simplify CI process 2022-03-10 09:21:41 +01:00
Dundar Göc
d15558bfa3 ci(macos): minimize log output from brew update
Also remove perl from brew install to prevent a warning that states it's
already installed.
2022-03-07 23:49:52 +01:00
Dundar Göc
242183585c ci: document the purpose of some non-obvious jobs 2022-03-07 14:18:11 +01:00
James McCoy
97ed3effff
ci(lint): re-add building of third-party 2022-02-27 09:07:11 -05:00
James McCoy
8d8288461a
ci(lint): use bundled luv until system packages are updated 2022-02-27 09:07:11 -05:00
Dundar Göc
80c3d042ed ci: add timeout to all jobs 2022-02-26 16:57:47 +01:00
James McCoy
005a7aa167
Merge pull request #17467 from dundargoc/ci/remove-failing-windows
ci: remove failing windows CI tests
2022-02-25 07:10:29 -05:00
James McCoy
73da7cef7b
Merge pull request #17390 from RenFraser/feature/packaging
ci: improve cpack packaging
2022-02-24 06:46:07 -05:00
Henry Fraser
087aad3dcd ci: improved cpack packaging
Addresses: #12571

- Added the following installers through CMake files:
    - Windows NSIS.
    - Windows MSI.
    - Windows zip.
    - MacOs tarball.
    - Linux tarball.
    - Linux Deb package.
- Tweaked pipeline CPack commands to build using new CMakeLists.txt configuration file.
- Added icons and relevant packaging files.
- Updated notes.md to reflect new installation instructions.

This isn't meant to be the perfect solution, it's simply a first pass at using a
simple packaging system to build Windows installers. A Debian package has also
been added since it's very easy but other packages have been left out due to
limiting the scope. Hopefully we can build further upon this and improve it
over time with code signing, better icons and more user-friendly installation
graphics and so on.
2022-02-24 19:54:44 +10:00
Dundar Göc
07a5a85323 ci: skip ci workflow on only documentation changes 2022-02-21 10:12:07 +01:00
James McCoy
4b3fb4b177
Merge pull request #17469 from jamessan/use-sysdeps-for-lint-ci
Use system dependencies for lint CI
2022-02-20 07:35:35 -05:00
Dundar Göc
4ea8201356 ci: remove success check since it's the default 2022-02-20 13:17:55 +01:00
James McCoy
921162a4b1 ci: bump Windows image to windows-2019
The VS 2019 CMake generator no longer has different generator types for
different architectures.  Now, the architecture is specified via CMake's
`-A` switch.  However, this requires we also propagate
`${CMAKE_GENERATOR_PLATFORM}` to the bundled deps, so they build for the
same architecture as Nvim.
2022-02-20 10:18:45 +01:00
James McCoy
0c4c384ed1
ci(lint): explicity build nvim
“make clint-full” bypasses the normal mechanisms used to communicate
build flags in the CI jobs, so explicitly build nvim before running the
lint jobs.
2022-02-19 20:35:05 -05:00
James McCoy
34cb26011e
ci(lint): build against system deps 2022-02-19 20:35:04 -05:00
James McCoy
8cd4c11494
ci(lint): install deps via apt instead of building from third-party 2022-02-19 20:35:04 -05:00
James McCoy
720bb5844d
Merge pull request #17445 from dundargoc/ci/review/use-checkout 2022-02-18 08:36:45 -05:00
James McCoy
ac480ef6b4
Merge pull request #17404 from dundargoc/ci/put-each-test-in-separate-step
ci: run each test suite in a separate github step
2022-02-18 06:42:32 -05:00
Dundar Göc
40473e55a2 ci(lint): simplify cache key 2022-02-18 11:50:51 +01:00
Dundar Göc
8b92d71b30 ci: run each test suite in a separate github step
This should help combat some of the lagginess when looking at the CI
logs in the browser.
2022-02-18 11:36:30 +01:00
Dundar Göc
1d0e38e42c ci: download reviews.js through checkout instead of wget
This makes testing the workflows much smoother.
2022-02-17 23:30:22 +01:00
Dundar Göc
58a55e3889 ci(lint): remove unnecessary steps 2022-02-17 22:38:54 +01:00
Dundar Göc
b877237612 ci(reviews): move reviews.js to .github/scripts 2022-02-17 14:48:14 +01:00
Dundar Göc
48108975c9 revert: "ci: run functionaltest-lua on drafts as well"
This reverts commit a91a5c1880.
2022-02-15 14:01:06 +01:00
Dundar Göc
5aed2e9f27 ci(labeler): disable sync that interferes with other jobs 2022-02-14 21:16:36 +01:00
zeertzjq
29eabbcd07 ci: use a separate script for request review workflow 2022-02-14 07:47:10 +08:00
zeertzjq
1be9549e6b ci: only request review on open non-draft PRs 2022-02-13 19:17:18 +08:00
James McCoy
e126fbc971
Merge pull request #17376 from dundargoc/ci/reviews/upgrade-to-v6
ci(reviews): upgrade github-script version to v6
2022-02-12 07:09:43 -05:00
Dundar Göc
f052e0bd11 ci(reviews): upgrade github-script version to v6 2022-02-12 11:20:00 +01:00
Dundar Göc
0c901baee1 revert: "ci: use continue-on-error instead of "|| true""
This reverts commit 559aa4179c.

I mistakenly believed both ways of writing were equivalent; this is
untrue. Setting continue-on-error to true will make the job pass, but
an error annotation will still be created which is misleading since it's
not actually an error.
2022-02-12 11:03:32 +01:00
Dundar Göc
e957697334 ci: fix reviews workflow by sending an artifact with PR number 2022-02-11 15:12:41 +01:00
Dundar Göc
b0bcbb08a9 ci: add reviewers if labels are manually added after PR creation 2022-02-10 18:06:36 +01:00
Dundar Göc
afac1b5d87 ci: add more reviewers based on label 2022-02-09 10:47:14 +01:00
Dundar Göc
79bacb0973 ci: add write permissions to add-reviewer job 2022-02-08 14:56:46 +01:00
Dundar Göc
fde169f328 ci: add reviewers based on label 2022-02-07 21:25:45 +01:00
James McCoy
707cc1a167
ci(commitlint): use lintcommit.lua from main repo
[skip ci]
2022-02-06 08:31:23 -05:00
zeertzjq
6eb8c0c0c8 ci: add intercept_tls_get_addr=0 to ASAN_OPTIONS 2022-01-27 23:16:33 +08:00
James McCoy
66076e5e1b
ci: create automated PRs as draft PRs
GH workflows aren't allowed to trigger other GH workflows.  Since
commitlint is a required check now, we need something manual to happen
for it to run on vim-patch/api-doc PRs.

Creating these PRs as drafts and then marking them as "ready to review"
when we want to merge them will provide the manual trigger to run
commitlint.

[skip ci]
2022-01-17 13:36:01 -05:00
James McCoy
8f54b88a5e
Merge pull request #17122 from dundargoc/ci/remove-non-working-job
ci: remove non-working add-reviewer job
2022-01-17 13:11:46 -05:00
Dundar Göc
6c1d6f3dd6 ci: remove non-working add-reviewer job 2022-01-17 18:48:08 +01:00
James McCoy
69b2dd175c
ci(api-docs): avoid running ci for doc commits 2022-01-17 12:21:16 -05:00
James McCoy
d7e2229b41
ci(commitlint): use pull_request_target to avoid "skip ci" 2022-01-17 12:21:09 -05:00
James McCoy
5bd7ae5b0f
ci(release): enable gh's api debug logs when creating the release
This is intended to help track down why the release is sporadically left
in draft state, rather than being published.

[skip ci]
2022-01-12 07:13:25 -05:00
Dundar Göc
f29a4ec553 ci: add a continue-on-error to the add-reviewer jobs
This is to circumvent a limitation in GitHub Actions that requires
special organization access in order to add any reviewers.
2022-01-09 19:57:25 +01:00
Dundar Göc
fd71162428 ci: add reviewer based on label
Also remove CODEOWNERS since this is a superior solution.
2022-01-09 11:30:05 +01:00
James McCoy
2e5bafa04c
Merge pull request #17000 from dundargoc/ci/use-continue-on-error
ci: use continue-on-error instead of "|| true"
2022-01-08 16:10:47 -05:00
Dundar Göc
559aa4179c ci: use continue-on-error instead of "|| true"
The intention is clearer and doesn't rely on shell-isms.
2022-01-08 15:31:14 +01:00
Dundar Göc
c2b9dea4ba ci: set CLANG_SANITIZER variable to TSAN when running the tsan job 2022-01-07 20:20:02 +01:00
Dundar Göc
df06c36932 ci: run type-scope job after the triage job
This should prevent the scenario of one job accidentally removing a
relevant label from the other.
2022-01-07 13:32:14 +01:00
dundargoc
0b0c4f7dfa
chore: fix typos (#16816)
Co-authored-by: Sean Dewar <seandewar@users.noreply.github.com>
Co-authored-by: Gregory Anders <greg@gpanders.com>
Co-authored-by: Sebastian Volland <seb@baunz.net>
Co-authored-by: Lewis Russell <lewis6991@gmail.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2022-01-04 11:07:40 -07:00
Dundar Göc
ec615abd1f ci: install flake8 with apt instead of pip 2022-01-03 21:54:23 +01:00
Dundar Göc
e71fbf2eb0 ci: remove unnecessary before_install script 2022-01-02 23:46:46 +01:00
James McCoy
b0993bdc45
Merge pull request #16853 from jamessan/clint-master-only
ci: run lint only on master branch
2022-01-02 14:07:01 -05:00
James McCoy
e5f7b61136
Merge pull request #16840 from zeertzjq/ci-clang-13
ci: bump clang version to 13 in asan and tsan
2022-01-01 11:43:38 -05:00
zeertzjq
6a932f68e6 ci: bump clang version to 13 in asan and tsan 2022-01-01 06:24:48 +08:00
James McCoy
35034da779
ci: run lint only on master branch
The list of known lint issues is only updated for the master branch, so
other branches report lots of false positive issues.
2021-12-31 12:09:23 -05:00
Dundar Göc
2a12e8ddfd ci: remove outdated brew workaround that isn't needed anymore 2021-12-31 13:09:01 +01:00
James McCoy
094c3f2b54
ci: cancel in-progress CI if a PR is updated
[skip ci]
2021-12-25 11:11:54 -05:00
Dundar Göc
89a844a9c7 ci: remove unused "squash typo" workflow 2021-12-20 23:47:04 +01:00
James McCoy
238da85126
Merge pull request #16524 from dundargoc/ci/optimize-brew
ci: remove "brew upgrade" from macos jobs
2021-12-09 21:15:07 -05:00
dundargoc
5b117bbc75
ci: install doxygen with conda instead of apt (#16517)
This provides a newer version of Doxygen (1.9.0 or later)
that fixes a bug in the documentation generator.

Closes #16498
2021-12-08 09:28:25 -07:00
Dundar Göc
c5af86b9b9 ci: remove "brew upgrade" from macos jobs
Packages are automatically upgraded on install. This will avoid
upgrading unrelated packages, cutting the macos job time to about a
half.
2021-12-04 23:44:52 +01:00
Dundar Göc
8cd1fa8945 ci: use tag v2 when using checkout action
Using v2 automatically fetches the latest minor patch for v2, meaning
free bug fixes without needing to manually update the tag version.
2021-12-04 13:24:46 +01:00
James McCoy
50c8cc3020
fix(ci/backport): check for event_name == "pull_request_target"
[skip ci]
2021-11-30 22:20:32 -05:00