forked from analogdevicesinc/libiio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
179 lines (174 loc) · 5.58 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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
trigger:
- main
- master
- staging/*
- 20*
pr:
- main
- master
- 20*
stages:
- stage: Builds
jobs:
- job: LinuxBuilds
strategy:
matrix:
centos_7_x86_64:
imageName: 'ubuntu-latest'
OS_TYPE: 'centos_docker'
OS_VERSION: centos7
artifactName: 'Linux-CentOS-7-x86_64'
centos_8_x86_64:
imageName: 'ubuntu-latest'
OS_TYPE: 'centos_docker'
OS_VERSION: centos8
artifactName: 'Linux-CentOS-8-x86_64'
ubuntu_16_04_x86_64:
imageName: 'ubuntu-latest'
OS_TYPE: 'ubuntu_docker'
OS_VERSION: xenial
artifactName: 'Linux-Ubuntu-16.04-x86_64'
ubuntu_18_04_x86_64:
imageName: 'ubuntu-latest'
OS_TYPE: 'ubuntu_docker'
OS_VERSION: bionic
artifactName: 'Linux-Ubuntu-18.04-x86_64'
CI_BUILD_SPHINX_DOCS: 1
ubuntu_20_04_x86_64:
imageName: 'ubuntu-latest'
OS_TYPE: 'ubuntu_docker'
OS_VERSION: focal
artifactName: 'Linux-Ubuntu-20.04-x86_64'
CHECK_AGAINST_KERNEL_HEADER: 1
CI_BUILD_SPHINX_DOCS: 1
debian_buster_arm32v7:
imageName: 'ubuntu-latest'
OS_TYPE: 'arm32v7/debian_docker'
OS_VERSION: 'buster'
artifactName: 'Linux-Debian-Buster-ARM'
debian_buster_arm64v8:
imageName: 'ubuntu-latest'
OS_TYPE: 'arm64v8/debian_docker'
OS_VERSION: 'buster'
artifactName: 'Linux-Debian-Buster-ARM64'
pool:
vmImage: $(imageName)
steps:
- checkout: self
fetchDepth: 1
clean: true
- script: ./CI/travis/before_install_linux
displayName: "Install Dependencies"
- script: ./CI/travis/make_linux
displayName: "Build"
- task: CopyFiles@2
inputs:
sourceFolder: '$(Agent.BuildDirectory)/s/build/'
contents: '$(Agent.BuildDirectory)/s/build/?(*.deb|*.rpm)'
targetFolder: '$(Build.ArtifactStagingDirectory)'
- task: PublishPipelineArtifact@1
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
inputs:
targetPath: '$(Build.ArtifactStagingDirectory)'
artifactName: '$(artifactName)'
- job: macOSBuilds
strategy:
matrix:
macOS_10_14:
imageName: 'macOS-10.14'
artifactName: 'macOS-10.14'
macOS_10_15:
imageName: 'macOS-10.15'
artifactName: 'macOS-10.15'
# FIXME: uncomment after this is resolved:
# https://github.com/actions/virtual-environments/issues/2072
# Mac OS X 11.0 is definitely a big thing (with their switch to ARM,
# so we should be quick to have it)
# macOS_11_0:
# imageName: 'macOS-11.0'
# artifactName: 'macOS-11.0'
pool:
vmImage: $(imageName)
steps:
- checkout: self
fetchDepth: 1
clean: true
- script: ./CI/travis/before_install_darwin
displayName: "Install Dependencies"
- script: ./CI/travis/make_darwin
displayName: "Build"
- task: CopyFiles@2
inputs:
sourceFolder: '$(Agent.BuildDirectory)/s/build/'
contents: '$(Agent.BuildDirectory)/s/build/?(*.pkg)'
targetFolder: '$(Build.ArtifactStagingDirectory)'
- task: PublishPipelineArtifact@1
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
inputs:
targetPath: '$(Build.ArtifactStagingDirectory)'
artifactName: '$(artifactName)'
- job: WindowsBuilds
strategy:
matrix:
VS2019_Win32:
imageName: 'windows-2019'
COMPILER: 'Visual Studio 16 2019'
ARCH: 'Win32'
artifactName: 'Windows-VS-16-2019-Win32'
VS2019_Win64:
imageName: 'windows-2019'
COMPILER: 'Visual Studio 16 2019'
ARCH: 'x64'
artifactName: 'Windows-VS-16-2019-x64'
pool:
vmImage: $[ variables['imageName'] ]
steps:
- checkout: self
fetchDepth: 1
clean: true
- task: PowerShell@2
inputs:
targetType: 'filePath'
filePath: .\CI\install_deps_win.ps1
displayName: Dependencies
- task: PowerShell@2
inputs:
targetType: 'filePath'
filePath: .\CI\build_win.ps1
displayName: Build
- task: CopyFiles@2
displayName: 'Copy libraries'
inputs:
sourceFolder: '$(Agent.BuildDirectory)/s/build/Release'
targetFolder: '$(Build.ArtifactStagingDirectory)'
- task: CopyFiles@2
displayName: 'Copy iio.h header'
inputs:
sourceFolder: '$(Agent.BuildDirectory)/s/'
contents: 'iio.h'
targetFolder: '$(Build.ArtifactStagingDirectory)'
- task: PublishPipelineArtifact@1
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
inputs:
targetPath: '$(Build.ArtifactStagingDirectory)'
artifactName: '$(artifactName)'
- stage: PushArtifacts
dependsOn: Builds
jobs:
- job: PushToSWDownloads
pool:
vmImage: 'ubuntu-latest'
steps:
- task: DownloadPipelineArtifact@2
inputs:
path: /home/vsts/work/1/a
- task: DownloadSecureFile@1
name: key
displayName: 'Download rsa key'
inputs:
secureFile: 'id_rsa'
- bash: chmod 600 $(key.secureFilePath) ; scp -2 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o HostKeyAlgorithms=+ssh-dss -vv -i $(key.secureFilePath) -r /home/vsts/work/1/a/* $MAPPED_VAR
env:
MAPPED_VAR: $(SERVER_ADDRESS)
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
displayName: "Push artifacts to SW Downloads"