Skip to content
This repository has been archived by the owner on Jan 26, 2024. It is now read-only.

Set up CI testing for windows. #85

Closed
rnburn opened this issue May 22, 2018 · 10 comments
Closed

Set up CI testing for windows. #85

rnburn opened this issue May 22, 2018 · 10 comments

Comments

@rnburn
Copy link
Contributor

rnburn commented May 22, 2018

AppVeyor was set up for the repository (See #80), but the build tests still need to be written.

@mdouaihy
Copy link
Contributor

I am working on it. I should have something in few hours.

@cwe1ss
Copy link
Member

cwe1ss commented May 25, 2018

Just let me know if you need anything from the AppVeyor account!

@hypnoce
Copy link

hypnoce commented May 25, 2018

@mdouaihy you found the issue for ctests ?

@mdouaihy
Copy link
Contributor

it's taking a bit more time than expected because MSVC handle the shared libraries differently than Linux. Also, MSVC requires to declare the exported and imported symbols using declspec(export) and declspec(import) while compiling the shared lib but not when compiling the static lib, etc. I should have a working version running and tested on Appveyor by the end of this week end

@rnburn
Copy link
Contributor Author

rnburn commented Jun 10, 2018

@mdouaihy - how's this going?

It looks like your branch also adds dynamic loading support for windows -- that's cool; but could we maybe break that out into a separate PR and put in a smaller PR that just adds windows CI support without dynamic loading to get started?

@mdouaihy
Copy link
Contributor

@rnburn, I took time before submitting any PR because in parallel, I worked on building Jaeger on Windows also (https://github.com/mdouaihy/jaeger-client-cpp).

As for your suggestion, here are the problems:

  • Unit tests were not building
    ** The first change i made fixed two compile errors build does not fix the link of the unit tests
    ** With Visual Studio, dynamic libraries should be moved next to the unit test binaries
  • Unit tests are failing.
    ** unordered_map does not have the same order between MSVC and GCC/Clang
    ** there is a unit test for dynamic loading. If I dont add the dynamic support, the test will fail;

@hypnoce
Copy link

hypnoce commented Jun 10, 2018

Great work from @mdouaihy who worked hard on it !

@rnburn
Copy link
Contributor Author

rnburn commented Jun 10, 2018

@mdouaihy - thanks for the update.

This check should disable the dynamic loading test if it's not supported. Is it not working?

Which test does the unordered_map cause problems for? I can try to fix it.

@mdouaihy
Copy link
Contributor

It's the test TEST_CASE("json"): The problem is that SpanData contains a tags which is an std::unordered_map<std::string, Value and SpanContextData contains baggage which is std::unordered_map<std::string, std::string>. The order is not guaranteed.

As for the Dynamic loading, you're right about the cmake check. However, I needed it while building Jaeger. That's why I included it in the change.

Just to be sure, the code is in the branch windowsbuild the repo I forked https://github.com/mdouaihy/opentracing-cpp/tree/windowsbuild

@rnburn
Copy link
Contributor Author

rnburn commented Jun 11, 2018

@mdouaihy - I put in #92 to fix the JSON ordering issue.

rnburn pushed a commit that referenced this issue Jun 14, 2018
* Support build on Windows with MSVC 15.7 (#85)
* Export Symbols
* Add Runtime targets to the install steps
* Fix failing unit test under Windows
* Add some MSVC compile options
* Add appveyor build file
* add output directory and ignore build folder in git

* Exclude dynamic_load_windows.cpp from bazel build.

* Handlle multiple symbols problem when linking directly with tracer implementations.

* Format the error message when doing Windows calls.

* Enrich the README with instructions to build and test under Windows.

* Dont declare the Fontions when registering them for OpenTracing dynamic loading.
@rnburn rnburn closed this as completed Jun 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants