From aadd8728cdadc021d7460ebc3a6376322c69bab1 Mon Sep 17 00:00:00 2001 From: sewenew Date: Mon, 17 Jun 2024 21:21:05 +0800 Subject: [PATCH] move Cursor definition to utils.h --- .github/workflows/build-and-test.yml | 12 ++++++++++++ src/sw/redis++/cxx17/sw/redis++/cxx_utils.h | 2 -- src/sw/redis++/utils.h | 2 ++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index a4ed0b1c..0483f0fe 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -73,3 +73,15 @@ jobs: - name: Test working-directory: ${{ steps.strings.outputs.build-output-dir }} run: ./test/test_redis++ -h 127.0.0.1 -p 6379 -n 127.0.0.1 -c 7000 + + windows: + runs-on: windows-latest + steps: + - uses: actions/checkout@v3 + + - name: install deps + run: choco install -y ninja memurai-developer + + - uses: ilammy/msvc-dev-cmd@v1 + - name: build hiredis + run: mkdir build && cd build && cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=${{ github.workspace }}/install .. && ninja -v && ninja install diff --git a/src/sw/redis++/cxx17/sw/redis++/cxx_utils.h b/src/sw/redis++/cxx17/sw/redis++/cxx_utils.h index 92ada30c..92bbd5a8 100644 --- a/src/sw/redis++/cxx17/sw/redis++/cxx_utils.h +++ b/src/sw/redis++/cxx17/sw/redis++/cxx_utils.h @@ -43,8 +43,6 @@ using Monostate = std::monostate; template using IsInvocable = std::is_invocable; -using Cursor = unsigned long long; - } } diff --git a/src/sw/redis++/utils.h b/src/sw/redis++/utils.h index 95c3581c..8b7edb2a 100644 --- a/src/sw/redis++/utils.h +++ b/src/sw/redis++/utils.h @@ -185,6 +185,8 @@ struct IsAssociativeContainer : std::integral_constant::value && !HasPushBack::value> {}; +using Cursor = unsigned long long; + uint16_t crc16(const char *buf, int len); }