From 4ea5e63aa8c866b4fcc9d10f1a26078d2517f96a Mon Sep 17 00:00:00 2001 From: Björn Linse Date: Sun, 9 Jun 2019 13:26:48 +0200 Subject: tree-sitter: add basic testing on ci build tree-sitter c parser on ci for testing purposes --- ci/build.ps1 | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'ci/build.ps1') diff --git a/ci/build.ps1 b/ci/build.ps1 index d533d7b4e0..4e1a69376b 100644 --- a/ci/build.ps1 +++ b/ci/build.ps1 @@ -94,6 +94,28 @@ npm.cmd install -g neovim Get-Command -CommandType Application neovim-node-host.cmd npm.cmd link neovim +#npm.cmd install -g tree-sitter-cli +#npm.cmd link tree-sitter-cli + +mkdir c:\treesitter +$env:TREE_SITTER_DIR = "c:\treesitter" +#$env:PATH = "c:\treesitter;$env:PATH" +$client = new-object System.Net.WebClient +cd c:\treesitter + +if ($bits -eq 32) { + $client.DownloadFile("https://github.com/tree-sitter/tree-sitter/releases/download/0.15.5/tree-sitter-windows-x86.gz","c:\treesitter\tree-sitter-cli.gz") +} +elseif ($bits -eq 64) { + $client.DownloadFile("https://github.com/tree-sitter/tree-sitter/releases/download/0.15.5/tree-sitter-windows-x64.gz","c:\treesitter\tree-sitter-cli.gz") +} +python -c "import gzip, shutil; f1,f2 = gzip.open('tree-sitter-cli.gz', 'rb'), open('tree-sitter.exe', 'wb'); shutil.copyfileobj(f1, f2); f2.close()" + +$client.DownloadFile("https://codeload.github.com/tree-sitter/tree-sitter-c/zip/v0.15.2","c:\treesitter\tree_sitter_c.zip") +Expand-Archive c:\treesitter\tree_sitter_c.zip -DestinationPath c:\treesitter\ +cd c:\treesitter\tree-sitter-c-0.15.2 +c:\treesitter\tree-sitter.exe test + function convertToCmakeArgs($vars) { return $vars.GetEnumerator() | foreach { "-D$($_.Key)=$($_.Value)" } } -- cgit From 7a3602378fafc426dcefc3b94f75467d4df12d24 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Fri, 4 Oct 2019 16:23:48 +0200 Subject: ci: upgrade tree-sitter from 0.15.2 to 0.15.9 tree-sitter-c is still at 0.15.2 though. --- ci/build.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ci/build.ps1') diff --git a/ci/build.ps1 b/ci/build.ps1 index 4e1a69376b..0a533e9d07 100644 --- a/ci/build.ps1 +++ b/ci/build.ps1 @@ -104,10 +104,10 @@ $client = new-object System.Net.WebClient cd c:\treesitter if ($bits -eq 32) { - $client.DownloadFile("https://github.com/tree-sitter/tree-sitter/releases/download/0.15.5/tree-sitter-windows-x86.gz","c:\treesitter\tree-sitter-cli.gz") + $client.DownloadFile("https://github.com/tree-sitter/tree-sitter/releases/download/0.15.9/tree-sitter-windows-x86.gz","c:\treesitter\tree-sitter-cli.gz") } elseif ($bits -eq 64) { - $client.DownloadFile("https://github.com/tree-sitter/tree-sitter/releases/download/0.15.5/tree-sitter-windows-x64.gz","c:\treesitter\tree-sitter-cli.gz") + $client.DownloadFile("https://github.com/tree-sitter/tree-sitter/releases/download/0.15.9/tree-sitter-windows-x64.gz","c:\treesitter\tree-sitter-cli.gz") } python -c "import gzip, shutil; f1,f2 = gzip.open('tree-sitter-cli.gz', 'rb'), open('tree-sitter.exe', 'wb'); shutil.copyfileobj(f1, f2); f2.close()" -- cgit From e9b420dba5119536558f659d598546176d77070e Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Fri, 4 Oct 2019 16:26:26 +0200 Subject: lint --- ci/build.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ci/build.ps1') diff --git a/ci/build.ps1 b/ci/build.ps1 index 0a533e9d07..07da6c4e19 100644 --- a/ci/build.ps1 +++ b/ci/build.ps1 @@ -104,12 +104,12 @@ $client = new-object System.Net.WebClient cd c:\treesitter if ($bits -eq 32) { - $client.DownloadFile("https://github.com/tree-sitter/tree-sitter/releases/download/0.15.9/tree-sitter-windows-x86.gz","c:\treesitter\tree-sitter-cli.gz") + $client.DownloadFile("https://github.com/tree-sitter/tree-sitter/releases/download/0.15.9/tree-sitter-windows-x86.gz", "c:\treesitter\tree-sitter-cli.gz") } elseif ($bits -eq 64) { - $client.DownloadFile("https://github.com/tree-sitter/tree-sitter/releases/download/0.15.9/tree-sitter-windows-x64.gz","c:\treesitter\tree-sitter-cli.gz") + $client.DownloadFile("https://github.com/tree-sitter/tree-sitter/releases/download/0.15.9/tree-sitter-windows-x64.gz", "c:\treesitter\tree-sitter-cli.gz") } -python -c "import gzip, shutil; f1,f2 = gzip.open('tree-sitter-cli.gz', 'rb'), open('tree-sitter.exe', 'wb'); shutil.copyfileobj(f1, f2); f2.close()" +python -c "import gzip, shutil; f1,f2 = gzip.open('tree-sitter-cli.gz', 'rb'), open('tree-sitter.exe', 'wb'); shutil.copyfileobj(f1, f2); f2.close()" $client.DownloadFile("https://codeload.github.com/tree-sitter/tree-sitter-c/zip/v0.15.2","c:\treesitter\tree_sitter_c.zip") Expand-Archive c:\treesitter\tree_sitter_c.zip -DestinationPath c:\treesitter\ -- cgit From db9f68f98d9cebf372c83a9c512499e8388c884a Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Wed, 9 Oct 2019 03:07:42 +0200 Subject: ci: AppVeyor: coverage for Lua (Windows) (#10426) --- ci/build.ps1 | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'ci/build.ps1') diff --git a/ci/build.ps1 b/ci/build.ps1 index 07da6c4e19..6d91b97aed 100644 --- a/ci/build.ps1 +++ b/ci/build.ps1 @@ -46,6 +46,10 @@ if ($compiler -eq 'MINGW') { $nvimCmakeVars['USE_GCOV'] = 'ON' $uploadToCodecov = $true $env:GCOV = "C:\msys64\mingw$bits\bin\gcov" + + # Setup/build Lua coverage. + $env:USE_LUACOV = 1 + $env:BUSTED_ARGS = "--coverage" } # These are native MinGW builds, but they use the toolchain inside # MSYS2, this allows using all the dependencies and tools available @@ -135,6 +139,10 @@ cmake --build . --config $cmakeBuildType -- $cmakeGeneratorArgs ; exitIfFailed # Ensure that the "win32" feature is set. .\bin\nvim -u NONE --headless -c 'exe !has(\"win32\").\"cq\"' ; exitIfFailed +if ($env:USE_LUACOV -eq 1) { + & $env:DEPS_PREFIX\luarocks\luarocks.bat install cluacov +} + # Functional tests # The $LastExitCode from MSBuild can't be trusted $failed = $false @@ -143,18 +151,17 @@ Set-PSDebug -Off cmake --build . --config $cmakeBuildType --target functionaltest -- $cmakeGeneratorArgs 2>&1 | foreach { $failed = $failed -or $_ -match 'functional tests failed with error'; $_ } -if ($failed) { - if ($uploadToCodecov) { - bash -l /c/projects/neovim/ci/common/submit_coverage.sh functionaltest - } - exit $LastExitCode -} -Set-PSDebug -Strict -Trace 1 - if ($uploadToCodecov) { + if ($env:USE_LUACOV -eq 1) { + & $env:DEPS_PREFIX\bin\luacov.bat + } bash -l /c/projects/neovim/ci/common/submit_coverage.sh functionaltest } +if ($failed) { + exit $LastExitCode +} +Set-PSDebug -Strict -Trace 1 # Old tests # Add MSYS to path, required for e.g. `find` used in test scripts. -- cgit From 9b22b69454de45d37ae0bd5ebbefa8538d36197f Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Tue, 22 Oct 2019 20:28:56 -0400 Subject: CI/Appveyor: set powershell strict mode Set-PSDebug produces too much noise and has global scope. Strict mode is scoped to the script context and catches errors. --- ci/build.ps1 | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'ci/build.ps1') diff --git a/ci/build.ps1 b/ci/build.ps1 index 6d91b97aed..8f7fdd5f59 100644 --- a/ci/build.ps1 +++ b/ci/build.ps1 @@ -1,10 +1,10 @@ +Set-StrictMode -Version Latest $ErrorActionPreference = 'stop' -Set-PSDebug -Strict -Trace 1 $isPullRequest = ($env:APPVEYOR_PULL_REQUEST_HEAD_COMMIT -ne $null) $env:CONFIGURATION -match '^(?\w+)_(?32|64)(?:-(?