Commit Graph

215 Commits

Author SHA1 Message Date
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