aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/release.yml12
-rwxr-xr-xscripts/release.sh15
-rw-r--r--test/functional/treesitter/parser_spec.lua24
3 files changed, 20 insertions, 31 deletions
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index ff7562bf20..c6d3eaf42b 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -28,10 +28,14 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install -y autoconf automake build-essential cmake gcc-11 gettext gperf libtool-bin locales ninja-build pkg-config unzip
+ - if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name != 'nightly')
+ run: printf 'NVIM_BUILD_TYPE=Release\n' >> $GITHUB_ENV
+ - if: github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name == 'nightly')
+ run: printf 'NVIM_BUILD_TYPE=RelWithDebInfo\n' >> $GITHUB_ENV
- name: Build release
id: build
run: |
- CC=gcc-11 make CMAKE_BUILD_TYPE=RelWithDebInfo CMAKE_EXTRA_FLAGS="-DCMAKE_INSTALL_PREFIX:PATH="
+ CC=gcc-11 make CMAKE_BUILD_TYPE=${NVIM_BUILD_TYPE} CMAKE_EXTRA_FLAGS="-DCMAKE_INSTALL_PREFIX:PATH="
printf '::set-output name=version::%s\n' "$(./build/bin/nvim --version | head -n 3 | sed -z 's/\n/%0A/g')"
printf '::set-output name=release::%s\n' "$(./build/bin/nvim --version | head -n 1)"
make DESTDIR="$GITHUB_WORKSPACE/build/release/nvim-linux64" install
@@ -80,9 +84,13 @@ jobs:
brew update >/dev/null
brew upgrade
brew install automake ninja
+ - if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name != 'nightly')
+ run: printf 'NVIM_BUILD_TYPE=Release\n' >> $GITHUB_ENV
+ - if: github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name == 'nightly')
+ run: printf 'NVIM_BUILD_TYPE=RelWithDebInfo\n' >> $GITHUB_ENV
- name: Build release
run: |
- make CMAKE_BUILD_TYPE=Release CMAKE_EXTRA_FLAGS="-DCMAKE_INSTALL_PREFIX:PATH= -DCMAKE_OSX_DEPLOYMENT_TARGET=10.11"
+ make CMAKE_BUILD_TYPE=${NVIM_BUILD_TYPE} CMAKE_EXTRA_FLAGS="-DCMAKE_INSTALL_PREFIX:PATH= -DCMAKE_OSX_DEPLOYMENT_TARGET=10.11"
make DESTDIR="$GITHUB_WORKSPACE/build/release/nvim-osx64" install
- name: Create package
run: |
diff --git a/scripts/release.sh b/scripts/release.sh
index 4d1484b77a..4ec959d697 100755
--- a/scripts/release.sh
+++ b/scripts/release.sh
@@ -12,6 +12,7 @@
# - CMakeLists.txt: Unset NVIM_VERSION_PRERELEASE
# - CMakeLists.txt: Unset NVIM_API_PRERELEASE
# - Create test/functional/fixtures/api_level_N.mpack
+# - Add date and version to runtime/nvim.appdata.xml
# - Tag the commit.
# Create the "version bump" commit:
# - CMakeLists.txt: Set NVIM_VERSION_PRERELEASE to "-dev"
@@ -62,6 +63,10 @@ _do_release_commit() {
git add test/functional/fixtures/api_level_$__API_LEVEL.mpack
fi
+ $__sed -i.bk 's,(<releases>),\1\
+ <release date="'"${__DATE}"'" version="'"${__VERSION}"'"/>,' runtime/nvim.appdata.xml
+ git add runtime/nvim.appdata.xml
+
if ! test "$ARG1" = '--use-current-commit' ; then
echo "Building changelog since ${__LAST_TAG}..."
@@ -75,14 +80,12 @@ _do_release_commit() {
_do_bump_commit() {
$__sed -i.bk 's/(NVIM_VERSION_PRERELEASE) ""/\1 "-dev"/' CMakeLists.txt
$__sed -i.bk 's/set\((NVIM_VERSION_PATCH) [[:digit:]]/set(\1 ?/' CMakeLists.txt
- $__sed -i.bk 's,(<releases>),\1\
- <release date="'"${__DATE}"'" version="xxx"/>,' runtime/nvim.appdata.xml
rm CMakeLists.txt.bk
rm runtime/nvim.appdata.xml.bk
nvim +'/NVIM_VERSION' +1new +'exe "norm! iUpdate version numbers!!!"' \
- -O CMakeLists.txt runtime/nvim.appdata.xml
+ -O CMakeLists.txt
- git add CMakeLists.txt runtime/nvim.appdata.xml
+ git add CMakeLists.txt
git commit -m "$__BUMP_MSG"
}
@@ -92,11 +95,7 @@ fi
_do_bump_commit
echo "
Next steps:
- - Update runtime/nvim.appdata.xml on _master_
- Run tests/CI (version_spec.lua)!
- Push the tag:
git push --follow-tags
- - Update the 'stable' tag:
- git push --force upstream HEAD^:refs/tags/stable
- git fetch --tags
- Update website: index.html"
diff --git a/test/functional/treesitter/parser_spec.lua b/test/functional/treesitter/parser_spec.lua
index d2f9148e8f..8d132ca965 100644
--- a/test/functional/treesitter/parser_spec.lua
+++ b/test/functional/treesitter/parser_spec.lua
@@ -10,9 +10,11 @@ local pending_c_parser = helpers.pending_c_parser
before_each(clear)
describe('treesitter parser API', function()
+ clear()
+ if pending_c_parser(pending) then return end
it('parses buffer', function()
- if helpers.pending_win32(pending) or pending_c_parser(pending) then return end
+ if helpers.pending_win32(pending) then return end
insert([[
int main() {
@@ -103,8 +105,6 @@ void ui_refresh(void)
}]]
it('allows to iterate over nodes children', function()
- if pending_c_parser(pending) then return end
-
insert(test_text);
local res = exec_lua([[
@@ -127,8 +127,6 @@ void ui_refresh(void)
end)
it('allows to get a child by field', function()
- if pending_c_parser(pending) then return end
-
insert(test_text);
local res = exec_lua([[
@@ -162,8 +160,6 @@ void ui_refresh(void)
]]
it("supports runtime queries", function()
- if pending_c_parser(pending) then return end
-
local ret = exec_lua [[
return require"vim.treesitter.query".get_query("c", "highlights").captures[1]
]]
@@ -172,8 +168,6 @@ void ui_refresh(void)
end)
it('support query and iter by capture', function()
- if pending_c_parser(pending) then return end
-
insert(test_text)
local res = exec_lua([[
@@ -203,8 +197,6 @@ void ui_refresh(void)
end)
it('support query and iter by match', function()
- if pending_c_parser(pending) then return end
-
insert(test_text)
local res = exec_lua([[
@@ -236,8 +228,6 @@ void ui_refresh(void)
end)
it('can match special regex characters like \\ * + ( with `vim-match?`', function()
- if pending_c_parser(pending) then return end
-
insert('char* astring = "\\n"; (1 + 1) * 2 != 2;')
local res = exec_lua([[
@@ -271,8 +261,6 @@ void ui_refresh(void)
end)
it('supports builtin query predicate any-of?', function()
- if pending_c_parser(pending) then return end
-
insert([[
#include <stdio.h>
@@ -330,8 +318,6 @@ void ui_refresh(void)
end)
it('allow loading query with escaped quotes and capture them with `lua-match?` and `vim-match?`', function()
- if pending_c_parser(pending) then return end
-
insert('char* astring = "Hello World!";')
local res = exec_lua([[
@@ -407,8 +393,6 @@ void ui_refresh(void)
it('allows to set simple ranges', function()
- if pending_c_parser(pending) then return end
-
insert(test_text)
local res = exec_lua [[
@@ -450,8 +434,6 @@ void ui_refresh(void)
eq(range_tbl, { { { 0, 0, 0, 17, 1, 508 } } })
end)
it("allows to set complex ranges", function()
- if pending_c_parser() then return end
-
insert(test_text)
local res = exec_lua [[