mirror of
https://github.com/neovim/neovim.git
synced 2025-11-21 17:46:30 +00:00
Merge #11275 from janlazo/ci/nodejs
ci/nodejs: use node v10, prefer shell builtins in ci scripts
This commit is contained in:
@@ -24,7 +24,7 @@ matrix:
|
|||||||
fast_finish: true
|
fast_finish: true
|
||||||
install: []
|
install: []
|
||||||
before_build:
|
before_build:
|
||||||
- ps: Install-Product node 8
|
- ps: Install-Product node 10
|
||||||
build_script:
|
build_script:
|
||||||
- powershell ci\build.ps1
|
- powershell ci\build.ps1
|
||||||
after_build:
|
after_build:
|
||||||
|
|||||||
@@ -47,8 +47,8 @@ if [[ "${TRAVIS_OS_NAME}" == osx ]] || [ ! -f ~/.nvm/nvm.sh ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
source ~/.nvm/nvm.sh
|
source ~/.nvm/nvm.sh
|
||||||
nvm install --lts
|
nvm install 10
|
||||||
nvm use --lts
|
nvm use 10
|
||||||
|
|
||||||
if [[ -n "$CMAKE_URL" ]]; then
|
if [[ -n "$CMAKE_URL" ]]; then
|
||||||
echo "Installing custom CMake: $CMAKE_URL"
|
echo "Installing custom CMake: $CMAKE_URL"
|
||||||
|
|||||||
41
ci/build.ps1
41
ci/build.ps1
@@ -1,10 +1,11 @@
|
|||||||
$ErrorActionPreference = 'stop'
|
Set-StrictMode -Version Latest
|
||||||
Set-PSDebug -Strict -Trace 1
|
$ErrorActionPreference = 'Stop'
|
||||||
|
$ProgressPreference = 'SilentlyContinue'
|
||||||
|
|
||||||
$isPullRequest = ($env:APPVEYOR_PULL_REQUEST_HEAD_COMMIT -ne $null)
|
$isPullRequest = ($env:APPVEYOR_PULL_REQUEST_HEAD_COMMIT -ne $null)
|
||||||
$env:CONFIGURATION -match '^(?<compiler>\w+)_(?<bits>32|64)(?:-(?<option>\w+))?$'
|
$env:CONFIGURATION -match '^(?<compiler>\w+)_(?<bits>32|64)(?:-(?<option>\w+))?$'
|
||||||
$compiler = $Matches.compiler
|
$compiler = $Matches.compiler
|
||||||
$compileOption = $Matches.option
|
$compileOption = if ($Matches -contains 'option') {$Matches.option} else {''}
|
||||||
$bits = $Matches.bits
|
$bits = $Matches.bits
|
||||||
$cmakeBuildType = $(if ($env:CMAKE_BUILD_TYPE -ne $null) {$env:CMAKE_BUILD_TYPE} else {'RelWithDebInfo'});
|
$cmakeBuildType = $(if ($env:CMAKE_BUILD_TYPE -ne $null) {$env:CMAKE_BUILD_TYPE} else {'RelWithDebInfo'});
|
||||||
$buildDir = [System.IO.Path]::GetFullPath("$(pwd)")
|
$buildDir = [System.IO.Path]::GetFullPath("$(pwd)")
|
||||||
@@ -23,7 +24,6 @@ $uploadToCodeCov = $false
|
|||||||
|
|
||||||
function exitIfFailed() {
|
function exitIfFailed() {
|
||||||
if ($LastExitCode -ne 0) {
|
if ($LastExitCode -ne 0) {
|
||||||
Set-PSDebug -Off
|
|
||||||
exit $LastExitCode
|
exit $LastExitCode
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -98,27 +98,21 @@ npm.cmd install -g neovim
|
|||||||
Get-Command -CommandType Application neovim-node-host.cmd
|
Get-Command -CommandType Application neovim-node-host.cmd
|
||||||
npm.cmd link neovim
|
npm.cmd link neovim
|
||||||
|
|
||||||
#npm.cmd install -g tree-sitter-cli
|
|
||||||
#npm.cmd link tree-sitter-cli
|
|
||||||
|
|
||||||
mkdir c:\treesitter
|
$env:TREE_SITTER_DIR = $env:USERPROFILE + "\tree-sitter-build"
|
||||||
$env:TREE_SITTER_DIR = "c:\treesitter"
|
mkdir "$env:TREE_SITTER_DIR\bin"
|
||||||
#$env:PATH = "c:\treesitter;$env:PATH"
|
|
||||||
$client = new-object System.Net.WebClient
|
|
||||||
cd c:\treesitter
|
|
||||||
|
|
||||||
if ($bits -eq 32) {
|
$xbits = if ($bits -eq '32') {'x86'} else {'x64'}
|
||||||
$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")
|
Invoke-WebRequest -UseBasicParsing -Uri "https://github.com/tree-sitter/tree-sitter/releases/download/0.15.9/tree-sitter-windows-$xbits.gz" -OutFile tree-sitter.exe.gz
|
||||||
|
C:\msys64\usr\bin\gzip -d tree-sitter.exe.gz
|
||||||
|
|
||||||
|
Invoke-WebRequest -UseBasicParsing -Uri "https://codeload.github.com/tree-sitter/tree-sitter-c/zip/v0.15.2" -OutFile tree_sitter_c.zip
|
||||||
|
Expand-Archive .\tree_sitter_c.zip -DestinationPath .
|
||||||
|
cd tree-sitter-c-0.15.2
|
||||||
|
..\tree-sitter.exe test
|
||||||
|
if (-Not (Test-Path -PathType Leaf "$env:TREE_SITTER_DIR\bin\c.dll")) {
|
||||||
|
exit 1
|
||||||
}
|
}
|
||||||
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")
|
|
||||||
}
|
|
||||||
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) {
|
function convertToCmakeArgs($vars) {
|
||||||
return $vars.GetEnumerator() | foreach { "-D$($_.Key)=$($_.Value)" }
|
return $vars.GetEnumerator() | foreach { "-D$($_.Key)=$($_.Value)" }
|
||||||
@@ -146,8 +140,6 @@ if ($env:USE_LUACOV -eq 1) {
|
|||||||
# Functional tests
|
# Functional tests
|
||||||
# The $LastExitCode from MSBuild can't be trusted
|
# The $LastExitCode from MSBuild can't be trusted
|
||||||
$failed = $false
|
$failed = $false
|
||||||
# Temporarily turn off tracing to reduce log file output
|
|
||||||
Set-PSDebug -Off
|
|
||||||
cmake --build . --config $cmakeBuildType --target functionaltest -- $cmakeGeneratorArgs 2>&1 |
|
cmake --build . --config $cmakeBuildType --target functionaltest -- $cmakeGeneratorArgs 2>&1 |
|
||||||
foreach { $failed = $failed -or
|
foreach { $failed = $failed -or
|
||||||
$_ -match 'functional tests failed with error'; $_ }
|
$_ -match 'functional tests failed with error'; $_ }
|
||||||
@@ -161,7 +153,6 @@ if ($uploadToCodecov) {
|
|||||||
if ($failed) {
|
if ($failed) {
|
||||||
exit $LastExitCode
|
exit $LastExitCode
|
||||||
}
|
}
|
||||||
Set-PSDebug -Strict -Trace 1
|
|
||||||
|
|
||||||
# Old tests
|
# Old tests
|
||||||
# Add MSYS to path, required for e.g. `find` used in test scripts.
|
# Add MSYS to path, required for e.g. `find` used in test scripts.
|
||||||
|
|||||||
@@ -31,7 +31,6 @@ echo "Install tree-sitter npm package"
|
|||||||
# https://github.com/tree-sitter/tree-sitter/commit/e14e285a1087264a8c74a7c62fcaecc49db9d904
|
# https://github.com/tree-sitter/tree-sitter/commit/e14e285a1087264a8c74a7c62fcaecc49db9d904
|
||||||
# If queries added to tree-sitter-c, we can use latest tree-sitter-cli
|
# If queries added to tree-sitter-c, we can use latest tree-sitter-cli
|
||||||
npm install -g tree-sitter-cli@v0.15.9
|
npm install -g tree-sitter-cli@v0.15.9
|
||||||
npm link tree-sitter-cli
|
|
||||||
|
|
||||||
echo "Install tree-sitter c parser"
|
echo "Install tree-sitter c parser"
|
||||||
curl "https://codeload.github.com/tree-sitter/tree-sitter-c/tar.gz/v0.15.2" -o tree_sitter_c.tar.gz
|
curl "https://codeload.github.com/tree-sitter/tree-sitter-c/tar.gz/v0.15.2" -o tree_sitter_c.tar.gz
|
||||||
@@ -48,3 +47,4 @@ else
|
|||||||
cd src/
|
cd src/
|
||||||
gcc -m32 -o "$TREE_SITTER_DIR/bin/c.so" -shared parser.c -I.
|
gcc -m32 -o "$TREE_SITTER_DIR/bin/c.so" -shared parser.c -I.
|
||||||
fi
|
fi
|
||||||
|
test -f "$TREE_SITTER_DIR/bin/c.so"
|
||||||
|
|||||||
Reference in New Issue
Block a user