@@ -28,33 +28,43 @@ runs:
2828 brew install curl
2929 echo "CURL_ROOT=$(brew --prefix curl)" >> $GITHUB_OUTPUT
3030
31- # Windows: Download pre-built binaries from curl.se
31+ # Windows: Build CURL from source with MSVC
3232 - name : Install CURL for Windows
3333 if : runner.os == 'Windows'
3434 id : windows-action
3535 shell : pwsh
3636 run : |
37- # Download CURL 8.16.0 with OpenSSL for Windows (MinGW build, compatible with MSVC)
38- $url = "https://curl.se/windows/dl-8.16.0_6/curl-8.16.0_6-win64-mingw.zip"
39- $output = "curl.zip"
37+ Write-Host "Building CURL from source with MSVC..."
4038
41- Write-Host "Downloading CURL from $url"
39+ # Download CURL source
40+ $version = "8.11.1"
41+ $url = "https://curl.se/download/curl-$version.tar.gz"
42+ $output = "curl-$version.tar.gz"
43+
44+ Write-Host "Downloading CURL $version source from $url"
4245 Invoke-WebRequest -Uri $url -OutFile $output -MaximumRetryCount 3 -RetryIntervalSec 5
4346
44- # Verify the download
45- $fileInfo = Get-Item $output
46- Write-Host "Downloaded file size: $($fileInfo.Length) bytes"
47+ # Extract
48+ Write-Host "Extracting..."
49+ tar -xzf $output
50+
51+ # Build with CMake (MSVC)
52+ cd "curl-$version"
4753
48- # Extract to C:\curl-install
49- Write-Host "Extracting CURL archive..."
50- Expand-Archive -Path $output -DestinationPath "C:\curl-install" -Force
54+ Write-Host "Configuring CURL with CMake..."
55+ cmake -G "Visual Studio 17 2022" -A x64 `
56+ -DCMAKE_INSTALL_PREFIX="C:\curl-install" `
57+ -DBUILD_SHARED_LIBS=OFF `
58+ -DCURL_USE_SCHANNEL=ON `
59+ -DCURL_DISABLE_TESTS=ON `
60+ -DBUILD_TESTING=OFF `
61+ -S . -B build
5162
52- # Verify extraction
53- Write-Host "Extracted contents:"
54- Get-ChildItem -Path "C:\curl-install" -Recurse -Depth 1
63+ Write-Host "Building CURL..."
64+ cmake --build build --config Release --target install
5565
56- # The archive extracts to a subdirectory named curl-8.16.0_6-win64-mingw
57- echo "CURL_ROOT=C:\curl-install\curl-8.16.0_6-win64-mingw " >> $env:GITHUB_OUTPUT
66+ Write-Host "CURL installed to C:\ curl-install"
67+ echo "CURL_ROOT=C:\curl-install" >> $env:GITHUB_OUTPUT
5868
5969 - name : Determine root
6070 id : determine-root
0 commit comments