-
Notifications
You must be signed in to change notification settings - Fork 104
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
Test environment (using conan
)
#235
base: master
Are you sure you want to change the base?
Conversation
At least so far I can tell that Conan is also very nice. However, the interesting part will be the setup of the GitHub workflows, but theoretically there should not be any major problem - but lets see. |
Build instructions for this PR: # checkout
git clone [email protected]:aarlt/autobahn-cpp.git
cd autobahn-cpp
git checkout test-environment-conan
# build directory
mkdir build
cd build
# initialise conan
conan install --build missing ../conanfile.py
# build
cmake ..
make
# test (if docker daemon is running)
make test |
b542d0f
to
177df28
Compare
Theoretically we could even support |
Maybe https://github.com/conan-io/cmake-conan is very interesting, because it seem to allow using |
57617bc
to
31d94e8
Compare
31d94e8
to
641098d
Compare
641098d
to
6c02721
Compare
oh, this is fantastic!! really cool that you give conan a try, and if it works with vcpkg at the same time - well, that's what I'd call "best of both worlds";) gimme a bit time to digest it, try it etc, I post here! first need to get over this:
comfort docs for our readme then:
|
awesome! it generates the cmake build files
only other thing I had to do: set because
now, to build, I had to add a env var like
and it builds ... without any hickups ... I can't believe it. with all the deps, this is a pretty big and complex code base. really great work!
|
Nice! I still need to fix the windows build (see https://github.com/aarlt/autobahn-cpp/runs/5355028210?check_suite_focus=true) ;) I will try to fix it when I find some time. Beside the build system stuff, the test environment can be found in BTW I was trying to build crossbar for windows (because I was not able to find a way to run docker images in windows with GitHub workflow) - but it was not just working, sadly I forgot what was the exact issue there. Using Python & crossbar would be in general the other alternative - to not use docker. However, I think at least for Linux & macOS the usage of the docker images is the best solution. But I also think that it would be nice if we could find a way to also run the test cases on windows. |
very brave;) honestly, it's long ago I did that. it is possible, but only for masochists, and also pointless. just using docker is a lot better. use windows as a glorified docker driver is good enough. here is an example how that can be used in CI / GH actions: https://github.com/crossbario/autobahn-js/blob/master/.github/workflows/main.yml |
rgd test strategy vs a running router, as part of CI, "end to end integration tests", just as some background/details: over the years, we've developed and tried different approaches in autobahn-python, autobahn-js, autobahn-java and crossbar itself. the approach in autobahn-js is probably the simplest. the tests
the test passes, if the log matches known good exactly. now, this works and does indeed catch many issues, and in a way positively proves that the basics are working. however, it obviously also has shortcomings. how do you initially come up with a "known good" file? but the upside is: it is a straight-forward test strategy that is easy to implement;) if you are interested, I can explain the approaches in the other repos ... the stuff in crossbar is the most advanced. it contains tests to configure and boot a cluster of router nodes with management node and all the shit. however, for the client libraries testing, this is overkill. the client lib test strategy IMO should have one important feature: simple and "just works". not introducing even more problems, unrelated to the client library itself. |
Same as #234 but using Conan as package manager.