From 66afed6472a2fea2bbd406c167088b26a855b087 Mon Sep 17 00:00:00 2001 From: Hiroshi Hatake Date: Wed, 7 Aug 2024 12:19:26 +0900 Subject: [PATCH 1/2] appveyor: Use vcpkg to install the latest OpenSSL Signed-off-by: Hiroshi Hatake --- appveyor.yml | 47 +++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 43 insertions(+), 4 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index bdf29ece94a..6c8b97821c5 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -37,16 +37,55 @@ install: - ps: Expand-Archive winflexbison.zip -Destination /WinFlexBison - ps: Copy-Item -Path /WinFlexBison/win_bison.exe /WinFlexBison/bison.exe - ps: Copy-Item -Path /WinFlexBison/win_flex.exe /WinFlexBison/flex.exe + - cd C:\Tools\vcpkg + - git pull + - .\bootstrap-vcpkg.bat + - cd %APPVEYOR_BUILD_FOLDER% before_build: - - git clone --depth=1 https://github.com/calyptia/fluent-bit-ci.git ci - - ps: Copy-Item -Path .\ci\scripts\run-unit-tests.ps1 .\ci\do-ut.ps1 + - if %PLATFORM%==Win32 call C:\tools\vcpkg\vcpkg install --recurse openssl --triplet x86-windows-static + - if %PLATFORM%==x64 call C:\tools\vcpkg\vcpkg install --recurse openssl --triplet x64-windows-static - if %PLATFORM%==Win32 call "%vspath%\VC\Auxiliary\Build\vcvars32.bat" - if %PLATFORM%==x64 call "%vspatH%\VC\Auxiliary\Build\vcvars64.bat" build_script: - - powershell ".\ci\do-ut.ps1;exit $LASTEXITCODE" - - cd build + - ps: | + cd $ENV:APPVEYOR_BUILD_FOLDER\build + + if ( "x64" -eq $env:PLATFORM ) { + $OPENSSL_DIR = "C:\tools\vcpkg\packages\openssl_x64-windows-static" + } + else { + $OPENSSL_DIR = "C:\tools\vcpkg\packages\openssl_x86-windows-static" + } + # CACHE GENERATION + cmake -G "NMake Makefiles" ` + -D FLB_TESTS_INTERNAL=On ` + -D OPENSSL_ROOT_DIR=$OPENSSL_DIR ` + -D FLB_WITHOUT_flb-rt-out_elasticsearch=On ` + -D FLB_WITHOUT_flb-rt-out_td=On ` + -D FLB_WITHOUT_flb-rt-out_forward=On ` + -D FLB_WITHOUT_flb-rt-in_disk=On ` + -D FLB_WITHOUT_flb-rt-in_proc=On ` + -D FLB_WITHOUT_flb-it-parser=On ` + -D FLB_WITHOUT_flb-it-unit_sizes=On ` + -D FLB_WITHOUT_flb-it-network=On ` + -D FLB_WITHOUT_flb-it-pack=On ` + -D FLB_WITHOUT_flb-it-signv4=On ` + -D FLB_WITHOUT_flb-it-aws_credentials=On ` + -D FLB_WITHOUT_flb-it-aws_credentials_ec2=On ` + -D FLB_WITHOUT_flb-it-aws_credentials_http=On ` + -D FLB_WITHOUT_flb-it-aws_credentials_profile=On ` + -D FLB_WITHOUT_flb-it-aws_credentials_sts=On ` + -D FLB_WITHOUT_flb-it-aws_util=On ` + -D FLB_WITHOUT_flb-it-input_chunk=On ` + ../ + # COMPILE + cmake --build . + + # RUNNING TESTS + ctest --build-run-dir $PWD --output-on-failure + - cpack - cmake -G "NMake Makefiles" ..\ - cmake --build . From 6f6831b738e686564d3c3b8a9165bc09f56b0ffb Mon Sep 17 00:00:00 2001 From: Hiroshi Hatake Date: Wed, 7 Aug 2024 12:19:50 +0900 Subject: [PATCH 2/2] cmake: windows: Enable Kafka plugins on Windows Signed-off-by: Hiroshi Hatake --- cmake/windows-setup.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/windows-setup.cmake b/cmake/windows-setup.cmake index ba870233e0c..b947d6cbfa0 100644 --- a/cmake/windows-setup.cmake +++ b/cmake/windows-setup.cmake @@ -30,7 +30,7 @@ if(FLB_WINDOWS_DEFAULTS) set(FLB_IN_HEALTH No) set(FLB_IN_HTTP Yes) set(FLB_IN_MEM No) - set(FLB_IN_KAFKA No) + set(FLB_IN_KAFKA Yes) set(FLB_IN_KMSG No) set(FLB_IN_LIB Yes) set(FLB_IN_RANDOM Yes) @@ -83,7 +83,7 @@ if(FLB_WINDOWS_DEFAULTS) set(FLB_OUT_LIB Yes) set(FLB_OUT_NULL Yes) set(FLB_OUT_FLOWCOUNTER Yes) - set(FLB_OUT_KAFKA No) + set(FLB_OUT_KAFKA Yes) set(FLB_OUT_KAFKA_REST No) set(FLB_OUT_CLOUDWATCH_LOGS Yes) set(FLB_OUT_S3 Yes)