Skip to content

Commit

Permalink
fix: hiredis build on window workflow (#615)
Browse files Browse the repository at this point in the history
* Update build-and-test.yml

* Update build-and-test.yml

* Update build-and-test.yml

* Fix windows workflow build issue

* fix: hiredis build on window
  • Loading branch information
ozennou authored Jan 20, 2025
1 parent 2a9f55b commit 75a75ec
Showing 1 changed file with 24 additions and 4 deletions.
28 changes: 24 additions & 4 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ name: build and test
on:
push:
branches: [ "master", "dev" ]
paths-ignore:
- '**/*.md'
pull_request:
branches: [ "master", "dev" ]
paths-ignore:
- '**/*.md'

jobs:
build:
Expand Down Expand Up @@ -32,7 +36,7 @@ jobs:
cpp_compiler: clang++

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: libuv-dep
run: sudo apt-get update && sudo apt-get install -y libuv1-dev wget unzip
Expand Down Expand Up @@ -77,11 +81,27 @@ jobs:
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: install deps
- name: Install ninja and memurai
run: choco install -y ninja memurai-developer

- name: Set up vcpkg
run: |
git clone https://github.com/microsoft/vcpkg.git vcpkg
.\vcpkg\bootstrap-vcpkg.bat
- name: Install Hiredis using vcpkg
run: .\vcpkg\vcpkg install hiredis

- 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
run: |
mkdir build
cd build
cmake -G Ninja `
-DCMAKE_BUILD_TYPE=Release `
-DCMAKE_PREFIX_PATH="${{ github.workspace }}/install;${{ github.workspace }}/vcpkg/installed/x64-windows" `
.. && `
ninja -v && `
ninja install

0 comments on commit 75a75ec

Please sign in to comment.