Skip to content

Commit

Permalink
Merge branch 'main' into add_more_benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
qicosmos authored Aug 16, 2024
2 parents 817a3d7 + 836a372 commit 18eb5a9
Show file tree
Hide file tree
Showing 7 changed files with 162 additions and 168 deletions.
66 changes: 33 additions & 33 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,41 +9,41 @@ on:
workflow_dispatch:

jobs:
# windows_msvc:
# runs-on: windows-latest
windows_msvc:
runs-on: windows-latest

# strategy:
# matrix:
# mode: [ Release ] #[ Release, Debug ] #Debug not support ccache
# #https://github.com/ccache/ccache/wiki/MS-Visual-Studio
# #https://github.com/ccache/ccache/issues/1040
# arch: [ amd64, x86 ] #[ amd64,x86 ]
# ssl: [ OFF ] #[ ON, OFF ]
strategy:
matrix:
mode: [ Release ] #[ Release, Debug ] #Debug not support ccache
#https://github.com/ccache/ccache/wiki/MS-Visual-Studio
#https://github.com/ccache/ccache/issues/1040
arch: [ amd64, x86 ] #[ amd64,x86 ]
ssl: [ OFF ] #[ ON, OFF ]

# steps:
# - name: Checkout
# uses: actions/checkout@v3
# - name: Enable Developer Command Prompt
# uses: ilammy/[email protected]
# with:
# arch: ${{ matrix.arch }}
# - name: Install ninja-build tool
# uses: seanmiddleditch/gha-setup-ninja@master
# with:
# version: 1.11.1
# - name: latest ccache
# run: choco install ccache
# - name: ccache
# uses: hendrikmuhs/[email protected]
# with:
# key: ${{ github.job }}-${{ matrix.mode}}-ssl( ${{ matrix.ssl}} )-arch-${{ matrix.arch}}
# - name: Configure CMake
# run: cmake -B ${{github.workspace}}\build -G Ninja -DCMAKE_BUILD_TYPE=${{ matrix.mode }} -DYLT_ENABLE_SSL=${{matrix.ssl}} -DUSE_CCACHE=ON
# - name: Build
# run: cmake --build ${{github.workspace}}\build
# - name: Test
# working-directory: ${{github.workspace}}\build
# run: ctest -C ${{matrix.mode}} -j 1 -V
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Enable Developer Command Prompt
uses: ilammy/[email protected]
with:
arch: ${{ matrix.arch }}
- name: Install ninja-build tool
uses: seanmiddleditch/gha-setup-ninja@master
with:
version: 1.11.1
- name: latest ccache
run: choco install ccache
- name: ccache
uses: hendrikmuhs/[email protected]
with:
key: ${{ github.job }}-${{ matrix.mode}}-ssl( ${{ matrix.ssl}} )-arch-${{ matrix.arch}}
- name: Configure CMake
run: cmake -B ${{github.workspace}}\build -G Ninja -DCMAKE_BUILD_TYPE=${{ matrix.mode }} -DYLT_ENABLE_SSL=${{matrix.ssl}} -DUSE_CCACHE=ON
- name: Build
run: cmake --build ${{github.workspace}}\build
- name: Test
working-directory: ${{github.workspace}}\build
run: ctest -C ${{matrix.mode}} -j 1 -V
windows_msvc_2019:
runs-on: windows-2019

Expand Down
2 changes: 1 addition & 1 deletion cmake/build.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ if (has_cxx_std_20)
set(has_cxx_std_20 FALSE)
endif()
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 1930)
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.30)
set(has_cxx_std_20 FALSE)
endif()
endif()
Expand Down
250 changes: 125 additions & 125 deletions include/ylt/reflection/internal/generate/arg_list_macro_gen.hpp

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions include/ylt/standalone/cinatra/coro_http_client.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -884,7 +884,7 @@ class coro_http_client : public std::enable_shared_from_this<coro_http_client> {
co_return;
}
std::string file_data;
detail::resize(file_data, std::min(max_single_part_size_, length));
detail::resize(file_data, (std::min)(max_single_part_size_, length));
coro_io::coro_file file{};
file.open(source, std::ios::in);
file.seek(offset, std::ios::cur);
Expand All @@ -895,7 +895,7 @@ class coro_http_client : public std::enable_shared_from_this<coro_http_client> {
std::size_t size;
while (length > 0) {
if (std::tie(ec, size) = co_await file.async_read(
file_data.data(), std::min(file_data.size(), length));
file_data.data(), (std::min)(file_data.size(), length));
ec) {
// bad request, file may smaller than content-length
break;
Expand Down
1 change: 1 addition & 0 deletions include/ylt/standalone/cinatra/metric_conf.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "ylt/metric/gauge.hpp"
#include "ylt/metric/histogram.hpp"
#include "ylt/metric/metric.hpp"
#include "ylt/metric/metric_manager.hpp"
#include "ylt/metric/summary.hpp"
#include "ylt/metric/system_metric.hpp"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,6 @@ add_executable(coro_rpc_example_use_rest_rpc_protocol
server/rpc_service.cpp
)

if (NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
target_link_libraries(coro_rpc_example_use_rest_rpc_protocol PRIVATE -lstdc++fs)
endif()

target_compile_definitions(coro_rpc_example_use_rest_rpc_protocol PRIVATE HAVE_MSGPACK)
target_compile_definitions(coro_rpc_example_use_rest_rpc_protocol PRIVATE MSGPACK_NO_BOOST)

Expand Down
3 changes: 0 additions & 3 deletions src/easylog/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,4 @@ add_executable(easylog_test
)
add_test(NAME easylog_test COMMAND easylog_test)
target_compile_definitions(easylog_test PRIVATE STRUCT_PACK_ENABLE_UNPORTABLE_TYPE)
if (NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
target_link_libraries(easylog_test PRIVATE -lstdc++fs)
endif()

0 comments on commit 18eb5a9

Please sign in to comment.