colcon / colcon-cmake

Extension for colcon to support CMake packages
http://colcon.readthedocs.io
Apache License 2.0
16 stars 25 forks source link

use msbuild -version, not %VisualStudioVersion% #92

Closed rotu closed 3 years ago

rotu commented 3 years ago

When building on Windows, instead of using %VisualStudioVersion%, use msbuild -version

This is intended to make colcon-cmake more friendly to Github actions. The microsoft/setup-msbuild action does not populate %VisualStudioVersion%, so colcon-cmake crashes on that platform.

Here is a workflow demonstrating the issue and the proposed fix:

https://github.com/rotu/ros2-ci/actions/runs/233271645/workflow

rotu commented 3 years ago

FYI, the stuff in test.py and __init__.py was changed because the linter complained about it. I can revert those changes but it will make the tests fail locally for me

(.venv) C:\Users\dan\Documents\colcon-ws>pip list
Package               Version Location
--------------------- ------- -------------------------------------------------------
astroid               2.4.2
atomicwrites          1.4.0
attrs                 20.1.0
colcon-bash           0.4.2   c:\users\dan\documents\colcon-ws\.venv\src\colcon-bash
colcon-cmake          0.2.25  c:\users\dan\documents\colcon-ws\.venv\src\colcon-cmake
colcon-core           0.6.0   c:\users\dan\documents\colcon-ws\.venv\src\colcon-core
colcon-library-path   0.2.1
colcon-test-result    0.3.8
colorama              0.4.3
coloredlogs           14.0
coverage              5.2.1
distlib               0.3.1
empy                  3.3.4
flake8                3.8.3
flake8-blind-except   0.1.1
flake8-builtins       1.5.3
flake8-class-newline  1.6.0
flake8-comprehensions 3.2.3
flake8-deprecated     1.3
flake8-docstrings     1.5.0
flake8-import-order   0.18.1
flake8-polyfill       1.0.2
flake8-quotes         3.2.0
humanfriendly         8.2
iniconfig             1.0.1
isort                 5.4.2
lazy-object-proxy     1.5.1
mccabe                0.6.1
mock                  4.0.2
more-itertools        8.4.0
packaging             20.4
pep8-naming           0.11.1
pip                   20.2.2
pluggy                0.13.1
py                    1.9.0
pycodestyle           2.6.0
pydocstyle            5.1.0
pyflakes              2.2.0
pylint                2.6.0
pyparsing             2.4.7
pyreadline            2.1
pytest                6.0.1
pytest-cov            2.10.1
pytest-repeat         0.8.0
pytest-rerunfailures  9.1
scspell3k             2.2
setuptools            49.6.0
dirk-thomas commented 3 years ago

Please add a description why this change is being proposed in the first place.

rotu commented 3 years ago

Please add a description why this change is being proposed in the first place.

done

dirk-thomas commented 3 years ago

@rotu Friendly ping.

dirk-thomas commented 3 years ago

@rotu Friendly ping.

dirk-thomas commented 3 years ago

Closing due to no response.