-
Notifications
You must be signed in to change notification settings - Fork 16
/
.azure-pipelines.yml
134 lines (123 loc) · 3.97 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
trigger:
branches:
include:
- main
- release-*
- refs/tags/*
variables:
isRefTag: $[startsWith(variables['Build.SourceBranch'], 'refs/tags')]
isMain: $[eq(variables['Build.SourceBranch'], 'refs/heads/main')]
stages:
- stage: CI
condition: eq(variables.isRefTag, false)
jobs:
- job: Build
strategy:
matrix:
linux:
imageName: 'ubuntu-22.04'
python.version: '3.x'
CXX: g++
BUILD_PYTHON_API: ON
DOWNLOAD_TILEDB_PREBUILT: ON
ARTIFACT_NAME: linux
pool:
vmImage: $(imageName)
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
architecture: 'x64'
- script: printenv
displayName: 'Print Env'
- template: ci/azure-linux_mac.yml
- stage: Docker
condition: or(succeeded(), eq(variables.isRefTag, true))
jobs:
- job: Build
pool:
vmImage: 'ubuntu-22.04'
strategy:
matrix:
cli:
dockerfile: docker/Dockerfile-cli
repository: tiledb/tiledbvcf-cli
context: .
test_cmd: version
python:
dockerfile: docker/Dockerfile-py
repository: tiledb/tiledbvcf-py
context: .
test_cmd: -c "import tiledbvcf; print(tiledbvcf.version)"
steps:
- template: ci/build-images.yml
- stage: BuildNativeLibs
condition: or(eq(variables.isMain, true), eq(variables.isRefTag, true))
jobs:
- job: Linux_OSX
strategy:
matrix:
linux:
imageName: 'ubuntu-22.04'
python.version: '3.x'
CXX: g++
BUILD_PYTHON_API: ON
mac:
imageName: 'macOS-12'
python.version: '3.7'
CXX: clang++
BUILD_PYTHON_API: ON
#SDKROOT: '/Applications/Xcode_10.3.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk'
MACOSX_DEPLOYMENT_TARGET: '11'
pool:
vmImage: $(imageName)
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
architecture: 'x64'
- script: printenv
displayName: 'Print Env'
- template: ci/native_libs-linux_osx.yml
- stage: GitHubRelease
condition: eq(variables.isRefTag, true)
jobs:
- job: All_OS
strategy:
matrix:
ubuntu_18:
imageName: 'ubuntu-22.04'
pool:
vmImage: $(imageName)
steps:
- download: current
patterns: '**/*.tar.gz'
- bash: |
unset SYSTEM
set +e
ci/collect-nativelibs.sh
displayName: 'Collect Native Libraries'
- task: ArchiveFiles@2
inputs:
rootFolderOrFile: '$(Build.BinariesDirectory)'
includeRootFolder: false
archiveType: 'tar' # Options: zip, 7z, tar, wim
tarCompression: 'gz' # Optional. Options: gz, bz2, xz, none
archiveFile: $(Build.ArtifactStagingDirectory)/tiledb-vcf-jar-$(Build.SourceBranchName).tar.gz
replaceExistingArchive: true
verbose: true # Optional
condition: succeeded()
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: $(Build.ArtifactStagingDirectory)/tiledb-vcf-jar-$(Build.SourceBranchName).tar.gz
artifactName: libraries
condition: succeeded()
- task: GithubRelease@0
displayName: 'GitHub Release'
inputs:
gitHubConnection: 'TileDB-Inc-Release'
repositoryName: TileDB-Inc/TileDB-VCF
tag: $(Build.SourceBranchName)
action: "edit"
isDraft: true
assets: $(Build.BinariesDirectory)/jars/*.jar