-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
70 lines (62 loc) · 1.73 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
68
69
70
trigger:
branches:
include:
- '*'
pr: none
strategy:
matrix:
linux:
imageName: 'ubuntu-latest'
mac:
imageName: 'macOS-latest'
windows:
imageName: 'windows-latest'
pool:
vmImage: $(imageName)
steps:
# Build
## Linux or macOS
- task: Bash@3
inputs:
targetType: 'inline'
script: 'mkdir build && cd build && cmake .. && make'
failOnStderr: true
condition: or(eq( variables['Agent.OS'], 'Linux' ) , eq( variables['Agent.OS'], 'Darwin' ) )
## Windows
- task: CMake@1
inputs:
cmakeArgs: '-G"Visual Studio 16 2019" ..'
condition: eq( variables['Agent.OS'], 'Windows_NT' )
- task: VSBuild@1
inputs:
solution: 'build\*.sln'
msbuildArchitecture: 'x64'
condition: eq( variables['Agent.OS'], 'Windows_NT' )
# Test
## Linux or macOS
- task: Bash@3
inputs:
targetType: 'inline'
script: 'cd ./artifacts && ./tests'
failOnStderr: true
condition: or(eq( variables['Agent.OS'], 'Linux' ) , eq( variables['Agent.OS'], 'Darwin' ) )
## Windows
- task: PowerShell@2
inputs:
targetType: 'inline'
script: 'cd artifacts\Debug ; .\tests.exe'
failOnStderr: true
condition: eq( variables['Agent.OS'], 'Windows_NT' )
# Archive && Publish
- task: ArchiveFiles@2
inputs:
rootFolderOrFile: '$(System.DefaultWorkingDirectory)/artifacts'
includeRootFolder: false
archiveType: 'zip'
archiveFile: 'kisyshot-$(Agent.OS)-$(Build.BuildNumber).zip'
replaceExistingArchive: true
- task: PublishPipelineArtifact@1
inputs:
targetPath: 'kisyshot-$(Agent.OS)-$(Build.BuildNumber).zip'
artifact: 'kisyshot-$(Agent.OS)-$(Build.BuildNumber)'
publishLocation: 'pipeline'