ci: setup GitHub actions for windows
This commit is contained in:
parent
c3b9c35876
commit
d7051705d0
|
@ -0,0 +1,39 @@
|
|||
name: Run Windows CI
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
env:
|
||||
DEPS_BUILD_DIR: "C:/projects/nvim-deps"
|
||||
DEPS_PREFIX: "C:/projects/nvim-deps/usr"
|
||||
# Silence/redirect errors due to missing locking support (via libgcov).
|
||||
# GCOV_ERROR_FILE: "$(TEMP)/libgcov-errors.log"
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: windows-latest
|
||||
strategy:
|
||||
matrix:
|
||||
config: [ MINGW_64-gcov, MINGW_32, MSVC_64, MSVC_32 ]
|
||||
name: Build and test
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- uses: actions/cache@v2
|
||||
with:
|
||||
path: C:\projects\nvim-deps
|
||||
key: ${{ matrix.config }}-${{ hashFiles('third-party\**') }}
|
||||
|
||||
- name: Run CI
|
||||
run: powershell ci\build.ps1
|
||||
env:
|
||||
CONFIGURATION: ${{ matrix.config }}
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: builds
|
||||
if-no-files-found: ignore
|
||||
# These files will be zipped (making Neovim.zip double zipped)
|
||||
path: |
|
||||
build\Neovim.zip
|
||||
build\bin\nvim.exe
|
18
ci/build.ps1
18
ci/build.ps1
|
@ -3,7 +3,6 @@ Set-StrictMode -Version Latest
|
|||
$ErrorActionPreference = 'Stop'
|
||||
$ProgressPreference = 'SilentlyContinue'
|
||||
|
||||
$isPullRequest = ($env:APPVEYOR_PULL_REQUEST_HEAD_COMMIT -ne $null)
|
||||
$env:CONFIGURATION -match '^(?<compiler>\w+)_(?<bits>32|64)(?:-(?<option>\w+))?$'
|
||||
$compiler = $Matches.compiler
|
||||
$compileOption = if ($Matches -contains 'option') {$Matches.option} else {''}
|
||||
|
@ -36,20 +35,20 @@ $scoop = (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh'
|
|||
Invoke-Expression $scoop
|
||||
}
|
||||
|
||||
scoop install perl
|
||||
perl --version
|
||||
cpanm.bat --version
|
||||
# scoop install perl@5.30.3.1
|
||||
# perl --version
|
||||
# cpanm.bat --version
|
||||
|
||||
if (-not $NoTests) {
|
||||
scoop install nodejs-lts
|
||||
node --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
|
||||
# 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)) {
|
||||
|
@ -113,6 +112,7 @@ elseif ($compiler -eq 'MSVC') {
|
|||
|
||||
if (-not $NoTests) {
|
||||
# Setup python (use AppVeyor system python)
|
||||
|
||||
C:\Python27\python.exe -m pip install pynvim ; exitIfFailed
|
||||
C:\Python35\python.exe -m pip install pynvim ; exitIfFailed
|
||||
# Disambiguate python3
|
||||
|
|
Loading…
Reference in New Issue