MADEAPPS / newton-dynamics

Newton Dynamics is an integrated solution for real time simulation of physics environments.
http://www.newtondynamics.com
Other
928 stars 183 forks source link

Run unit tests in CI for Windows. #299

Closed olitheolix closed 1 year ago

olitheolix commented 1 year ago

Automatically build and run the test suite in the Windows runners as well.

I suggest to leave this PR open until the Linux build works again. I can then rebase it to the latest version and verify it works on both platforms.

JulioJerez commented 1 year ago

ok I now fixed the build errors in Linux. I will wait until the automatic build complete the test. we now have to see, what to do to make the windows build not to fail building the test.

are you saying to hold on this pull request?

olitheolix commented 1 year ago

I just rebased the branch onto the latest master and now all tests are green on both platforms. You can merge the PR now if you want.

At this point, CI is building and testing Newton on both Windows and Linux :tada:

JulioJerez commented 1 year ago

alright, it is merged

JulioJerez commented 1 year ago

The code do compile in my computer but fail when the automatic build is run. I fail in both Linux and windows. I do not why, because the bug report does not say where.

JulioJerez commented 1 year ago

oh I see it is a runtime error.

The error was produced by me setting the matrix posit.m_w to 1 because I got the assert. but I fixed in the wrong place.

This goes to you question about helper functions. which I will answer later. anyway, it should be fine now, This is really cool.

JulioJerez commented 1 year ago

ok, I think I finally have it building for both Window and Linux on the test demos and some of the thier part libraries for Linux I could not find the warning level option. so I just added if (MSVC) target_compile_options(${PROJECT_NAME} PRIVATE "/W4") endif()

you had /wall which seems to work for both widow a linux. but in windows the third-party libraries are full of warning and polluted the the output windows with ton of pedante message, so I use /w4

I fixed all the warning for Newton and the lib that newton uses so it compiles fine with the /Wall option.

Now we can move on.