mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2024-11-10 03:30:39 +03:00
a8fdc1184a
Now that we can successfully compile with Clang, there's probably no reason to stick with MSVC.
50 lines
1.9 KiB
YAML
50 lines
1.9 KiB
YAML
parameters:
|
|
- name: architecture
|
|
type: string
|
|
- name: compilerPath
|
|
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="${{parameters.compilerPath}}" -DCMAKE_CXX_COMPILER="${{parameters.compilerPath}}" $(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'
|