Github workflow - Cannot run compiler 'cl'
-
Hello. I'm setting up a qt project with a github workflow. I'm using
jurplel/install-qt-action@v2
to configure qt. Sadly, running qmake results in the following error (on windows-latest):Project ERROR: Cannot run compiler 'cl'. Output: =================== =================== Maybe you forgot to setup the environment?
I already figured out that it's because cl is not added to the PATH. Is there an easy way to do that?
microsoft/setup-msbuild@v1.1
doesn't work because it only adds msbuild.exe to the PATH. -
You need to setup environment so the msvc compiler and linker can be found. Normally this is done by running
vcvars64.bat
(orvcvars32.bat
for 32 bit builds) script provided by Visual Studio installation.
I've never used github actions, but this seems to do just that: Visual Studio shell -
Qt Creator is being built on GitHub Actions, see https://github.com/qt-creator/qt-creator/blob/master/.github/workflows/build_cmake.yml
It might be a bit verbose, but it does its job.
-
@Chris-Kawa
thank you. That works