diff options
author | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2023-04-23 16:35:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-23 16:35:49 +0200 |
commit | 943ac2be55b7fcb6bf7fd9c80fd22bd4867b672f (patch) | |
tree | 17a1bce9a9f544f3bfdc6501d90903fc0bda51c0 | |
parent | e3f36377c156749bbdafc46d8a8cd017f378b4b5 (diff) | |
download | rneovim-943ac2be55b7fcb6bf7fd9c80fd22bd4867b672f.tar.gz rneovim-943ac2be55b7fcb6bf7fd9c80fd22bd4867b672f.tar.bz2 rneovim-943ac2be55b7fcb6bf7fd9c80fd22bd4867b672f.zip |
ci: reuse script to enable Developer Command Prompt
-rw-r--r-- | .github/scripts/env.ps1 | 9 | ||||
-rw-r--r-- | .github/workflows/release.yml | 10 | ||||
-rw-r--r-- | .github/workflows/test.yml | 12 |
3 files changed, 11 insertions, 20 deletions
diff --git a/.github/scripts/env.ps1 b/.github/scripts/env.ps1 new file mode 100644 index 0000000000..d1dba5d558 --- /dev/null +++ b/.github/scripts/env.ps1 @@ -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 + } +} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 90702dc0a6..ebf5df7aac 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -102,15 +102,7 @@ jobs: - uses: actions/checkout@v3 with: fetch-depth: 0 - - 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 - } - } + - run: .github/scripts/env.ps1 - name: Build deps run: | cmake -S cmake.deps -B .deps -G Ninja -DCMAKE_BUILD_TYPE='RelWithDebInfo' diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5f8e445f36..c58582157f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -295,18 +295,8 @@ jobs: name: windows steps: - uses: actions/checkout@v3 - - uses: ./.github/actions/cache - - - 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 - } - } + - run: .github/scripts/env.ps1 - name: Build deps run: | |