Merge branch 'develop' into fix/string_trim
This commit is contained in:
commit
f8494fb9ba
@ -17,7 +17,7 @@ on:
|
||||
- "third_party/**"
|
||||
|
||||
concurrency:
|
||||
group: android-${{github.ref}}
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
|
@ -24,7 +24,7 @@ on:
|
||||
- "CMakeLists.txt"
|
||||
- "cmake/**"
|
||||
concurrency:
|
||||
group: linux-aarch64-cpu-gcc-${{ github.ref }}
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
permissions:
|
||||
contents: read
|
||||
|
@ -26,7 +26,7 @@ on:
|
||||
- CMakeLists.txt
|
||||
- cmake/**
|
||||
concurrency:
|
||||
group: linux-arm-gcc-${{ github.ref }}
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
jobs:
|
||||
linux-gcc-arm:
|
||||
|
@ -22,9 +22,9 @@ on:
|
||||
- CMakeLists.txt
|
||||
- cmake/**
|
||||
concurrency:
|
||||
group: linux-mips-gcc-${{ github.ref }}
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
permissions: read-all
|
||||
|
||||
jobs:
|
||||
linux-gcc-mipsel:
|
||||
runs-on: ubuntu-20.04
|
||||
|
@ -23,9 +23,9 @@ on:
|
||||
- CMakeLists.txt
|
||||
- cmake/**
|
||||
concurrency:
|
||||
group: linux-mips64-gcc-${{ github.ref }}
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
permissions: read-all
|
||||
|
||||
jobs:
|
||||
linux-gcc-mips64el:
|
||||
runs-on: ubuntu-20.04
|
||||
|
@ -24,9 +24,9 @@ on:
|
||||
- CMakeLists.txt
|
||||
- cmake/**
|
||||
concurrency:
|
||||
group: linux-riscv64-gcc-${{ github.ref }}
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
permissions: read-all
|
||||
|
||||
jobs:
|
||||
linux-gcc-riscv64:
|
||||
runs-on: ubuntu-20.04
|
||||
|
@ -16,7 +16,7 @@ on:
|
||||
- "CMakeLists.txt"
|
||||
|
||||
concurrency:
|
||||
group: linux-x64-clang-${{ github.ref }}
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
|
@ -20,7 +20,7 @@ on:
|
||||
- "CMakeLists.txt"
|
||||
|
||||
concurrency:
|
||||
group: linux-x64-gcc-${{ github.ref }}
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
|
@ -22,7 +22,7 @@ on:
|
||||
- "CMakeLists.txt"
|
||||
|
||||
concurrency:
|
||||
group: linux-x86-gcc-${{ github.ref }}
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
|
@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.5)
|
||||
|
||||
set(tile_VERSION_MAJOR 0)
|
||||
set(tile_VERSION_MINOR 1)
|
||||
set(tile_VERSION_PATCH 1)
|
||||
set(tile_VERSION_PATCH 2)
|
||||
set(tile_VERSION_BUILD $ENV{CI_STEP_NUMBER})
|
||||
if(NOT tile_VERSION_BUILD)
|
||||
set(tile_VERSION_BUILD "0")
|
||||
@ -38,31 +38,6 @@ if(NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE "Release")
|
||||
endif()
|
||||
|
||||
# if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") # set(CMAKE_CXX_FLAGS
|
||||
# "${CMAKE_CXX_FLAGS} -gz") # set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -gz") #
|
||||
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static") set(CMAKE_C_FLAGS #
|
||||
# "${CMAKE_CXX_FLAGS} -static") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} #
|
||||
# -fsanitize=address ") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address #
|
||||
# ")
|
||||
#
|
||||
# set(WHOLE_ARCHIVE_PREFIX "-Wl,-force_load") # set(NO_WHOLE_ARCHIVE_PREFIX "")
|
||||
# elseif(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") # set(CMAKE_CXX_FLAGS
|
||||
# "${CMAKE_CXX_FLAGS} -gz") # set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -gz") #
|
||||
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static") set(CMAKE_C_FLAGS #
|
||||
# "${CMAKE_CXX_FLAGS} -static")
|
||||
#
|
||||
# set(WHOLE_ARCHIVE_PREFIX "-Wl,-force_load,") # set(NO_WHOLE_ARCHIVE_PREFIX "")
|
||||
# elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set(CMAKE_CXX_FLAGS
|
||||
# "${CMAKE_CXX_FLAGS} -gz") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -gz") #
|
||||
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-libgcc -static-libstdc++") #
|
||||
# set(CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS} -static-libgcc -static-libstdc++")
|
||||
#
|
||||
# set(STATIC_BINARY_FLAGS "-static-libgcc -static-libstdc++")
|
||||
# set(WHOLE_ARCHIVE_PREFIX "-Wl,--whole-archive") set(WHOLE_ARCHIVE_SUFFIX
|
||||
# "-Wl,--no-whole-archive") endif()
|
||||
|
||||
# extern int getifaddrs(struct ifaddrs **ifap); extern void freeifaddrs(struct
|
||||
# ifaddrs *ifa);
|
||||
include(CheckSymbolExists)
|
||||
include(cmake/BuildInfo.cmake)
|
||||
|
||||
@ -88,7 +63,6 @@ add_subdirectory("third_party/googletest")
|
||||
add_subdirectory("third_party/gflags")
|
||||
set(GFLAGS_USE_TARGET_NAMESPACE ON)
|
||||
set(gflags_DIR "${CMAKE_CURRENT_BINARY_DIR}/third_party/gflags")
|
||||
# add_subdirectory("third_party/context")
|
||||
|
||||
set(CURL_DISABLE_TESTS ON)
|
||||
set(CURL_CA_PATH "none" CACHE STRING "" FORCE)
|
||||
|
@ -14,6 +14,7 @@ namespace internal {
|
||||
constexpr auto kTestDuration = std::chrono::seconds(5);
|
||||
constexpr auto kInterval = std::chrono::milliseconds(100);
|
||||
constexpr auto kTimerNum = 100;
|
||||
constexpr auto kExpFactor = 0.5;
|
||||
|
||||
TEST(TimeKeeper, OneFastTimer)
|
||||
{
|
||||
@ -22,7 +23,7 @@ TEST(TimeKeeper, OneFastTimer)
|
||||
std::this_thread::sleep_for(kTestDuration);
|
||||
TimeKeeper::Instance()->KillTimer(timer_id);
|
||||
constexpr auto expires_count = kTestDuration / kInterval;
|
||||
constexpr auto eps = expires_count / 10;
|
||||
constexpr auto eps = expires_count * kExpFactor;
|
||||
ASSERT_NEAR(x, expires_count, eps);
|
||||
}
|
||||
|
||||
@ -39,7 +40,7 @@ TEST(TimeKeeper, SlowTimer)
|
||||
for (auto &&e : timers) { TimeKeeper::Instance()->KillTimer(e); }
|
||||
|
||||
const auto expires_count = kTimerNum * (2 * kTestDuration / kInterval);
|
||||
const auto eps = expires_count / 10;
|
||||
const auto eps = expires_count * kExpFactor;
|
||||
ASSERT_NEAR(x, expires_count, eps);
|
||||
}
|
||||
|
||||
@ -56,7 +57,7 @@ TEST(TimeKeeper, FastTimer)
|
||||
for (auto &&e : timers) { TimeKeeper::Instance()->KillTimer(e); }
|
||||
|
||||
const auto expires_count = kTimerNum * (2 * kTestDuration / kInterval);
|
||||
const auto eps = expires_count / 10;
|
||||
const auto eps = expires_count * kExpFactor;
|
||||
ASSERT_NEAR(x, expires_count, eps);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user