-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
82 lines (80 loc) · 2.66 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
71
72
73
74
75
76
77
78
79
80
81
82
# Build MEXlibCZI for Windows-x64 and Linux-x64
trigger:
- master
jobs:
- job: Windowsx64
pool:
vmImage: 'windows-latest'
steps:
- task: DownloadSecureFile@1
inputs:
secureFile: 'mlfiles2.zip'
- task: ExtractFiles@1
inputs:
archiveFilePatterns: '$(Agent.TempDirectory)/mlfiles2.zip'
destinationFolder: 'matlabheaders'
cleanDestinationFolder: true
- task: CMake@1
inputs:
workingDirectory: $(Build.SourcesDirectory)/build
cmakeArgs: '.. -A x64 -DCMAKE_BUILD_TYPE=Release -DMEXLIBCZI_HEADERS=$(Build.SourcesDirectory)\matlabheaders\include -DMEXLIBCZI_LIBS=$(Build.SourcesDirectory)\matlabheaders\lib'
- task: CmdLine@2
inputs:
script: 'cmake --build .\build --config Release'
- task: PublishPipelineArtifact@1
inputs:
targetPath: $(Build.SourcesDirectory)/build/MEXlibCZI/Release/MEXlibCZI.mexw64
artifactName: MEXlibCZIWinx64
- script: echo Hello, world!
displayName: 'Run a one-line script'
- job: Linuxx64
pool:
vmImage: 'ubuntu-latest'
steps:
- task: DownloadSecureFile@1
inputs:
secureFile: 'mlfiles2.zip'
- task: ExtractFiles@1
inputs:
archiveFilePatterns: '$(Agent.TempDirectory)/mlfiles2.zip'
destinationFolder: 'matlabheaders'
cleanDestinationFolder: true
- task: CMake@1
inputs:
cmakeArgs: '.. -DCMAKE_BUILD_TYPE=Release -DMEXLIBCZI_HEADERS=$(Build.SourcesDirectory)/matlabheaders/include -DMEXLIBCZI_LIBS=$(Build.SourcesDirectory)/matlabheaders/lib'
- script: |
cmake --build ./build --config Release
displayName: 'Build Linux-x64'
- task: PublishPipelineArtifact@1
inputs:
targetPath: $(Build.SourcesDirectory)/build/MEXlibCZI/MEXlibCZI.mexa64
artifactName: MEXlibCZILinuxx64
- job: Upload_Release
dependsOn:
- Windowsx64
- Linuxx64
pool:
vmImage: 'ubuntu-latest'
steps:
- checkout: none #skip checking out the default repository resource
- task: DownloadPipelineArtifact@2
inputs:
artifact: MEXlibCZILinuxx64
patterns: '**/*'
path: $(Build.ArtifactStagingDirectory)
- task: DownloadPipelineArtifact@2
inputs:
artifact: MEXlibCZIWinx64
patterns: '**/*'
path: $(Build.ArtifactStagingDirectory)
- task: GitHubRelease@0
displayName: 'Create GitHub Release'
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/release-v') # only run this if tag starts with "release-v"
inputs:
gitHubConnection: 'github.com_ptahmose'
repositoryName: 'ptahmose/MEXlibCZI'
action: 'create'
tagSource: manual
tag: $(Build.BuildNumber)
assets: $(Build.ArtifactStagingDirectory)/*
isPreRelease: true