Skip to content

Commit

Permalink
Fix Windows builds and CI
Browse files Browse the repository at this point in the history
* Feature gate all of the cluster tests behind a libevent requirement
* Minor tweak to client_test.c
* Signed correctness fix wrt isdigit for cygwin.
  • Loading branch information
michael-grunder committed Jun 27, 2024
1 parent 5301586 commit b3713d3
Show file tree
Hide file tree
Showing 4 changed files with 190 additions and 188 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ jobs:
run: |
brew install openssl valkey
- name: Build hiredis
- name: Build library
run: USE_SSL=1 make

- name: Run tests
Expand All @@ -174,15 +174,15 @@ jobs:
choco install -y ninja memurai-developer
- uses: ilammy/msvc-dev-cmd@v1
- name: Build hiredis
- name: Build library
run: |
mkdir build && cd build
cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release -DENABLE_EXAMPLES=ON
cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release
ninja -v
- name: Run tests
run: |
./build/test.exe
working-directory: ${{ github.workspace }}/build
run: .\tests\client_test.exe

- name: Install Cygwin Action
uses: cygwin/cygwin-install-action@v2
Expand Down
6 changes: 3 additions & 3 deletions src/valkeycluster.c
Original file line number Diff line number Diff line change
Expand Up @@ -2494,15 +2494,15 @@ static int command_pre_fragment(valkeyClusterContext *cc, struct cmd *command,
uint32_t len = 0;
char *p;

for (p = sub_kp->end + 1; !isdigit(*p); p++) {
for (p = sub_kp->end + 1; !isdigit((unsigned char)*p); p++) {
}

p = sub_kp->end + 1;
while (!isdigit(*p)) {
while (!isdigit((unsigned char)*p)) {
p++;
}

for (; isdigit(*p); p++) {
for (; isdigit((unsigned char)*p); p++) {
len = len * 10 + (uint32_t)(*p - '0');
}

Expand Down
Loading

0 comments on commit b3713d3

Please sign in to comment.