-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathazure-pipelines.yml
67 lines (62 loc) · 2.24 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
trigger:
branches:
include:
- main
pr:
branches:
include:
- main
pool:
name: Default
demands: LabVIEW
variables:
libssh2.version: '1.11.1'
libssh2.commit: 'a312b43325e3383c865a87bb1d26cb52e3292641'
strategy:
matrix:
'libssh2-1.11.1-x86-debug':
architecture: 'Win32'
source: 'GitHub'
commit: $(libssh2.commit)
config: 'Debug'
'libssh2-1.11.1-x86-release':
architecture: 'Win32'
source: 'GitHub'
commit: $(libssh2.commit)
config: 'Release'
steps:
- task: CmdLine@2
displayName: 'Prepare build configurations'
inputs:
script: cmake -B build/$(architecture) -S . -G "Visual Studio 17 2022" -A $(architecture) -DLIBSSH2_SOURCE=$(source) -DLIBSSH2_COMMIT_HASH=$(commit)
workingDirectory: '$(Build.SourcesDirectory)'
- task: CmdLine@2
displayName: 'Build libraries'
inputs:
script: cmake --build build/$(architecture) --config $(config)
workingDirectory: '$(Build.SourcesDirectory)'
- script: docker compose up -d --force-recreate
displayName: 'Start SSH server'
workingDirectory: '$(Build.SourcesDirectory)/docker'
- task: CmdLine@2
displayName: 'Restore packages'
inputs:
script: 'LabVIEWCLI -LabVIEWPath "%LabVIEW%\LabVIEW.exe" -AdditionalOperationDirectory "$(Build.SourcesDirectory)\Toolchain" -OperationName Restore -Configuration "$(Build.SourcesDirectory)\lvssh2-dev.vipc"'
workingDirectory: '$(Build.SourcesDirectory)'
- task: CmdLine@2
displayName: 'Run tests'
inputs:
script: 'LabVIEWCLI -LabVIEWPath "%LabVIEW%\LabVIEW.exe" -AdditionalOperationDirectory "$(Build.SourcesDirectory)\Toolchain" -OperationName Test -Project "$(Build.SourcesDirectory)\lvssh2.lvproj" -ResultsFolder "$(System.DefaultWorkingDirectory)\TestResults"'
workingDirectory: '$(Build.SourcesDirectory)'
- script: docker compose down
displayName: 'Stop SSH server'
workingDirectory: '$(Build.SourcesDirectory)/docker'
- publish: '$(System.DefaultWorkingDirectory)/docker/openssh-server/config/logs/openssh/current'
displayName: 'Publish SSH server logs'
artifact: server-log-($(Agent.JobName))
- task: PublishTestResults@2
displayName: 'Publish test results'
inputs:
testResultsFormat: 'JUnit'
testResultsFiles: '**/TEST-*.xml'
failTaskOnFailedTests: true