-
Notifications
You must be signed in to change notification settings - Fork 145
/
azure-pipelines.yml
223 lines (216 loc) · 7.54 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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
variables:
libiioPipelineId: 9
libad9361iioPipelineId: 10
libad9166iioPipelineId: 41
trigger:
branches:
include:
- main
- master
- staging/*
- 20*
tags:
include:
- v*
pr:
branches:
include:
- main
- master
- 20*
stages:
- stage: Builds
#############################################
# Builds
#############################################
jobs:
- job: LinuxBuilds
strategy:
matrix:
ubuntu_20_04_x86_64:
imageName: 'ubuntu-20.04'
OS_TYPE: 'ubuntu_docker'
OS_VERSION: focal
artifactName: 'Linux-Ubuntu-20.04'
PACKAGE_TO_INSTALL: 'download/*.deb'
ubuntu_22_04_x86_64:
imageName: 'ubuntu-22.04'
OS_TYPE: 'ubuntu_docker'
OS_VERSION: jammy
artifactName: 'Linux-Ubuntu-22.04'
PACKAGE_TO_INSTALL: 'download/*.deb'
pool:
vmImage: $(imageName)
steps:
- checkout: self
fetchDepth: 1
clean: true
persistCredentials: true
- task: DownloadPipelineArtifact@2
inputs:
source: 'specific'
project: '$(System.TeamProjectId)'
pipeline: $(libiioPipelineId)
artifact: '$(artifactName)'
runVersion: 'latestFromBranch'
runBranch: 'refs/heads/libiio-v0'
path: '$(Agent.BuildDirectory)/s/download/'
displayName: 'Get libiio artifacts'
- task: DownloadPipelineArtifact@2
inputs:
source: 'specific'
project: '$(System.TeamProjectId)'
pipeline: $(libad9361iioPipelineId)
artifact: '$(artifactName)'
runVersion: 'latestFromBranch'
runBranch: 'refs/heads/libad9361-iio-v0'
path: '$(Agent.BuildDirectory)/s/download/'
displayName: 'Get libad9361-iio artifacts'
- task: DownloadPipelineArtifact@2
inputs:
source: 'specific'
project: '$(System.TeamProjectId)'
pipeline: $(libad9166iioPipelineId)
artifact: '$(artifactName)'
runVersion: 'latestFromBranch'
runBranch: 'refs/heads/libad9166-iio-v0'
path: '$(Agent.BuildDirectory)/s/download/'
displayName: 'Get libad9166-iio artifacts'
- script: |
./CI/azure/build_osc_ubuntu.sh install_apt_pkgs
./CI/azure/build_osc_ubuntu.sh install_adi_debs
./CI/azure/build_osc_ubuntu.sh install_gtkdatabox
displayName: 'Install Dependencies'
- script: |
./CI/azure/build_osc_ubuntu.sh build_osc
displayName: "Build"
- task: PublishPipelineArtifact@1
inputs:
targetPath: '$(Build.ArtifactStagingDirectory)'
artifactName: '$(artifactName)'
#######################################
- job: ARMBuilds
# Host Box
pool:
vmImage: "ubuntu-latest"
# Docker Images
strategy:
matrix:
ubuntu-ppc64le:
image: tfcollins/libiio_ubuntu_18_04-ci-arm-ppc:latest
arch: ppc64le
artifactName: 'Ubuntu-ppc64le'
ubuntu-x390x:
image: tfcollins/libiio_ubuntu_18_04-ci-arm-ppc:latest
arch: s390x
artifactName: 'Ubuntu-x390x'
debian_buster_arm32v7:
image: tfcollins/libiio_ubuntu_18_04-ci-arm-ppc:latest
arch: arm
artifactName: 'Ubuntu-arm32v7'
debian_buster_arm64v8:
image: tfcollins/libiio_ubuntu_18_04-ci-arm-ppc:latest
arch: aarch64
artifactName: 'Ubuntu-arm64v8'
steps:
- checkout: self
fetchDepth: 1
clean: true
- task: DownloadPipelineArtifact@2
inputs:
source: 'specific'
project: '$(System.TeamProjectId)'
pipeline: $(libiioPipelineId)
artifact: '$(artifactName)'
runVersion: 'latestFromBranch'
runBranch: 'refs/heads/libiio-v0'
path: '$(Agent.BuildDirectory)/s/download/'
displayName: 'Get libiio artifacts'
- task: DownloadPipelineArtifact@2
inputs:
source: 'specific'
project: '$(System.TeamProjectId)'
pipeline: $(libad9361iioPipelineId)
artifact: '$(artifactName)'
runVersion: 'latestFromBranch'
runBranch: 'refs/heads/libad9361-iio-v0'
path: '$(Agent.BuildDirectory)/s/download/'
displayName: 'Get libad9361-iio artifacts'
- task: DownloadPipelineArtifact@2
inputs:
source: 'specific'
project: '$(System.TeamProjectId)'
pipeline: $(libad9166iioPipelineId)
artifact: '$(artifactName)'
runVersion: 'latestFromBranch'
runBranch: 'refs/heads/libad9166-iio-v0'
path: '$(Agent.BuildDirectory)/s/download/'
displayName: 'Get libad9166-iio artifacts'
- script: |
set -e
sudo apt-get update
sudo apt-get install -y gcc-arm-linux-gnueabihf libc6-dev-armhf-cross
sudo apt-get install -y g++-arm-linux-gnueabihf
sudo apt-get install -y g++-aarch64-linux-gnu
sudo apt-get install -y qemu-system-ppc64
sudo apt-get install qemu binfmt-support qemu-user-static
sudo docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
displayName: "Setup"
- script: |
set -e
sudo docker run -m=4g --name iio-oscilloscope --platform "linux/$(arch)" -e ARTIFACTNAME=$(artifactName) -v "$(Agent.BuildDirectory)/s":"/ci" -v "/usr/bin/qemu-$(arch)-static":"/usr/bin/qemu-$(arch)-static" "$(image)" /bin/bash -c "cd /ci/ && chmod +x ./CI/azure/build_osc_arm.sh && ./CI/azure/build_osc_arm.sh install_apt_pkgs && ./CI/azure/build_osc_arm.sh install_gtkdatabox && ./CI/azure/build_osc_arm.sh install_adi_debs && ./CI/azure/build_osc_arm.sh build_osc"
sudo docker ps -a
displayName: "Install dependencies + build"
- task: PublishPipelineArtifact@1
inputs:
targetPath: '$(Build.ArtifactStagingDirectory)'
artifactName: '$(artifactName)'
#########################################
# !!! Uncomment macOSBuilds when will be added fixes on development side !!!
#- job: macOSBuilds
#strategy:
#matrix:
#macOS_11:
#imageName: 'macOS-11'
#artifactName: 'macOS-11'
#macOS_12:
#imageName: 'macOS-12'
#artifactName: 'macOS-12'
#pool:
#vmImage: $(imageName)
#steps:
#- checkout: self
#fetchDepth: 1
#clean: true
#- task: DownloadPipelineArtifact@2
#inputs:
#source: 'specific'
#project: '$(System.TeamProjectId)'
#pipeline: $(libad9361iioPipelineId)
#artifact: '$(artifactName)'
#runVersion: 'latestFromBranch'
#runBranch: 'refs/heads/master'
#path: '$(Agent.BuildDirectory)/s/download/'
#displayName: 'Get libad9361-iio artifacts'
#- task: DownloadPipelineArtifact@2
#inputs:
#source: 'specific'
#project: '$(System.TeamProjectId)'
#pipeline: $(libad9166iioPipelineId)
#artifact: '$(artifactName)'
#runVersion: 'latestFromBranch'
#runBranch: 'refs/heads/master'
#path: '$(Agent.BuildDirectory)/s/download/'
#displayName: 'Get libad9166-iio artifacts'
#- script: |
#echo ${CMAKE_CXX_COMPILER_VERSION}
#./CI/azure/build_osc_darwin.sh install_deps
#./CI/azure/build_osc_darwin.sh install_adi_pkgs
#displayName: "Install Dependencies"
#- script: ./CI/azure/build_osc_darwin.sh build_osc
#displayName: "Build"
#- task: PublishPipelineArtifact@1
#condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
#inputs:
#targetPath: '$(Build.ArtifactStagingDirectory)'
#artifactName: '$(artifactName)'