Skip to content

Commit a4a6916

Browse files
committed
chore: use MSYS2 for windows
1 parent 8e665aa commit a4a6916

File tree

2 files changed

+19
-12
lines changed

2 files changed

+19
-12
lines changed

.github/workflows/_test.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,16 @@ jobs:
5757
if: runner.os == 'Windows'
5858
uses: microsoft/setup-msbuild@v2
5959

60-
- name: Install nghttp2 (Windows)
60+
- name: Setup MSYS2 and install nghttp2 (Windows)
6161
if: runner.os == 'Windows'
62-
run: |
63-
# Install nghttp2 via chocolatey (simpler than vcpkg)
64-
# Note: This installs the shared library version
65-
curl -L https://github.com/nghttp2/nghttp2/releases/download/v1.59.0/nghttp2-1.59.0-win64.zip -o nghttp2.zip
66-
unzip nghttp2.zip -d C:/nghttp2
67-
echo "NGHTTP2_ROOT=C:/nghttp2/nghttp2-1.59.0-win64" >> $GITHUB_ENV
68-
shell: bash
62+
uses: msys2/setup-msys2@v2
63+
with:
64+
update: true
65+
install: >-
66+
mingw-w64-x86_64-nghttp2
67+
mingw-w64-x86_64-gcc
68+
mingw-w64-x86_64-cmake
69+
mingw-w64-x86_64-ninja
6970
7071
- name: Cache vendor dependencies
7172
id: cache-vendor

scripts/setup_vendors.sh

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,14 @@ echo "==> Setting up nghttp2..."
137137
if [ "$OS" = "Darwin" ] && command -v brew &> /dev/null && brew list libnghttp2 &> /dev/null; then
138138
echo "✓ Using Homebrew's libnghttp2"
139139
echo " Location: $(brew --prefix libnghttp2)"
140-
# On Windows, use vcpkg or skip (to be implemented)
140+
# On Windows with MSYS2, use the MSYS2 package
141+
elif [ "$OS" = "Windows" ] && [ -d "/mingw64/include/nghttp2" ]; then
142+
echo "✓ Using MSYS2's nghttp2"
143+
echo " Location: /mingw64"
144+
# On Windows without MSYS2, skip
141145
elif [ "$OS" = "Windows" ]; then
142-
echo "⊘ nghttp2 on Windows requires manual setup via vcpkg"
143-
echo " Run: vcpkg install nghttp2:x64-windows"
146+
echo "⊘ nghttp2 on Windows requires MSYS2 or vcpkg"
147+
echo " Run: pacman -S mingw-w64-x86_64-nghttp2 (MSYS2)"
144148
else
145149
# Build from source on Linux or if Homebrew version not available
146150
if [ ! -d "nghttp2" ]; then
@@ -194,8 +198,10 @@ if [ "$OS" = "Linux" ]; then
194198
fi
195199
if [ "$OS" = "Darwin" ] && command -v brew &> /dev/null && brew list libnghttp2 &> /dev/null; then
196200
echo " ✓ nghttp2: $(brew --prefix libnghttp2) (Homebrew)"
201+
elif [ "$OS" = "Windows" ] && [ -d "/mingw64/include/nghttp2" ]; then
202+
echo " ✓ nghttp2: /mingw64 (MSYS2)"
197203
elif [ "$OS" = "Windows" ]; then
198-
echo " ⊘ nghttp2: Install via vcpkg (nghttp2:x64-windows)"
204+
echo " ⊘ nghttp2: Install via MSYS2 (mingw-w64-x86_64-nghttp2)"
199205
else
200206
echo " ✓ nghttp2: $VENDOR_DIR/nghttp2/install"
201207
fi

0 commit comments

Comments
 (0)