修复windows上curl TLCP无法使用的问题 #84
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright (C) 2022 | |
# | |
# SPDX-License-Identifier: curl | |
name: build-with-tongsuo | |
'on': [workflow_dispatch, pull_request, push] | |
jobs: | |
build_linux_macos: | |
runs-on: ${{ matrix.builder }} | |
strategy: | |
matrix: | |
builder: [ubuntu-20.04, macos-latest, macos-13] | |
name: "build-${{ matrix.builder }}" | |
steps: | |
- run: brew install libtool autoconf automake pkg-config | |
if: ${{ matrix.builder == 'macos-latest' || matrix.builder == 'macos-13' }} | |
- run: mv /usr/local/include/openssl /usr/local/include/openssl.bak | |
if: ${{ matrix.builder == 'macos-13' }} | |
- name: build Tongsuo | |
run: | | |
VERSION=8.4.0 | |
wget "https://github.com/Tongsuo-Project/Tongsuo/archive/refs/tags/${VERSION}.tar.gz" | |
tar zxf "${VERSION}.tar.gz" | |
pushd "Tongsuo-${VERSION}" | |
./config --prefix=${GITHUB_WORKSPACE}/tongsuo no-shared enable-ntls enable-ssl-trace --release | |
make -s -j4 | |
make install_sw | |
popd | |
- uses: actions/checkout@v2 | |
with: | |
path: curl | |
fetch-depth: 0 | |
- name: build curl | |
working-directory: ./curl | |
run: | | |
git apply tongsuo.patch | |
autoreconf -fi | |
./configure --enable-warnings --enable-werror --with-openssl=${GITHUB_WORKSPACE}/tongsuo --without-zlib --without-brotli --disable-shared --disable-ldap --disable-ldaps --disable-rtsp --without-librtmp --without-libpsl --enable-static | |
make -s -j4 | |
make V=1 examples | |
make V=1 -C tests | |
make V=1 test-ci | |
./src/curl --help tls | grep tlcp | |
build_windows: | |
runs-on: windows-latest | |
steps: | |
- run: choco install -y winrar | |
- uses: ilammy/msvc-dev-cmd@v1 | |
with: | |
arch: win64 | |
- uses: ilammy/setup-nasm@v1 | |
with: | |
platform: win64 | |
- uses: shogo82148/actions-setup-perl@v1 | |
- name: Export env | |
shell: bash | |
run: | | |
VERSION=8.4.0 | |
echo "TONGSUO_VERSION=${VERSION}" >> $GITHUB_ENV | |
echo "TONGSUO_HOME=${GITHUB_WORKSPACE}\tongsuo${VERSION}" >> $GITHUB_ENV | |
- name: Download Tongsuo source | |
run: | | |
wget "https://github.com/Tongsuo-Project/Tongsuo/archive/refs/tags/${env:TONGSUO_VERSION}.tar.gz" -OutFile "${env:TONGSUO_VERSION}.tar.gz" | |
shell: powershell | |
- run: '"C:\Program Files\WinRAR\WinRAR.exe" -INUL x %TONGSUO_VERSION%.tar.gz' | |
shell: cmd | |
- name: Build Tongsuo | |
shell: cmd | |
run: | | |
pushd "Tongsuo-%TONGSUO_VERSION%" | |
mkdir _build | |
pushd _build | |
perl ..\Configure no-makedepend no-shared enable-ntls enable-ssl-trace VC-WIN64A --prefix=%TONGSUO_HOME% --release | |
nmake /S | |
nmake install_sw | |
popd | |
popd | |
- uses: actions/checkout@v2 | |
with: | |
path: curl | |
fetch-depth: 0 | |
- name: build curl | |
working-directory: ./curl | |
shell: powershell | |
run: | | |
git apply --reject tongsuo.patch | |
./buildconf.bat | |
cd winbuild | |
nmake /f Makefile.vc MACHINE=x64 mode=static WITH_SSL=static SSL_PATH=${env:TONGSUO_HOME} RTLIBCFG=static ENABLE_NTLS=yes | |
cd .. | |
builds\libcurl-vc-x64-release-static-ssl-static-ipv6-sspi\bin\curl.exe --help tls | findstr tlcp |