facebook.com/mvfst (#3684)

* new file:   projects/facebook.com/mvfst/CMakeLists.txt
	new file:   projects/facebook.com/mvfst/package.yml

* maybe with llvm

* CMAKE_ARGS

* -latomic

* wip
This commit is contained in:
Andrew 2023-10-23 20:01:40 +03:00 committed by GitHub
parent 0d68a9ea22
commit 3f84d2133f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 94 additions and 0 deletions

View file

@ -0,0 +1,17 @@
cmake_minimum_required(VERSION 3.20)
project(echo CXX)
set(CMAKE_CXX_STANDARD 17)
list(PREPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
find_package(fizz REQUIRED)
find_package(gflags REQUIRED)
find_package(GTest REQUIRED)
find_package(mvfst REQUIRED)
add_executable(echo
quic/samples/echo/main.cpp
quic/common/test/TestUtils.cpp
quic/common/test/TestPacketBuilders.cpp
)
target_link_libraries(echo ${mvfst_LIBRARIES} fizz::fizz_test_support GTest::gmock)
target_include_directories(echo PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})

View file

@ -0,0 +1,77 @@
distributable:
url: https://github.com/facebook/mvfst/archive/v{{version.raw}}.tar.gz
strip-components: 1
versions:
github: facebook/mvfst/tags
dependencies:
boost.org: '*'
github.com/facebookincubator/fizz: '*'
fmt.dev: '*'
facebook.com/folly: '*'
gflags.github.io: '*'
google.com/glog: '*'
openssl.org: '*'
linux:
libsodium.org: ^1.0.19
build:
dependencies:
cmake.org: '*'
linux:
gnu.org/gcc: '*'
gnu.org/make: '*'
script:
- cmake -S . -B _build $CMAKE_ARGS
- cmake --build _build
- cmake --install _build
env:
CMAKE_ARGS:
- -DCMAKE_INSTALL_PREFIX="{{prefix}}
- -DCMAKE_INSTALL_LIBDIR=lib
- -DCMAKE_BUILD_TYPE=Release
- -DCMAKE_FIND_FRAMEWORK=LAST
- -DCMAKE_VERBOSE_MAKEFILE=ON
- -Wno-dev
- -DBUILD_TESTING=OFF
- -DBUILD_TESTS=OFF
- -DCMAKE_POSITION_INDEPENDENT_CODE=ON
test:
dependencies:
google.com/googletest: '*'
cmake.org: '*'
linux:
gnu.org/gcc: '*'
gnu.org/make: '*'
curl.se: '*'
script:
- curl -L "https://github.com/facebook/mvfst/archive/v2023.10.09.00.tar.gz" | tar -xz
- install CMakeLists.txt ./mvfst-2023.10.09.00/
- run: |
cmake . $CMAKE_ARGS
cmake --build .
# Function to check if the port is free
is_port_free() {
local port_to_check=$1
(echo >/dev/tcp/127.0.0.1/$port_to_check) &>/dev/null
}
# Start checking ports with 7000
current_port=7000
# Find a free port
while is_port_free $current_port; do
((current_port++))
done
./echo --mode server --host 127.0.0.1 --port $current_port &
sleep 15
./echo --mode client --host 127.0.0.1 --port $current_port &
sleep 15
killall echo || true
working-directory: mvfst-2023.10.09.00
env:
CMAKE_ARGS:
- -DCMAKE_INSTALL_PREFIX="{{prefix}}
- -DCMAKE_INSTALL_LIBDIR=lib
- -DCMAKE_BUILD_TYPE=Release
- -DCMAKE_FIND_FRAMEWORK=LAST
- -DCMAKE_VERBOSE_MAKEFILE=ON
- -Wno-dev
- -DBUILD_TESTING=OFF