mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 11:28:22 +00:00
GHA: fix build problems on Windows
This commit is contained in:
15
.github/workflows/ci_windows.yml
vendored
15
.github/workflows/ci_windows.yml
vendored
@@ -10,7 +10,7 @@ env:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: windows-latest
|
runs-on: windows-2016
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
config: [ MINGW_64-gcov, MINGW_32, MSVC_64, MSVC_32 ]
|
config: [ MINGW_64-gcov, MINGW_32, MSVC_64, MSVC_32 ]
|
||||||
@@ -23,6 +23,19 @@ jobs:
|
|||||||
path: C:\projects\nvim-deps
|
path: C:\projects\nvim-deps
|
||||||
key: ${{ matrix.config }}-${{ hashFiles('third-party\**') }}
|
key: ${{ matrix.config }}-${{ hashFiles('third-party\**') }}
|
||||||
|
|
||||||
|
- uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
pyhon-version: '2.7'
|
||||||
|
|
||||||
|
- uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
pyhon-version: '3.5'
|
||||||
|
|
||||||
|
|
||||||
|
- uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: '12.x'
|
||||||
|
|
||||||
- name: Run CI
|
- name: Run CI
|
||||||
run: powershell ci\build.ps1
|
run: powershell ci\build.ps1
|
||||||
env:
|
env:
|
||||||
|
36
ci/build.ps1
36
ci/build.ps1
@@ -28,27 +28,9 @@ function exitIfFailed() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# https://github.com/lukesampson/scoop#installation
|
|
||||||
$scoop = (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh')
|
|
||||||
& {
|
|
||||||
Set-StrictMode -Off
|
|
||||||
Invoke-Expression $scoop
|
|
||||||
}
|
|
||||||
|
|
||||||
# scoop install perl@5.30.3.1
|
|
||||||
# perl --version
|
|
||||||
# cpanm.bat --version
|
|
||||||
|
|
||||||
if (-not $NoTests) {
|
if (-not $NoTests) {
|
||||||
scoop install nodejs-lts
|
|
||||||
node --version
|
node --version
|
||||||
npm.cmd --version
|
npm.cmd --version
|
||||||
|
|
||||||
# cpanm.bat -n Neovim::Ext
|
|
||||||
# if ($LastExitCode -ne 0) {
|
|
||||||
# Get-Content -Path "$env:USERPROFILE\.cpanm\build.log"
|
|
||||||
# }
|
|
||||||
# perl -W -e 'use Neovim::Ext; print $Neovim::Ext::VERSION'; exitIfFailed
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (-Not (Test-Path -PathType container $env:DEPS_BUILD_DIR)) {
|
if (-Not (Test-Path -PathType container $env:DEPS_BUILD_DIR)) {
|
||||||
@@ -90,14 +72,7 @@ if ($compiler -eq 'MINGW') {
|
|||||||
& C:\msys64\usr\bin\mkdir -p /var/cache/pacman/pkg
|
& C:\msys64\usr\bin\mkdir -p /var/cache/pacman/pkg
|
||||||
|
|
||||||
# Build third-party dependencies
|
# Build third-party dependencies
|
||||||
C:\msys64\usr\bin\bash -lc "curl -O http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz" ; exitIfFailed
|
C:\msys64\usr\bin\bash -lc "pacman --verbose --noconfirm -Su" ; exitIfFailed
|
||||||
C:\msys64\usr\bin\bash -lc "curl -O http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz.sig" ; exitIfFailed
|
|
||||||
C:\msys64\usr\bin\bash -lc "pacman-key --verify msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz.sig" ; exitIfFailed
|
|
||||||
C:\msys64\usr\bin\bash -lc "pacman --verbose --noconfirm -U msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz" ; exitIfFailed
|
|
||||||
# If there are still processes using msys-2.0.dll, after the base system update is finished, it will wait for input from the user.
|
|
||||||
# To prevent this, we will terminate all processes that use msys-2.0.dll.
|
|
||||||
Get-Process | Where-Object { $_.path -like 'C:\msys64*' } | Stop-Process
|
|
||||||
C:\msys64\usr\bin\bash -lc "pacman --verbose --noconfirm -Syu" ; exitIfFailed
|
|
||||||
C:\msys64\usr\bin\bash -lc "pacman --verbose --noconfirm --needed -S $mingwPackages" ; exitIfFailed
|
C:\msys64\usr\bin\bash -lc "pacman --verbose --noconfirm --needed -S $mingwPackages" ; exitIfFailed
|
||||||
}
|
}
|
||||||
elseif ($compiler -eq 'MSVC') {
|
elseif ($compiler -eq 'MSVC') {
|
||||||
@@ -113,16 +88,15 @@ elseif ($compiler -eq 'MSVC') {
|
|||||||
if (-not $NoTests) {
|
if (-not $NoTests) {
|
||||||
# Setup python (use AppVeyor system python)
|
# Setup python (use AppVeyor system python)
|
||||||
|
|
||||||
C:\Python27\python.exe -m pip install pynvim ; exitIfFailed
|
C:\hostedtoolcache\windows\Python\2.7.18\x64\python.exe -m pip install pynvim ; exitIfFailed
|
||||||
C:\Python35\python.exe -m pip install pynvim ; exitIfFailed
|
C:\hostedtoolcache\windows\Python\3.5.4\x64\python.exe -m pip install pynvim ; exitIfFailed
|
||||||
# Disambiguate python3
|
# Disambiguate python3
|
||||||
move c:\Python35\python.exe c:\Python35\python3.exe
|
move C:\hostedtoolcache\windows\Python\3.5.4\x64\python.exe C:\hostedtoolcache\windows\Python\3.5.4\x64\python3.exe
|
||||||
$env:PATH = "C:\Python35;C:\Python27;$env:PATH"
|
$env:PATH = "C:\hostedtoolcache\windows\Python\3.5.4\x64;C:\hostedtoolcache\windows\Python\2.7.18\x64;$env:PATH"
|
||||||
# Sanity check
|
# Sanity check
|
||||||
python -c "import pynvim; print(str(pynvim))" ; exitIfFailed
|
python -c "import pynvim; print(str(pynvim))" ; exitIfFailed
|
||||||
python3 -c "import pynvim; print(str(pynvim))" ; exitIfFailed
|
python3 -c "import pynvim; print(str(pynvim))" ; exitIfFailed
|
||||||
|
|
||||||
$env:PATH = "C:\Ruby24\bin;$env:PATH"
|
|
||||||
gem.cmd install --pre neovim
|
gem.cmd install --pre neovim
|
||||||
Get-Command -CommandType Application neovim-ruby-host.bat
|
Get-Command -CommandType Application neovim-ruby-host.bat
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user