Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/ci-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: ci-windows

on: [pull_request, workflow_dispatch]

jobs:
ci-windows-2025:
name: windows-2025
runs-on: windows-2025
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Dependencies
run: |
vcpkg install curl:x64-windows
vcpkg install libuv
- name: Build
run: |
mkdir Release
cd Release
cmake -DCMAKE_TOOLCHAIN_FILE=%VCPKG_ROOT%/scripts/buildsystems/vcpkg.cmake -DLIFT_BUILD_EXAMPLES=OFF ..
cmake --build . --config Release
- name: Test
run: |
cd Release
ctest --build-config Release -VV
25 changes: 18 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.10)
project(lifthttp CXX)

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
Expand All @@ -9,12 +9,23 @@ option(LIFT_CODE_COVERAGE "Enable code coverage, tests must also be enabled. De
option(LIFT_RUN_GITCONFIG "Set the githooks directory to auto format code and update the readme, Default=OFF." OFF)

if(NOT DEFINED LIFT_USER_LINK_LIBRARIES)
set(
LIFT_USER_LINK_LIBRARIES
curl z uv pthread dl stdc++fs
CACHE STRING
"Override ${PROJECT_NAME} required link libraries, defaults to [curl z uv pthread dl stdc++fs]. If changed all defaults must be accounted for manually."
)
if(MSVC)
find_package(libuv REQUIRED)
find_package(CURL REQUIRED)
set(
LIFT_USER_LINK_LIBRARIES
CURL::libcurl z libuv::uv pthread dl stdc++fs
CACHE STRING
"Override ${PROJECT_NAME} required link libraries, defaults to [CURL::libcurl z libuv::uv pthread dl stdc++fs]. If changed all defaults must be accounted for manually."
)
else()
set(
LIFT_USER_LINK_LIBRARIES
curl z uv pthread dl stdc++fs
CACHE STRING
"Override ${PROJECT_NAME} required link libraries, defaults to [curl z uv pthread dl stdc++fs]. If changed all defaults must be accounted for manually."
)
endif()
endif()

message("${PROJECT_NAME} LIFT_BUILD_EXAMPLES = ${LIFT_BUILD_EXAMPLES}")
Expand Down
2 changes: 1 addition & 1 deletion examples/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.10)
project(liblifthttp_examples CXX)

### readme ###
Expand Down
2 changes: 1 addition & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.10)
project(liblifthttp_tests)

option(LIFT_LOCALHOST_TESTS "Define ON if running tests locally." OFF)
Expand Down
8 changes: 7 additions & 1 deletion test/test_resolve_host.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,13 @@ TEST_CASE("resolve_host client")
lift::resolve_host{"testhostname", nginx_port, service_ip_address},
lift::resolve_host{"herpderp.com", nginx_port, service_ip_address}};

lift::client client{lift::client::options{.resolve_hosts = std::move(rhosts)}};
lift::client client{lift::client::options{
std::nullopt,
std::nullopt,
std::nullopt,
std::move(rhosts),
nullptr,
}};

auto on_complete = [&](lift::request_ptr, lift::response response) -> void
{
Expand Down
8 changes: 7 additions & 1 deletion test/test_timesup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@

TEST_CASE("Timesup single request")
{
lift::client client{lift::client::options{.connect_timeout = std::chrono::seconds{1}}};
lift::client client{lift::client::options{
std::nullopt,
std::nullopt,
std::chrono::seconds{1},
std::nullopt,
nullptr
}};

auto r = std::make_unique<lift::request>(
"http://www.reddit.com", // should be slow enough /shrug
Expand Down
Loading