-
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 vcpkg
)
#234
base: master
Are you sure you want to change the base?
Conversation
Ah sorry! I totally forgot to explicitly write down how to build everything. Especially because the magic of how However, if there is no # checkout
git clone [email protected]:aarlt/autobahn-cpp.git
cd autobahn-cpp
git checkout test-environment
# initialise vcpkg
git submodule update --init --recursive
vcpkg/bootstrap-vcpkg.sh
export VCPKG_ROOT=$(pwd)/vcpkg
# build
mkdir build
cd build
cmake ..
make
# test (if docker daemon is running)
make test If |
@aarlt sorry for delayed response, this is super cool!! |
vcpkg is by Microsoft - does MS also provide official GitHub actions for vcpkg for testing on Windows? Is https://github.com/marketplace/actions/run-vcpkg providing "official" GH actions? for conan, this is available, eg here is a last successful run: https://github.com/crossbario/autobahn-cpp/runs/4970906148?check_suite_focus=true#step:1:3
so one decision taken in this PR, basically the one "decision" that we should take consciously is switch from Conan to vcpkg as package manager for all platforms, while keeping cmake as build system for all platforms Is that true? vcpkg is made by Microsoft, and is OSS (MIT): "C/C++ dependency manager from Microsoft - For all platforms, buildsystems, and workflows" Conan seems like a widely used and established package manager https://conan.io/, while vcpkg is new? Sorry for asking such dumb questions .. I never used vcpkg, and I'm not that deep into C++ ecosystem and community trends these days, so ... basically my question is:
the only answer I can find for me to above:
which isn't true;) sorry for asking in such a provocative way, I guess I just cannot forget how the world suffered in the 90s under MS dictatorship. also, I'm not in principle against using MS tools. including on Linux. however, I like to avoid a situation where I have to fuzz around with a shitty MS tool - on Linux. because I needlessly bound myself to a MS shit universe. It's not even 10yrs that I escaped the evil empire ... zero motivation to go back. |
so in my mind, it boils down to a decision we need to take:
I'm fine with 1., as I don't care about Windows and won't waste any significant time on it. I'd be fine with 2. in principle but have worries ^ ... |
We could just download
Yeah, Conan would be an alternative. Actually this was the first time that I'm using
Yeah to be able to really build external libraries (e.g. Boost, OpenSSL & Botan) where someone is not dependent on the system libraries, we need a package manager like Conan or
I think
No problem. I totally understand your point.
Yes, we could do the same with Conan. But
I would not say that we don't have a risk here by using Microsoft stuff. Or is there an issue with the MIT license?
We will not break anything under Linux by using
I totally get your point. I was also really surprised how nicely
I really get your point. If you prefer we could use Conan, I guess I don't have a problem with this. But However, I guess the main decision is now Ah and also, because you're using Conan for packing, I did not add any packaging support yet to the CMake. At least I did not test anything related to packaging. I guess everything would get packed now, not just |
I understand your points. Let me create a PR that is basically this one but using Conan. And then let's just see how it compares. |
Hey! I created a very simple test environment for
autobahn-cpp
. I thought it will be quite useful, in case of future development. Initially I realised, if we change even simple things - e.g. replacing openssl with botan (right now only thehmac
function is used from openssl - it would be very important to know whether such change did not introduce strange behaviour.For this I rewrote the build system a bit - it will now use
vcpkg
as the "package manager". With that external dependencies likeopenssl
,botan
,boost
,msgpack
orwebsocketpp
can be easily added to the cmake build-system. Furthermore it is more easy to build them for different platforms.I configured
catch2
to be used as the test framework.Additionally to the examples - that will also be compiled for the different platforms - tests can be defined in the
test/
directory. Here every test can be defined within its subdirectory. Each test will interact with a wamp router. I decided to use crossbar for this - because it is very easy to integrate. That means that for each test the corresponding crossbar configuration will be used to start the crossbar router (it will use the crossbar docker images). The different tests are also defined incmake
, that allows the usage ofctest
. If you already have docker running, a simplemake
,make test
will run the test cases and automatically starting the needed docker that gets configured with the corresponding crossbar configuration.I also defined a GitHub workflow, that will build everything for
linux
,macOS
&windows
. Sadly I did not find any way how to execute the docker on windows. Thats why right now only the tests gets only executed inlinux
&macOS
.Let me know your opinion about this PR. I hope that the GitHub workflow will just work here - lets see :D