ilammy / msvc-dev-cmd

GitHub Action to setup Developer Command Prompt for Microsoft Visual C++
MIT License
329 stars 44 forks source link

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

Open pzhlkj6612 opened 2 years ago

pzhlkj6612 commented 2 years ago

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

https://github.com/ilammy/msvc-dev-cmd/blob/f456b805b3f63911738cb71d4f255e4e129c7e7a/index.js#L33-L44

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

I think we should test this action more exhaustively.

albinahlback commented 5 months ago

I run into this issue now.

pzhlkj6612 commented 5 months ago

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 commented 5 months ago

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

The workflow configuration can be seen here.

pzhlkj6612 commented 5 months ago

@albinahlback

      - name: "Setup MSVC"
        uses: ilammy/msvc-dev-cmd@v1.13.0
        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 commented 5 months ago

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 commented 4 months ago

Perhaps add that to the README?

Done, see #77 .

pzhlkj6612 commented 3 months ago

Hi @albinahlback, the README has been updated.

albinahlback commented 3 months ago

Thanks!