File tree Expand file tree Collapse file tree 1 file changed +19
-4
lines changed Expand file tree Collapse file tree 1 file changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -35,11 +35,26 @@ jobs:
35
35
python-version : 2.7
36
36
architecture : x64
37
37
38
- - name : Setup Developer Command Prompt (on Windows)
39
- uses : ilammy/msvc-dev-cmd@v1
38
+ # Cannot use https://github.com/ilammy/msvc-dev-cmd/blob/a742a854f54111d83b78e97091b5d85ccdaa3e89/index.js#L163
39
+ # as (unapproved) 3rd party GitHub Actions are forbidden on Apache org projects
40
+
41
+ # https://github.com/microsoft/vswhere
42
+ # https://github.com/microsoft/vswhere/blob/c7a417bfb46cd6a1c3e31a91ba51193d7659b6f8/src/vswhere.lib/vswhere.lib.rc#L77
43
+ # https://github.com/microsoft/vswhere/wiki/Start-Developer-Command-Prompt#using-powershell
44
+ # https://renenyffenegger.ch/notes/Windows/dirs/Program-Files-x86/Microsoft-Visual-Studio/version/edition/Common7/Tools/VsDevCmd_bat
45
+ # https://renenyffenegger.ch/notes/Windows/dirs/Program-Files-x86/Microsoft-Visual-Studio/version/edition/VC/Auxiliary/Build/vcvarsall_bat
46
+ - name : Setup Developer Command Prompt environment (on Windows)
40
47
if : runner.os == 'Windows'
41
- with :
42
- arch : x64
48
+ run : |
49
+ $installationPath = vswhere.exe -prerelease -latest -property installationPath
50
+ if ($installationPath -and (test-path "$installationPath\Common7\Tools\vsdevcmd.bat")) {
51
+ & "${env:COMSPEC}" /s /c "`"$installationPath\Common7\Tools\vsdevcmd.bat`" -no_logo -arch=x64 && set" | foreach-object {
52
+ $name, $value = $_ -split '=', 2
53
+ # https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-environment-variable
54
+ Add-Content ${env:GITHUB_ENV} "${name}=${value}"
55
+ }
56
+ }
57
+ shell : pwsh
43
58
44
59
# it's weird that it needs qpid-python for tests; one would guess this is built in this repo, but it is not
45
60
- name : Install python dependencies
You can’t perform that action at this time.
0 commit comments