mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2024-11-10 03:30:39 +03:00
c865103795
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.
48 lines
1.8 KiB
YAML
48 lines
1.8 KiB
YAML
parameters:
|
|
- name: architecture
|
|
type: string
|
|
- name: vcpkgTriplet
|
|
type: string
|
|
- name: vcvarsPath
|
|
type: string
|
|
|
|
steps:
|
|
- task: Cache@2
|
|
inputs:
|
|
key: '"vcpkg-installed-windows-${{parameters.architecture}}"'
|
|
path: 'C:/vcpkg/installed'
|
|
displayName: 'Environment storage'
|
|
- script: |
|
|
vcpkg install openssl zlib --triplet ${{parameters.vcpkgTriplet}}
|
|
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 .
|
|
workingDirectory: $(Build.BinariesDirectory)
|
|
displayName: 'Build'
|
|
- script: |
|
|
mkdir "$(Build.StagingDirectory)/installers"
|
|
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)-${{parameters.architecture}}.exe"
|
|
workingDirectory: $(Build.BinariesDirectory)
|
|
displayName: 'Build installers'
|
|
- powershell: |
|
|
. .ci/appveyor-vpntest.ps1
|
|
displayName: 'Test'
|
|
- task: CopyFiles@2
|
|
inputs:
|
|
sourceFolder: '$(Build.BinariesDirectory)'
|
|
contents: '?(*.exe|*.se2|*.pdb)'
|
|
TargetFolder: '$(Build.StagingDirectory)/binaries'
|
|
flattenFolders: true
|
|
- task: PublishBuildArtifacts@1
|
|
inputs:
|
|
pathtoPublish: '$(Build.StagingDirectory)/binaries'
|
|
artifactName: 'Binaries'
|
|
- task: PublishBuildArtifacts@1
|
|
inputs:
|
|
pathtoPublish: '$(Build.StagingDirectory)/installers'
|
|
artifactName: 'Installers'
|