fix(mvfst) (#3899)

* fix(mvfst)

closes #3896

* 🎵i hate everything...🎶
This commit is contained in:
Jacob Heider 2023-10-30 20:42:18 -04:00 committed by GitHub
parent 428641dedc
commit 5a26c1f7d4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -38,34 +38,35 @@ test:
dependencies: dependencies:
google.com/googletest: '*' google.com/googletest: '*'
cmake.org: '*' cmake.org: '*'
gnu.org/gawk: '*'
linux: linux:
gnu.org/gcc: '*' gnu.org/gcc: '*'
gnu.org/make: '*' gnu.org/make: '*'
curl.se: '*' curl.se: '*'
script: script:
- curl -L "https://github.com/facebook/mvfst/archive/v2023.10.09.00.tar.gz" | tar -xz - PADDED_VERSION=$(echo "{{version}}" | gawk -F. '{printf "%04d.%02d.%02d.%02d\n", $1, $2, $3, $4}')
- install CMakeLists.txt ./mvfst-2023.10.09.00/ - curl -L "https://github.com/facebook/mvfst/archive/v$PADDED_VERSION.tar.gz" | tar -xz --strip-components=1
- run: | - cmake . $CMAKE_ARGS
cmake . $CMAKE_ARGS - cmake --build .
cmake --build .
# Function to check if the port is free
# Function to check if the port is free - |
is_port_free() { is_port_free() {
local port_to_check=$1 local port_to_check=$1
(echo >/dev/tcp/127.0.0.1/$port_to_check) &>/dev/null (echo >/dev/tcp/127.0.0.1/$port_to_check) &>/dev/null
} }
# Start checking ports with 7000 # Start checking ports with 7000
current_port=7000 - current_port=7000
# Find a free port # Find a free port
while is_port_free $current_port; do - |
((current_port++)) while is_port_free $current_port; do
done ((current_port++))
./echo --mode server --host 127.0.0.1 --port $current_port & done
sleep 15 - ./echo --mode server --host 127.0.0.1 --port $current_port &
./echo --mode client --host 127.0.0.1 --port $current_port & - sleep 15
sleep 15 - ./echo --mode client --host 127.0.0.1 --port $current_port &
killall echo || true - sleep 15
working-directory: mvfst-2023.10.09.00 - killall echo || true
env: env:
CMAKE_ARGS: CMAKE_ARGS:
- -DCMAKE_INSTALL_PREFIX="{{prefix}} - -DCMAKE_INSTALL_PREFIX="{{prefix}}
@ -74,4 +75,4 @@ test:
- -DCMAKE_FIND_FRAMEWORK=LAST - -DCMAKE_FIND_FRAMEWORK=LAST
- -DCMAKE_VERBOSE_MAKEFILE=ON - -DCMAKE_VERBOSE_MAKEFILE=ON
- -Wno-dev - -Wno-dev
- -DBUILD_TESTING=OFF - -DBUILD_TESTING=OFF