webrtc-sdk / libwebrtc

A C++ wrapper for binary release, mainly used for flutter-webrtc desktop (windows, linux, embedded).
MIT License
378 stars 77 forks source link

Feat/conan support #84

Closed k-wasniowski closed 1 year ago

k-wasniowski commented 1 year ago

@cloudwebrtc Could you take a look, and give your thoughts?

To test it locally, ensure that you do not have any depot_tools related things in your ENV. The package is designed to work with the latest version of Conan ( 2.0 ). To test it out, ensure you have installed latest version of Conan. In the repository root: conan create .

It will:

  1. Export local sources required for building to the build directory
  2. Download depot tools
  3. Checkout to correct depot tools version
  4. Download google WebRTC start
  5. Download dependencies
  6. Build libwebrtc
  7. Create and export package to LOCAL cache

There is test_package directory, with minimal cmake which import and use package which was built. To run it go to the /.conan/test_package directory, and call:

conan install . --output-folder=build
conan build . --output-folder=build

First step will import package, and second will build test app.

Extra reading about conan creation package can be found here.

As for now I have tested it on Windows, in the next few days I will check if everything is ok with Linux.

cloudwebrtc commented 1 year ago

@k-wasniowski Cool, it looks like an automated script to compile the final binary output, can this script be run in github actions? This way we should be able to automatically release the binary

k-wasniowski commented 1 year ago

@cloudwebrtc It indeed is destined to:

  1. Automate build
  2. Make one source of truth
  3. Once we add it to the conan center, even if there are missing ready binaries, end user should be able to automatically download this conan recipe and build libwebrtc with the configuration which user want
  4. Good place to store prebuilt binaries We could add building libraries in github action, to do that, i believe adding docker containers would be the best option. I could do that too if you want :)
k-wasniowski commented 1 year ago

The thing about GitHub actions is that, GitHub workers doesn't have sufficient memory allocated. Casual worker have around 10GB of free space, which is not sufficient to build WebRTC library

k-wasniowski commented 1 year ago

Could you add a initial version TAG to the repository? I could start working then on adding it to the conan center

k-wasniowski commented 1 year ago

@cloudwebrtc I am currently working on adding package to conan center - PR here: https://github.com/conan-io/conan-center-index/pull/18039. To be able to merge it, i will need a release tar. Could you create a release ? Tag it with 1.0.0, or something like this