Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: test this action when "vswhere" does not exist #49

Open
pzhlkj6612 opened this issue Oct 6, 2021 · 8 comments
Open

CI: test this action when "vswhere" does not exist #49

pzhlkj6612 opened this issue Oct 6, 2021 · 8 comments

Comments

@pzhlkj6612
Copy link
Contributor

We have some code to find "vcvarsall.bat" manually when "vswhere" does not exist:

msvc-dev-cmd/index.js

Lines 33 to 44 in f456b80

// If that does not work, try the standard installation locations,
// starting with the latest and moving to the oldest.
for (const ver of VERSIONS) {
for (const ed of EDITIONS) {
path = `${PROGRAM_FILES_X86}\\Microsoft Visual Studio\\${ver}\\${ed}\\VC\\Auxiliary\\Build\\vcvarsall.bat`
core.info(`Trying standard location: ${path}`)
if (fs.existsSync(path)) {
core.info(`Found standard location: ${path}`)
return path
}
}
}

However, the test in the current main.yml doesn't cover this case.

I think we should test this action more exhaustively.

@albinahlback
Copy link

I run into this issue now.

@pzhlkj6612
Copy link
Contributor Author

Hi, @albinahlback !

I run into this issue now.

What issue did you encounter? I think it would be better if you post your workflow conf, CI logs and more details in a new issue. This issue is not for solving users' problems, though.

@albinahlback
Copy link

The CI I just started ran into this issue. See it here.

The workflow configuration can be seen here.

@pzhlkj6612
Copy link
Contributor Author

@albinahlback

      - name: "Setup MSVC"
        uses: ilammy/[email protected]
        with:
          arch: x86_64
          toolset: 14.37.32822
          vsversion: 17.6.0
  with:
    arch: x86_64
    toolset: 14.37.32822
    vsversion: 17.6.0
  env:
    ACTIONS_CACHE_URL: https://acghubeus1.actions.githubusercontent.com/4zQcPMsKhvhGvybvpAQ5Qla8U4fvNh2IwCWQWVQQRZcqfksgNm/
    ACTIONS_RUNTIME_TOKEN: ***
Not found with vswhere
Trying standard location: C:\Program Files (x86)\Microsoft Visual Studio\17.6.0\Enterprise\VC\Auxiliary\Build\vcvarsall.bat
Trying standard location: C:\Program Files (x86)\Microsoft Visual Studio\17.6.0\Professional\VC\Auxiliary\Build\vcvarsall.bat
Trying standard location: C:\Program Files (x86)\Microsoft Visual Studio\17.6.0\Community\VC\Auxiliary\Build\vcvarsall.bat
Trying standard location: C:\Program Files (x86)\Microsoft Visual Studio\17.6.0\BuildTools\VC\Auxiliary\Build\vcvarsall.bat
Trying standard location: C:\Program Files\Microsoft Visual Studio\17.6.0\Enterprise\VC\Auxiliary\Build\vcvarsall.bat
Trying standard location: C:\Program Files\Microsoft Visual Studio\17.6.0\Professional\VC\Auxiliary\Build\vcvarsall.bat
Trying standard location: C:\Program Files\Microsoft Visual Studio\17.6.0\Community\VC\Auxiliary\Build\vcvarsall.bat
Trying standard location: C:\Program Files\Microsoft Visual Studio\17.6.0\BuildTools\VC\Auxiliary\Build\vcvarsall.bat
Not found in standard locations
Not found in VS 2015 location: C:\Program Files (x86)\Microsoft Visual C++ Build Tools\vcbuildtools.bat

Why specified vsversion? There is only one VS in the runner.

@albinahlback
Copy link

Oh, I didn't think of that, thanks! The README doesn't really state which versions it picks for toolset and vsversion. Perhaps add that to the README?

@pzhlkj6612
Copy link
Contributor Author

Perhaps add that to the README?

Done, see #77 .

@pzhlkj6612
Copy link
Contributor Author

Hi @albinahlback, the README has been updated.

@albinahlback
Copy link

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants