mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2024-11-22 09:29:52 +03:00
Azure Pipelines: install OpenSSL and zlib through vcpkg on Windows
This commit also changes the x86 build so that it uses the "amd64_x86" toolchain, for potentially better build performance. The architecture is now appended to the installers.
This commit is contained in:
parent
60410accce
commit
c865103795
@ -1,22 +1,35 @@
|
|||||||
parameters:
|
parameters:
|
||||||
- name: bits
|
- name: architecture
|
||||||
|
type: string
|
||||||
|
- name: vcpkgTriplet
|
||||||
|
type: string
|
||||||
|
- name: vcvarsPath
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- task: Cache@2
|
||||||
|
inputs:
|
||||||
|
key: '"vcpkg-installed-windows-${{parameters.architecture}}"'
|
||||||
|
path: 'C:/vcpkg/installed'
|
||||||
|
displayName: 'Environment storage'
|
||||||
- script: |
|
- script: |
|
||||||
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars${{parameters.bits}}.bat"
|
vcpkg install openssl zlib --triplet ${{parameters.vcpkgTriplet}}
|
||||||
cmake -G "Ninja" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl $(Build.SourcesDirectory)
|
workingDirectory: C:/vcpkg
|
||||||
|
displayName: 'Prepare environment'
|
||||||
|
- script: |
|
||||||
|
call "${{parameters.vcvarsPath}}"
|
||||||
|
cmake -G "Ninja" -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=${{parameters.vcpkgTriplet}} -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl $(Build.SourcesDirectory)
|
||||||
cmake --build .
|
cmake --build .
|
||||||
workingDirectory: $(Build.BinariesDirectory)
|
workingDirectory: $(Build.BinariesDirectory)
|
||||||
displayName: 'Build'
|
displayName: 'Build'
|
||||||
- script: |
|
- script: |
|
||||||
mkdir "$(Build.StagingDirectory)/installers"
|
mkdir "$(Build.StagingDirectory)/installers"
|
||||||
vpnsetup /SFXMODE:vpnclient /SFXOUT:"$(Build.StagingDirectory)/installers/softether-vpnclient-$(Build.SourceVersion).exe"
|
vpnsetup /SFXMODE:vpnclient /SFXOUT:"$(Build.StagingDirectory)/installers/softether-vpnclient-$(Build.SourceVersion)-${{parameters.architecture}}.exe"
|
||||||
vpnsetup /SFXMODE:vpnserver_vpnbridge /SFXOUT:"$(Build.StagingDirectory)/installers/softether-vpnserver_vpnbridge-$(Build.SourceVersion).exe"
|
vpnsetup /SFXMODE:vpnserver_vpnbridge /SFXOUT:"$(Build.StagingDirectory)/installers/softether-vpnserver_vpnbridge-$(Build.SourceVersion)-${{parameters.architecture}}.exe"
|
||||||
workingDirectory: $(Build.BinariesDirectory)
|
workingDirectory: $(Build.BinariesDirectory)
|
||||||
displayName: 'Build installers'
|
displayName: 'Build installers'
|
||||||
- powershell: |
|
- powershell: |
|
||||||
. .ci\appveyor-vpntest.ps1
|
. .ci/appveyor-vpntest.ps1
|
||||||
displayName: 'Test'
|
displayName: 'Test'
|
||||||
- task: CopyFiles@2
|
- task: CopyFiles@2
|
||||||
inputs:
|
inputs:
|
||||||
|
@ -6,7 +6,9 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- template: "azure-pipelines-win-steps.yml"
|
- template: "azure-pipelines-win-steps.yml"
|
||||||
parameters:
|
parameters:
|
||||||
bits: "64"
|
architecture: "x86_64"
|
||||||
|
vcpkgTriplet: "x64-windows-static-md"
|
||||||
|
vcvarsPath: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars64.bat"
|
||||||
- job: windows_x86
|
- job: windows_x86
|
||||||
displayName: 'Windows (x86)'
|
displayName: 'Windows (x86)'
|
||||||
pool:
|
pool:
|
||||||
@ -14,4 +16,6 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- template: "azure-pipelines-win-steps.yml"
|
- template: "azure-pipelines-win-steps.yml"
|
||||||
parameters:
|
parameters:
|
||||||
bits: "32"
|
architecture: "x86"
|
||||||
|
vcpkgTriplet: "x86-windows-static-md"
|
||||||
|
vcvarsPath: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvarsamd64_x86.bat"
|
||||||
|
Loading…
Reference in New Issue
Block a user