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

Fix Windows Build Functionality #712

Merged
merged 13 commits into from
Feb 3, 2022

Conversation

wmmc88
Copy link
Contributor

@wmmc88 wmmc88 commented Sep 29, 2021

  • run in cmd instead of bash
  • disable colcon-lcov result
  • use --merge-install as suggessted in ros2 docs
  • disable colcon-test on windows

Windows Test and Test-Coverage functionality will be addressed in a future pr

Signed-off-by: Melvin Wang melvin.mc.wang@gmail.com

* run in cmd instead of bash
* disable colcon-lcov result
* use --merge-install as suggessted in ros2 docs

Signed-off-by: Melvin Wang <melvin.mc.wang@gmail.com>
@aprotyas
Copy link

@wmmc88 thanks for working on this! Do you have a map of TODOs for this? I just wanted to gauge how far along the draft was.. no rush though, just curious!

@wmmc88
Copy link
Contributor Author

wmmc88 commented Nov 15, 2021

@wmmc88 thanks for working on this! Do you have a map of TODOs for this? I just wanted to gauge how far along the draft was.. no rush though, just curious!

Its been a long while since I looked at this but I think that after I fixed commands running in bash and disabled colcon-lcov result, it got further in the pipeline, but still failed at colcon test. IIRC the issue was that action-setup-ros and action-ros-ci was always using python3.7 so the colcon test command would fail.

@wmmc88
Copy link
Contributor Author

wmmc88 commented Nov 15, 2021

Actually I think it might have also been that the windows runners by default have some other python version installed and the because of the way the path was setup, colcon test was trying to use the wrong python version so the command would fail with some uninformative error or smth...

IIRC, if you just comment the test step, the rest of the pipeline works fine... so the only thing left should be fixing the test step (which probs involves some changes to both action-ros-ci and action-setup-ros). I'll see if I can maybe pick this back up later this week.

@emersonknapp
Copy link
Contributor

I would also be inclined to move forward with an incremental update "it builds on windows now, but the test doesn't run right", which is better than the current situation of "can't do anything on windows"

Signed-off-by: Melvin Wang <melvin.mc.wang@gmail.com>
@wmmc88 wmmc88 marked this pull request as ready for review November 16, 2021 23:51
@wmmc88 wmmc88 requested a review from a team as a code owner November 16, 2021 23:51
@wmmc88 wmmc88 requested review from MichaelOrlov and prajakta-gokhale and removed request for a team November 16, 2021 23:51
@wmmc88 wmmc88 changed the title Fix Windows Functionality Fix Windows Build Functionality Nov 16, 2021
Signed-off-by: Melvin Wang <melvin.mc.wang@gmail.com>
@wmmc88 wmmc88 marked this pull request as draft November 17, 2021 19:04
Signed-off-by: Melvin Wang <melvin.mc.wang@gmail.com>
Signed-off-by: Melvin Wang <melvin.mc.wang@gmail.com>
Signed-off-by: Melvin Wang <melvin.mc.wang@gmail.com>
Signed-off-by: Melvin Wang <melvin.mc.wang@gmail.com>
Signed-off-by: Melvin Wang <melvin.mc.wang@gmail.com>
Signed-off-by: Melvin Wang <melvin.mc.wang@gmail.com>
@wmmc88 wmmc88 marked this pull request as ready for review November 17, 2021 23:43
@wmmc88
Copy link
Contributor Author

wmmc88 commented Nov 17, 2021

Can a maintainer approve builds? Builds are now all passing on my forked repo

@christophebedard
Copy link
Member

Can a maintainer approve builds? Builds are now all passing on my forked repo

done!

@codecov
Copy link

codecov bot commented Nov 17, 2021

Codecov Report

Merging #712 (9d1d44f) into master (c8ee1c9) will increase coverage by 1.23%.
The diff coverage is 30.30%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #712      +/-   ##
==========================================
+ Coverage   48.38%   49.61%   +1.23%     
==========================================
  Files           2        2              
  Lines         248      262      +14     
  Branches       58       68      +10     
==========================================
+ Hits          120      130      +10     
- Misses        128      132       +4     
Impacted Files Coverage Δ
src/action-ros-ci.ts 43.34% <30.30%> (+1.79%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c8ee1c9...9d1d44f. Read the comment docs.

@wmmc88
Copy link
Contributor Author

wmmc88 commented Nov 18, 2021

Have the mac-os tests had spurious failures before? In my fork, the action passes, but it seems to be failing in this pr due to osrf_testing_tools_cpp failing to build. Maybe something to do with a mac runner having wrong deps or smth?

wmmc88#1

@christophebedard
Copy link
Member

Have the mac-os tests had spurious failures before?

not from what I remember. I re-triggered the CI jobs twice and they keep failing. From past experience, I don't think our clang macOS setup is quite right, or at least it's not exactly the same as the ROS 2 macOS CI, which might be lagging behind IIRC.

Can you try re-triggering CI on your fork?

@wmmc88
Copy link
Contributor Author

wmmc88 commented Nov 18, 2021

Have the mac-os tests had spurious failures before?

not from what I remember. I re-triggered the CI jobs twice and they keep failing. From past experience, I don't think our clang macOS setup is quite right, or at least it's not exactly the same as the ROS 2 macOS CI, which might be lagging behind IIRC.

Can you try re-triggering CI on your fork?

I've re-triggered CI in my fork and it still all passes. This is a snapshot of the diff of the step that's failing on macos (Test all packages in single repo, default options):
image

The left(ie. failing build in this fork) runner is running a newer version of clang. This is the error:

In file included from /Users/runner/work/action-ros-ci/action-ros-ci/ros_ws/build/osrf_testing_tools_cpp/googletest-1.8.0-extracted/googletest-1.8.0-src/googletest/src/gtest-all.cc:39:
  In file included from /Users/runner/work/action-ros-ci/action-ros-ci/ros_ws/build/osrf_testing_tools_cpp/googletest-1.8.0-extracted/googletest-1.8.0-src/googletest/include/gtest/gtest.h:62:
  In file included from /Users/runner/work/action-ros-ci/action-ros-ci/ros_ws/build/osrf_testing_tools_cpp/googletest-1.8.0-extracted/googletest-1.8.0-src/googletest/include/gtest/gtest-param-test.h:193:
  /Users/runner/work/action-ros-ci/action-ros-ci/ros_ws/build/osrf_testing_tools_cpp/googletest-1.8.0-extracted/googletest-1.8.0-src/googletest/include/gtest/internal/gtest-param-util-generated.h:107:8: error: definition of implicit copy constructor for 'ValueArray2<bool, bool>' is deprecated because it has a user-declared copy assignment operator [-Werror,-Wdeprecated-copy]
    void operator=(const ValueArray2& other);
         ^
  /Users/runner/work/action-ros-ci/action-ros-ci/ros_ws/build/osrf_testing_tools_cpp/googletest-1.8.0-extracted/googletest-1.8.0-src/googletest/include/gtest/gtest-param-test.h:354:10: note: in implicit copy constructor for 'testing::internal::ValueArray2<bool, bool>' first required here
    return internal::ValueArray2<T1, T2>(v1, v2);
           ^
  /Users/runner/work/action-ros-ci/action-ros-ci/ros_ws/build/osrf_testing_tools_cpp/googletest-1.8.0-extracted/googletest-1.8.0-src/googletest/include/gtest/gtest-param-test.h:1221:10: note: in instantiation of function template specialization 'testing::Values<bool, bool>' requested here
    return Values(false, true);
           ^
  1 error generated.
  make[2]: *** [googletest-1.8.0-extracted/googletest-1.8.0-build/googlemock/gtest/CMakeFiles/gtest.dir/src/gtest-all.cc.o] Error 1
  make[1]: *** [googletest-1.8.0-extracted/googletest-1.8.0-build/googlemock/gtest/CMakeFiles/gtest.dir/all] Error 2
  make[1]: *** Waiting for unfinished jobs....
  make: *** [all] Error 2

It seems like its this error: osrf/osrf_testing_tools_cpp#35
..but that's been resolved already. This also looks like a similar issue that causes this step to fail on windows too(its disabled here)...

…ndows builds. re-enable windows for 'Test all packages in single repo, default options' step

Signed-off-by: Melvin Wang <melvin.mc.wang@gmail.com>
…single repo, default options' test

Signed-off-by: Melvin Wang <melvin.mc.wang@gmail.com>
Copy link
Member

@christophebedard christophebedard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are many little changes, but this looks good to me. I'd like to have someone else review and approve as well though.

Copy link
Contributor

@emersonknapp emersonknapp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly this looks good, I only have a couple requests to help make future maintenance more manageable.

src/action-ros-ci.ts Outdated Show resolved Hide resolved
.github/workflows/test.yml Outdated Show resolved Hide resolved
Signed-off-by: Melvin Wang <melvin.mc.wang@gmail.com>
Signed-off-by: Melvin Wang <melvin.mc.wang@gmail.com>
@wmmc88
Copy link
Contributor Author

wmmc88 commented Dec 29, 2021

Mostly this looks good, I only have a couple requests to help make future maintenance more manageable.

done!

@wmmc88
Copy link
Contributor Author

wmmc88 commented Jan 20, 2022

@emersonknapp Could you re-review?

@ooeygui
Copy link

ooeygui commented Jan 25, 2022

I'm currently investigating using this action with ROS2.net. This PR fixes several issues discovered during the CI implementation.

I'd love to see this get checked in.

the review looks great. @wmmc88 - thank you for the contribution!

@emersonknapp emersonknapp merged commit ee483a7 into ros-tooling:master Feb 3, 2022
@ooeygui
Copy link

ooeygui commented Feb 3, 2022

Awesome! Thank you @wmmc88 and @emersonknapp !

@wmmc88
Copy link
Contributor Author

wmmc88 commented Feb 3, 2022

FYI: It looks like the pipeline for the merged commit failed, despite it succeeding on the pr. It looks like Github recently moved windows-latest to windows server 2022. The Windows server 2022 image has [visual studio 2022] instead of 2019, which is why the build is now failing on master.

Not sure what the resolution to this should be since the official docs for ros2 seem to imply it only is supported for vs2019.

@christophebedard
Copy link
Member

I brought up the potential move to VS 2022 recently and was told that it should be done before Humble, but it will probably require some work: ros2/ros2_documentation#2112 (comment).

For now, I think we can change it to windows-2019.

@wmmc88
Copy link
Contributor Author

wmmc88 commented Feb 4, 2022

I brought up the potential move to VS 2022 recently and was told that it should be done before Humble, but it will probably require some work: ros2/ros2_documentation#2112 (comment).

For now, I think we can change it to windows-2019.

This action probably needs some logic to determine which version to use based off of the ros distribution then. Assuming that humble uses 2022, I assume all the older versions will only work with 2019.

I think it'd be useful to document somewhere that this action needs to be run on windows-2019 or use another action that installs vs 2019 when running windows builds.

@christophebedard
Copy link
Member

This action probably needs some logic to determine which version to use based off of the ros distribution then. Assuming that humble uses 2022, I assume all the older versions will only work with 2019.

Most likely.

I think it'd be useful to document somewhere that this action needs to be run on windows-2019 or use another action that installs vs 2019 when running windows builds.

I'll add it to the README in #719

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

Successfully merging this pull request may close these issues.

None yet

6 participants