From 9706ee59d0e2143d40d40b9e01cd63f8a17a09ab Mon Sep 17 00:00:00 2001 From: dundargoc Date: Fri, 8 Dec 2023 10:41:11 +0100 Subject: ci: bump actions/labeler from 4 to 5 --- .github/scripts/labeler_configuration.yml | 71 +++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 .github/scripts/labeler_configuration.yml (limited to '.github/scripts') diff --git a/.github/scripts/labeler_configuration.yml b/.github/scripts/labeler_configuration.yml new file mode 100644 index 0000000000..3db8444fde --- /dev/null +++ b/.github/scripts/labeler_configuration.yml @@ -0,0 +1,71 @@ +lsp: + - changed-files: + - any-glob-to-any-file: [ runtime/lua/vim/lsp.lua, runtime/lua/vim/lsp/* ] + +tui: + - changed-files: + - any-glob-to-any-file: [ src/nvim/tui/tui.* ] + +treesitter: + - changed-files: + - any-glob-to-any-file: [ src/nvim/lua/treesitter.*, runtime/lua/vim/treesitter.lua, runtime/lua/vim/treesitter/*, runtime/queries/**/* ] + +diagnostic: + - changed-files: + - any-glob-to-any-file: [ runtime/lua/vim/diagnostic.lua ] + +dependencies: + - changed-files: + - any-glob-to-any-file: [ cmake.deps/**/* ] + +spell: + - changed-files: + - any-glob-to-any-file: [ src/nvim/spell* ] + +terminal: + - changed-files: + - any-glob-to-any-file: [ src/nvim/terminal.* ] + +column: + - changed-files: + - any-glob-to-any-file: [ src/nvim/sign* ] + +folds: + - changed-files: + - any-glob-to-any-file: [ src/nvim/fold* ] + +mouse: + - changed-files: + - any-glob-to-any-file: [ src/nvim/mouse* ] + +documentation: + - changed-files: + - any-glob-to-all-files: [ runtime/doc/*, "**/*.md" ] + +clipboard: + - changed-files: + - any-glob-to-any-file: [ runtime/autoload/provider/clipboard.vim ] + +diff: + - changed-files: + - any-glob-to-any-file: [ src/nvim/diff.* ] + +build: + - changed-files: + - any-glob-to-any-file: [ CMakeLists.txt, "**/CMakeLists.txt", "**/Makefile", "**/*.cmake" ] + +test: + - changed-files: + - any-glob-to-all-files: [test/**/*] + +ci: + - changed-files: + - any-glob-to-any-file: [ .github/actions/**, .github/workflows/**, .github/scripts/** ] + +filetype: + - changed-files: + - any-glob-to-any-file: [ runtime/lua/vim/filetype.lua, runtime/lua/vim/filetype/detect.lua ] + +platform:nix: + - changed-files: + - any-glob-to-any-file: [ contrib/flake.lock, contrib/flake.nix ] -- cgit From dd81e1e3345b91c4cb4653b697c1054526f6b924 Mon Sep 17 00:00:00 2001 From: dundargoc Date: Sun, 12 Nov 2023 21:40:24 +0100 Subject: 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. --- .github/scripts/remove-reviewers.js | 16 ----- .github/scripts/reviewers_add.js | 118 ++++++++++++++++++++++++++++++++++++ .github/scripts/reviewers_remove.js | 16 +++++ .github/scripts/reviews.js | 118 ------------------------------------ 4 files changed, 134 insertions(+), 134 deletions(-) delete mode 100644 .github/scripts/remove-reviewers.js create mode 100644 .github/scripts/reviewers_add.js create mode 100644 .github/scripts/reviewers_remove.js delete mode 100644 .github/scripts/reviews.js (limited to '.github/scripts') diff --git a/.github/scripts/remove-reviewers.js b/.github/scripts/remove-reviewers.js deleted file mode 100644 index 9e44e4ac86..0000000000 --- a/.github/scripts/remove-reviewers.js +++ /dev/null @@ -1,16 +0,0 @@ -module.exports = async ({ github, context }) => { - const requestedReviewers = await github.rest.pulls.listRequestedReviewers({ - owner: context.repo.owner, - repo: context.repo.repo, - pull_number: context.issue.number, - }); - - const reviewers = requestedReviewers.data.users.map((e) => e.login); - - github.rest.pulls.removeRequestedReviewers({ - owner: context.repo.owner, - repo: context.repo.repo, - pull_number: context.issue.number, - reviewers: reviewers, - }); -}; diff --git a/.github/scripts/reviewers_add.js b/.github/scripts/reviewers_add.js new file mode 100644 index 0000000000..d28d91c2f6 --- /dev/null +++ b/.github/scripts/reviewers_add.js @@ -0,0 +1,118 @@ +module.exports = async ({ github, context }) => { + const pr_data = await github.rest.pulls.get({ + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: context.issue.number, + }); + const labels = pr_data.data.labels.map((e) => e.name); + const reviewers = new Set(); + + if (labels.includes("api")) { + reviewers.add("bfredl"); + reviewers.add("famiu"); + } + + if (labels.includes("build")) { + reviewers.add("dundargoc"); + reviewers.add("jamessan"); + reviewers.add("justinmk"); + } + + if (labels.includes("ci")) { + reviewers.add("dundargoc"); + reviewers.add("jamessan"); + reviewers.add("justinmk"); + } + + if (labels.includes("column")) { + reviewers.add("lewis6991"); + } + + if (labels.includes("dependencies")) { + reviewers.add("jamessan"); + } + + if (labels.includes("diagnostic")) { + reviewers.add("gpanders"); + } + + if (labels.includes("diff")) { + reviewers.add("lewis6991"); + } + + if (labels.includes("distribution")) { + reviewers.add("jamessan"); + } + + if (labels.includes("documentation")) { + reviewers.add("clason"); + } + + if (labels.includes("extmarks")) { + reviewers.add("bfredl"); + } + + if (labels.includes("filetype")) { + reviewers.add("clason"); + reviewers.add("gpanders"); + reviewers.add("smjonas"); + } + + if (labels.includes("lsp")) { + reviewers.add("folke"); + reviewers.add("MariaSolOs"); + reviewers.add("mfussenegger"); + } + + if (labels.includes("options")) { + reviewers.add("famiu"); + } + + if (labels.includes("platform:nix")) { + reviewers.add("teto"); + } + + if (labels.includes("project-management")) { + reviewers.add("bfredl"); + reviewers.add("justinmk"); + } + + if (labels.includes("statusline")) { + reviewers.add("famiu"); + } + + if (labels.includes("test")) { + reviewers.add("justinmk"); + } + + if (labels.includes("treesitter")) { + reviewers.add("bfredl"); + reviewers.add("clason"); + reviewers.add("lewis6991"); + } + + if (labels.includes("typo")) { + reviewers.add("dundargoc"); + } + + if (labels.includes("ui")) { + reviewers.add("bfredl"); + reviewers.add("famiu"); + } + + if (labels.includes("vim-patch")) { + reviewers.add("seandewar"); + reviewers.add("zeertzjq"); + } + + // Remove person that opened the PR since they can't review themselves + const pr_opener = pr_data.data.user.login; + reviewers.delete(pr_opener); + + github.rest.pulls.requestReviewers({ + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: context.issue.number, + reviewers: Array.from(reviewers), + }); +}; diff --git a/.github/scripts/reviewers_remove.js b/.github/scripts/reviewers_remove.js new file mode 100644 index 0000000000..9e44e4ac86 --- /dev/null +++ b/.github/scripts/reviewers_remove.js @@ -0,0 +1,16 @@ +module.exports = async ({ github, context }) => { + const requestedReviewers = await github.rest.pulls.listRequestedReviewers({ + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: context.issue.number, + }); + + const reviewers = requestedReviewers.data.users.map((e) => e.login); + + github.rest.pulls.removeRequestedReviewers({ + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: context.issue.number, + reviewers: reviewers, + }); +}; diff --git a/.github/scripts/reviews.js b/.github/scripts/reviews.js deleted file mode 100644 index d28d91c2f6..0000000000 --- a/.github/scripts/reviews.js +++ /dev/null @@ -1,118 +0,0 @@ -module.exports = async ({ github, context }) => { - const pr_data = await github.rest.pulls.get({ - owner: context.repo.owner, - repo: context.repo.repo, - pull_number: context.issue.number, - }); - const labels = pr_data.data.labels.map((e) => e.name); - const reviewers = new Set(); - - if (labels.includes("api")) { - reviewers.add("bfredl"); - reviewers.add("famiu"); - } - - if (labels.includes("build")) { - reviewers.add("dundargoc"); - reviewers.add("jamessan"); - reviewers.add("justinmk"); - } - - if (labels.includes("ci")) { - reviewers.add("dundargoc"); - reviewers.add("jamessan"); - reviewers.add("justinmk"); - } - - if (labels.includes("column")) { - reviewers.add("lewis6991"); - } - - if (labels.includes("dependencies")) { - reviewers.add("jamessan"); - } - - if (labels.includes("diagnostic")) { - reviewers.add("gpanders"); - } - - if (labels.includes("diff")) { - reviewers.add("lewis6991"); - } - - if (labels.includes("distribution")) { - reviewers.add("jamessan"); - } - - if (labels.includes("documentation")) { - reviewers.add("clason"); - } - - if (labels.includes("extmarks")) { - reviewers.add("bfredl"); - } - - if (labels.includes("filetype")) { - reviewers.add("clason"); - reviewers.add("gpanders"); - reviewers.add("smjonas"); - } - - if (labels.includes("lsp")) { - reviewers.add("folke"); - reviewers.add("MariaSolOs"); - reviewers.add("mfussenegger"); - } - - if (labels.includes("options")) { - reviewers.add("famiu"); - } - - if (labels.includes("platform:nix")) { - reviewers.add("teto"); - } - - if (labels.includes("project-management")) { - reviewers.add("bfredl"); - reviewers.add("justinmk"); - } - - if (labels.includes("statusline")) { - reviewers.add("famiu"); - } - - if (labels.includes("test")) { - reviewers.add("justinmk"); - } - - if (labels.includes("treesitter")) { - reviewers.add("bfredl"); - reviewers.add("clason"); - reviewers.add("lewis6991"); - } - - if (labels.includes("typo")) { - reviewers.add("dundargoc"); - } - - if (labels.includes("ui")) { - reviewers.add("bfredl"); - reviewers.add("famiu"); - } - - if (labels.includes("vim-patch")) { - reviewers.add("seandewar"); - reviewers.add("zeertzjq"); - } - - // Remove person that opened the PR since they can't review themselves - const pr_opener = pr_data.data.user.login; - reviewers.delete(pr_opener); - - github.rest.pulls.requestReviewers({ - owner: context.repo.owner, - repo: context.repo.repo, - pull_number: context.issue.number, - reviewers: Array.from(reviewers), - }); -}; -- cgit From 36552adb39edff2d909743f16c1f061bc74b5c4e Mon Sep 17 00:00:00 2001 From: Gregory Anders <8965202+gpanders@users.noreply.github.com> Date: Wed, 13 Dec 2023 20:06:59 -0600 Subject: ci: add gpanders as reviewer for defaults and tui labels (#26567) --- .github/scripts/reviewers_add.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to '.github/scripts') diff --git a/.github/scripts/reviewers_add.js b/.github/scripts/reviewers_add.js index d28d91c2f6..c6a878ec8e 100644 --- a/.github/scripts/reviewers_add.js +++ b/.github/scripts/reviewers_add.js @@ -28,6 +28,10 @@ module.exports = async ({ github, context }) => { reviewers.add("lewis6991"); } + if (labels.includes("defaults")) { + reviewers.add("gpanders"); + } + if (labels.includes("dependencies")) { reviewers.add("jamessan"); } @@ -91,6 +95,10 @@ module.exports = async ({ github, context }) => { reviewers.add("lewis6991"); } + if (labels.includes("tui")) { + reviewers.add("gpanders"); + } + if (labels.includes("typo")) { reviewers.add("dundargoc"); } -- cgit From 0f22ea400ce5319a1e74eda41505fd9cfb788e35 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Tue, 26 Dec 2023 22:46:10 +0100 Subject: ci: disable libintl on mac release The releases doesn't work on intel mac as libintl isn't available on the system by default. This makes `:language` not work for the shipped macos releases, though the reduction in build system complexity most likely outweighs that. --- .github/scripts/build_universal_macos.sh | 1 + 1 file changed, 1 insertion(+) (limited to '.github/scripts') diff --git a/.github/scripts/build_universal_macos.sh b/.github/scripts/build_universal_macos.sh index d07c395cd6..432a275d6d 100755 --- a/.github/scripts/build_universal_macos.sh +++ b/.github/scripts/build_universal_macos.sh @@ -12,6 +12,7 @@ cmake -B build -G Ninja \ -D CMAKE_BUILD_TYPE=${NVIM_BUILD_TYPE} \ -D CMAKE_OSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} \ -D CMAKE_OSX_ARCHITECTURES=arm64\;x86_64 \ + -D ENABLE_LIBINTL=OFF \ -D CMAKE_FIND_FRAMEWORK=NEVER cmake --build build # Make sure we build everything for M1 as well -- cgit From 6a4c4fa198f7fdb256c8d1013bae55da4f443993 Mon Sep 17 00:00:00 2001 From: Jongwook Choi Date: Mon, 15 Jan 2024 21:45:41 -0500 Subject: ci: stale bot should close the issue with "not planned" Problem: When the stable bot automatically closes an issue, the issue will be marked as "closed as completed". It'd be better to mark the as "closed as not planned". Solution: Use `state_reason: "not_planned"` from the issues REST API. References (REST API): https://docs.github.com/en/rest/issues/issues?apiVersion=2022-11-28#update-an-issue --- .github/scripts/close_unresponsive.js | 1 + 1 file changed, 1 insertion(+) (limited to '.github/scripts') diff --git a/.github/scripts/close_unresponsive.js b/.github/scripts/close_unresponsive.js index f0e8bbe93e..b16c19b653 100644 --- a/.github/scripts/close_unresponsive.js +++ b/.github/scripts/close_unresponsive.js @@ -41,6 +41,7 @@ module.exports = async ({ github, context }) => { owner: owner, repo: repo, issue_number: number, + state_reason: "not_planned", state: "closed", }); -- cgit From 4c91194611086916c833d61e28e2f5e689316e83 Mon Sep 17 00:00:00 2001 From: dundargoc Date: Sat, 27 Jan 2024 19:10:41 +0100 Subject: 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. --- .github/scripts/build_universal_macos.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '.github/scripts') diff --git a/.github/scripts/build_universal_macos.sh b/.github/scripts/build_universal_macos.sh index 432a275d6d..49de6e2b96 100755 --- a/.github/scripts/build_universal_macos.sh +++ b/.github/scripts/build_universal_macos.sh @@ -3,13 +3,13 @@ MACOSX_DEPLOYMENT_TARGET="$(sw_vers -productVersion | cut -f1 -d.)" export MACOSX_DEPLOYMENT_TARGET cmake -S cmake.deps -B .deps -G Ninja \ - -D CMAKE_BUILD_TYPE=${NVIM_BUILD_TYPE} \ + -D CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} \ -D CMAKE_OSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} \ -D CMAKE_OSX_ARCHITECTURES=arm64\;x86_64 \ -D CMAKE_FIND_FRAMEWORK=NEVER cmake --build .deps cmake -B build -G Ninja \ - -D CMAKE_BUILD_TYPE=${NVIM_BUILD_TYPE} \ + -D CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} \ -D CMAKE_OSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} \ -D CMAKE_OSX_ARCHITECTURES=arm64\;x86_64 \ -D ENABLE_LIBINTL=OFF \ -- cgit From 01c15a30c0ab56e14342f9996bea3ad86a68a343 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Sat, 17 Feb 2024 13:35:47 +0100 Subject: 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. --- .github/scripts/build_universal_macos.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/scripts') diff --git a/.github/scripts/build_universal_macos.sh b/.github/scripts/build_universal_macos.sh index 49de6e2b96..aeda93ee03 100755 --- a/.github/scripts/build_universal_macos.sh +++ b/.github/scripts/build_universal_macos.sh @@ -1,6 +1,6 @@ #!/bin/bash -e -MACOSX_DEPLOYMENT_TARGET="$(sw_vers -productVersion | cut -f1 -d.)" +MACOSX_DEPLOYMENT_TARGET=11.0 export MACOSX_DEPLOYMENT_TARGET cmake -S cmake.deps -B .deps -G Ninja \ -D CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} \ -- cgit From 4ff3217bbd8747d2d44680a825ac29097faf9c4b Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Wed, 7 Feb 2024 11:28:35 +0000 Subject: 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. --- .github/scripts/install_deps.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '.github/scripts') diff --git a/.github/scripts/install_deps.sh b/.github/scripts/install_deps.sh index 9a782e9698..ad81e053f9 100755 --- a/.github/scripts/install_deps.sh +++ b/.github/scripts/install_deps.sh @@ -30,12 +30,12 @@ if [[ $os == Linux ]]; then fi if [[ -n $TEST ]]; then - sudo apt-get install -y locales-all cpanminus attr libattr1-dev gdb + sudo apt-get install -y locales-all cpanminus attr libattr1-dev gdb fswatch fi elif [[ $os == Darwin ]]; then brew update --quiet brew install ninja if [[ -n $TEST ]]; then - brew install cpanminus + brew install cpanminus fswatch fi fi -- cgit