Skip to content

Commit 1459cd9

Browse files
runonthespotclaude
andcommitted
fix: use vcpkg for Windows OpenSSL instead of vendored compilation
- Remove Windows GNU target (x86_64-pc-windows-gnu) - Switch from Strawberry Perl + vendored OpenSSL to vcpkg approach - Install pre-built static OpenSSL libraries via vcpkg for Windows - Use architecture-specific vcpkg packages (x64/arm64-windows-static) - Keep vendored OpenSSL for Unix platforms (Linux/macOS) - This eliminates all Perl module compilation issues on Windows 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent b1c0770 commit 1459cd9

1 file changed

Lines changed: 18 additions & 16 deletions

File tree

.github/workflows/release.yml

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,6 @@ jobs:
7575
target: x86_64-pc-windows-msvc
7676
use-cross: false
7777

78-
- build: windows-x86_64-gnu
79-
os: windows-latest
80-
target: x86_64-pc-windows-gnu
81-
use-cross: false
82-
8378
- build: windows-aarch64
8479
os: windows-latest
8580
target: aarch64-pc-windows-msvc
@@ -103,14 +98,17 @@ jobs:
10398
- name: Install build dependencies (Windows)
10499
if: matrix.os == 'windows-latest'
105100
run: |
106-
# Install Strawberry Perl for OpenSSL compilation
107-
choco install strawberryperl -y
108-
# Add Strawberry Perl to PATH at the beginning
109-
echo "C:\strawberry\perl\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
110-
echo "C:\strawberry\c\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
111-
# Verify Perl installation
112-
C:\strawberry\perl\bin\perl.exe -v
113-
shell: pwsh
101+
# Install vcpkg and OpenSSL instead of building from source
102+
git clone https://github.com/Microsoft/vcpkg.git C:\vcpkg
103+
cd C:\vcpkg
104+
.\bootstrap-vcpkg.bat
105+
if [ "${{ matrix.target }}" = "aarch64-pc-windows-msvc" ]; then
106+
.\vcpkg install openssl:arm64-windows-static
107+
else
108+
.\vcpkg install openssl:x64-windows-static
109+
fi
110+
echo "VCPKG_ROOT=C:\vcpkg" >> $GITHUB_ENV
111+
shell: bash
114112

115113
- name: Install cross
116114
if: matrix.use-cross
@@ -127,12 +125,16 @@ jobs:
127125
shell: bash
128126

129127
- name: Build release binary
128+
env:
129+
# Use vcpkg OpenSSL on Windows instead of vendored
130+
OPENSSL_DIR: ${{ matrix.os == 'windows-latest' && env.VCPKG_ROOT && format('{0}/installed/{1}', env.VCPKG_ROOT, matrix.target == 'aarch64-pc-windows-msvc' && 'arm64-windows-static' || 'x64-windows-static') || '' }}
130131
run: |
131-
# Use sccache's exact approach: enable openssl/vendored feature
132-
# Skip vendored OpenSSL for Windows GNU due to potential compatibility issues
133-
if [ "${{ matrix.target }}" = "x86_64-pc-windows-gnu" ]; then
132+
# Use different OpenSSL strategies per platform
133+
if [ "${{ matrix.os }}" = "windows-latest" ]; then
134+
# Use vcpkg OpenSSL on Windows (no vendored feature needed)
134135
${{ env.CARGO_CMD }} build --locked --release --target ${{ matrix.target }} --package ck-search
135136
else
137+
# Use vendored OpenSSL on Unix platforms
136138
${{ env.CARGO_CMD }} build --locked --release --target ${{ matrix.target }} --package ck-search --features=openssl/vendored
137139
fi
138140
shell: bash

0 commit comments

Comments
 (0)