mirror of
https://github.com/neovim/neovim.git
synced 2024-12-19 10:45:16 -07:00
ci: reuse script to enable Developer Command Prompt
This commit is contained in:
parent
e3f36377c1
commit
943ac2be55
9
.github/scripts/env.ps1
vendored
Normal file
9
.github/scripts/env.ps1
vendored
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
# This script enables Developer Command Prompt
|
||||||
|
# See https://github.com/microsoft/vswhere/wiki/Start-Developer-Command-Prompt#using-powershell
|
||||||
|
$installationPath = vswhere.exe -latest -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath
|
||||||
|
if ($installationPath -and (Test-Path "$installationPath\Common7\Tools\vsdevcmd.bat")) {
|
||||||
|
& "${env:COMSPEC}" /s /c "`"$installationPath\Common7\Tools\vsdevcmd.bat`" -arch=x64 -no_logo && set" | ForEach-Object {
|
||||||
|
$name, $value = $_ -split '=', 2
|
||||||
|
"$name=$value" >> $env:GITHUB_ENV
|
||||||
|
}
|
||||||
|
}
|
10
.github/workflows/release.yml
vendored
10
.github/workflows/release.yml
vendored
@ -102,15 +102,7 @@ jobs:
|
|||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Set env
|
- run: .github/scripts/env.ps1
|
||||||
run: |
|
|
||||||
$installationPath = vswhere.exe -latest -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath
|
|
||||||
if ($installationPath -and (Test-Path "$installationPath\Common7\Tools\vsdevcmd.bat")) {
|
|
||||||
& "${env:COMSPEC}" /s /c "`"$installationPath\Common7\Tools\vsdevcmd.bat`" -arch=x64 -no_logo && set" | ForEach-Object {
|
|
||||||
$name, $value = $_ -split '=', 2
|
|
||||||
"$name=$value" >> $env:GITHUB_ENV
|
|
||||||
}
|
|
||||||
}
|
|
||||||
- name: Build deps
|
- name: Build deps
|
||||||
run: |
|
run: |
|
||||||
cmake -S cmake.deps -B .deps -G Ninja -DCMAKE_BUILD_TYPE='RelWithDebInfo'
|
cmake -S cmake.deps -B .deps -G Ninja -DCMAKE_BUILD_TYPE='RelWithDebInfo'
|
||||||
|
12
.github/workflows/test.yml
vendored
12
.github/workflows/test.yml
vendored
@ -295,18 +295,8 @@ jobs:
|
|||||||
name: windows
|
name: windows
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- uses: ./.github/actions/cache
|
- uses: ./.github/actions/cache
|
||||||
|
- run: .github/scripts/env.ps1
|
||||||
- name: Set env
|
|
||||||
run: |
|
|
||||||
$installationPath = vswhere.exe -latest -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath
|
|
||||||
if ($installationPath -and (Test-Path "$installationPath\Common7\Tools\vsdevcmd.bat")) {
|
|
||||||
& "${env:COMSPEC}" /s /c "`"$installationPath\Common7\Tools\vsdevcmd.bat`" -arch=x64 -no_logo && set" | ForEach-Object {
|
|
||||||
$name, $value = $_ -split '=', 2
|
|
||||||
"$name=$value" >> $env:GITHUB_ENV
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
- name: Build deps
|
- name: Build deps
|
||||||
run: |
|
run: |
|
||||||
|
Loading…
Reference in New Issue
Block a user