mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2024-08-24 21:43:00 +03:00
Azure Pipelines: improve steps, use Ninja and designated build directory
This commit is contained in:
parent
c948f65850
commit
6801e4b384
@ -2,11 +2,13 @@
|
||||
|
||||
set -eux
|
||||
|
||||
sudo dpkg -i build/softether-common*.deb
|
||||
sudo dpkg -i build/softether-vpnbridge*.deb
|
||||
sudo dpkg -i build/softether-vpnclient*.deb
|
||||
sudo dpkg -i build/softether-vpncmd*.deb
|
||||
sudo dpkg -i build/softether-vpnserver*.deb
|
||||
BUILD_BINARIESDIRECTORY="${BUILD_BINARIESDIRECTORY:-build}"
|
||||
|
||||
sudo dpkg -i $BUILD_BINARIESDIRECTORY/softether-common*.deb
|
||||
sudo dpkg -i $BUILD_BINARIESDIRECTORY/softether-vpnbridge*.deb
|
||||
sudo dpkg -i $BUILD_BINARIESDIRECTORY/softether-vpnclient*.deb
|
||||
sudo dpkg -i $BUILD_BINARIESDIRECTORY/softether-vpncmd*.deb
|
||||
sudo dpkg -i $BUILD_BINARIESDIRECTORY/softether-vpnserver*.deb
|
||||
|
||||
sudo systemctl restart softether-vpnserver || (sudo journalctl -xe --no-pager >> systemctl.log && appveyor PushArtifact systemctl.log && exit 1)
|
||||
|
||||
|
@ -1,20 +1,25 @@
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
if (Test-Path "env:BUILD_BINARIESDIRECTORY") {
|
||||
$BUILD_BINARIESDIRECTORY = $env:BUILD_BINARIESDIRECTORY
|
||||
} else {
|
||||
$BUILD_BINARIESDIRECTORY = "build"
|
||||
}
|
||||
|
||||
# ('s', 'c', 'b', 'sm', 'cm') ??
|
||||
('s', 'c', 'b') | % {
|
||||
|
||||
[String] $mode = $_
|
||||
Write-Host "testing: $mode"
|
||||
|
||||
$full = (Write-Output "q\n" | & .\build\vpntest.exe $mode)
|
||||
$full = (Write-Output "q\n" | & "$BUILD_BINARIESDIRECTORY\vpntest.exe" $mode)
|
||||
$t = ($full | Select-String -Pattern 'NO MEMORY LEAKS' -CaseSensitive)
|
||||
|
||||
if( ($t).Count -ne 1){
|
||||
if (($t).Count -ne 1) {
|
||||
$full
|
||||
Write-Error 'failed'
|
||||
return $false
|
||||
}else{
|
||||
} else {
|
||||
Write-Host 'ok'
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -3,15 +3,17 @@ jobs:
|
||||
displayName: 'Ubuntu (x86_64)'
|
||||
pool:
|
||||
vmImage: ubuntu-16.04
|
||||
variables:
|
||||
CPACK_GENERATOR: DEB
|
||||
steps:
|
||||
- script: |
|
||||
sudo apt -y install cmake gcc g++ libncurses5-dev libreadline-dev libssl-dev make zlib1g-dev
|
||||
./configure
|
||||
make package -C build -j $(nproc || sysctl -n hw.ncpu || echo 4)
|
||||
cd $BUILD_BINARIESDIRECTORY
|
||||
sudo apt -y install cmake gcc g++ ninja-build libncurses5-dev libreadline-dev libssl-dev make zlib1g-dev
|
||||
cmake -G "Ninja" -DCMAKE_BUILD_TYPE=RelWithDebInfo $BUILD_SOURCESDIRECTORY
|
||||
cmake --build .
|
||||
cpack -C Release -G DEB
|
||||
displayName: 'Build'
|
||||
- script: |
|
||||
.ci/appveyor-deb-install-test.sh
|
||||
sudo apt-get -y install autoconf libtool liblzo2-dev libpam-dev fping unzip # openvpn build deps
|
||||
sudo .ci/start-se-openvpn.sh
|
||||
sudo .ci/run-openvpn-tests.sh
|
||||
displayName: 'Ubuntu 16.04'
|
||||
sudo apt-get -y install autoconf libtool liblzo2-dev libpam-dev fping unzip # To build OpenVPN
|
||||
sudo BUILD_BINARIESDIRECTORY=$BUILD_BINARIESDIRECTORY .ci/start-se-openvpn.sh
|
||||
sudo BUILD_BINARIESDIRECTORY=$BUILD_BINARIESDIRECTORY .ci/run-openvpn-tests.sh
|
||||
displayName: 'Test'
|
||||
|
@ -5,22 +5,21 @@ jobs:
|
||||
vmImage: vs2017-win2016
|
||||
steps:
|
||||
- script: |
|
||||
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
|
||||
configure
|
||||
- script: |
|
||||
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
|
||||
cd build
|
||||
nmake
|
||||
cd /d %BUILD_BINARIESDIRECTORY%
|
||||
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
|
||||
cmake -G "Ninja" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_C_COMPILER=cl "-DCMAKE_CXX_COMPILER=cl" %BUILD_SOURCESDIRECTORY%
|
||||
cmake --build .
|
||||
displayName: 'Build'
|
||||
- powershell: |
|
||||
. .ci\appveyor-vpntest.ps1
|
||||
- powershell: |
|
||||
New-Item -Path '$(build.artifactstagingdirectory)/publish' -ItemType Directory
|
||||
. .ci\appveyor-vpntest.ps1
|
||||
displayName: 'Test'
|
||||
- task: CopyFiles@2
|
||||
inputs:
|
||||
sourceFolder: '$(Build.SourcesDirectory)'
|
||||
contents: 'build/?(*.exe|*.se2|*.pdb)'
|
||||
TargetFolder: '$(build.artifactstagingdirectory)/publish'
|
||||
sourceFolder: '$(Build.BinariesDirectory)'
|
||||
contents: '?(*.exe|*.se2|*.pdb)'
|
||||
TargetFolder: '$(Build.StagingDirectory)'
|
||||
flattenFolders: true
|
||||
- task: PublishBuildArtifacts@1
|
||||
inputs:
|
||||
pathtoPublish: '$(build.artifactstagingdirectory)/publish'
|
||||
artifactName: vs2017
|
||||
pathtoPublish: '$(Build.StagingDirectory)'
|
||||
artifactName: 'Binaries'
|
||||
|
@ -2,7 +2,10 @@
|
||||
|
||||
set -eux
|
||||
|
||||
cd
|
||||
BUILD_BINARIESDIRECTORY="${BUILD_BINARIESDIRECTORY:-build}"
|
||||
|
||||
cd $BUILD_BINARIESDIRECTORY
|
||||
|
||||
git clone https://github.com/openvpn/openvpn
|
||||
cd openvpn
|
||||
autoreconf -iv
|
||||
|
@ -2,13 +2,17 @@
|
||||
|
||||
set -eux
|
||||
|
||||
build/vpnserver start
|
||||
BUILD_BINARIESDIRECTORY="${BUILD_BINARIESDIRECTORY:-build}"
|
||||
|
||||
build/vpncmd 127.0.0.1:443 /SERVER /HUB:DEFAULT /CMD:SecureNatEnable
|
||||
build/vpncmd 127.0.0.1:443 /SERVER /CMD:"OpenVpnEnable yes"
|
||||
build/vpncmd 127.0.0.1:443 /SERVER /CMD:"PortsUDPSet 1194"
|
||||
build/vpncmd 127.0.0.1:443 /SERVER /HUB:DEFAULT /CMD:"UserCreate test /GROUP:none /REALNAME:none /NOTE:none"
|
||||
build/vpncmd 127.0.0.1:443 /SERVER /HUB:DEFAULT /CMD:"UserPasswordSet test /PASSWORD:test"
|
||||
build/vpncmd 127.0.0.1:443 /SERVER /CMD:"OpenVpnMakeConfig ~/my_openvpn_config.zip"
|
||||
cd $BUILD_BINARIESDIRECTORY
|
||||
|
||||
unzip -d /tmp ~/my_openvpn_config.zip
|
||||
./vpnserver start
|
||||
|
||||
./vpncmd 127.0.0.1:443 /SERVER /HUB:DEFAULT /CMD:SecureNatEnable
|
||||
./vpncmd 127.0.0.1:443 /SERVER /CMD:"OpenVpnEnable yes"
|
||||
./vpncmd 127.0.0.1:443 /SERVER /CMD:"PortsUDPSet 1194"
|
||||
./vpncmd 127.0.0.1:443 /SERVER /HUB:DEFAULT /CMD:"UserCreate test /GROUP:none /REALNAME:none /NOTE:none"
|
||||
./vpncmd 127.0.0.1:443 /SERVER /HUB:DEFAULT /CMD:"UserPasswordSet test /PASSWORD:test"
|
||||
./vpncmd 127.0.0.1:443 /SERVER /CMD:"OpenVpnMakeConfig my_openvpn_config.zip"
|
||||
|
||||
unzip -d /tmp my_openvpn_config.zip
|
||||
|
Loading…
Reference in New Issue
Block a user