File: azure-pipelines.yml

package info (click to toggle)
rdma-core 33.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 13,844 kB
  • sloc: ansic: 145,804; python: 5,688; sh: 2,761; perl: 1,465; makefile: 73
file content (243 lines) | stat: -rw-r--r-- 8,139 bytes parent folder | download
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
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
# See https://aka.ms/yaml

trigger:
  - master
  - stable-v4*
  - stable-v3*
  - stable-v29
  - stable-v28
  - stable-v27
  - stable-v26
  - stable-v25
  - dev/stable-v4*/*
  - dev/stable-v3*/*
  - dev/stable-v29/*
  - dev/stable-v28/*
  - dev/stable-v27/*
  - dev/stable-v26/*
  - dev/stable-v25/*
pr:
  - master

resources:
  containers:
    - container: azp
      image: ucfconsort.azurecr.io/rdma-core/azure_pipelines:29.0
      endpoint: ucfconsort_registry
    - container: centos6
      image: ucfconsort.azurecr.io/rdma-core/centos6:25.0
      endpoint: ucfconsort_registry
    - container: centos7
      image: ucfconsort.azurecr.io/rdma-core/centos7:25.0
      endpoint: ucfconsort_registry
    - container: centos8
      image: ucfconsort.azurecr.io/rdma-core/centos8:25.0
      endpoint: ucfconsort_registry
    - container: fedora
      image: ucfconsort.azurecr.io/rdma-core/fc33:33.0
      endpoint: ucfconsort_registry
    - container: xenial
      image: ucfconsort.azurecr.io/rdma-core/ubuntu-16.04:28.0
      endpoint: ucfconsort_registry
    - container: bionic
      image: ucfconsort.azurecr.io/rdma-core/ubuntu-18.04:29.0
      endpoint: ucfconsort_registry
    - container: leap
      image: ucfconsort.azurecr.io/rdma-core/opensuse-15.0:25.0
      endpoint: ucfconsort_registry

stages:
  - stage: Build
    jobs:
      - job: Compile
        displayName: Compile Tests
        pool:
          vmImage: 'ubuntu-latest'
        container: azp
        steps:
          - task: PythonScript@0
            displayName: checkpatch
            condition: eq(variables['Build.Reason'], 'PullRequest')
            inputs:
              scriptPath: buildlib/azp-checkpatch
              pythonInterpreter: /usr/bin/python3

          - bash: |
              set -e
              mkdir build-gcc10
              cd build-gcc10
              CC=gcc-10 cmake -GNinja .. -DIOCTL_MODE=both -DENABLE_STATIC=1 -DENABLE_WERROR=1
              ninja
            displayName: gcc 10.0 Compile

          - task: PythonScript@0
            displayName: Check Build Script
            inputs:
              scriptPath: buildlib/check-build
              arguments: --src .. --cc gcc-10
              workingDirectory: build-gcc10
              pythonInterpreter: /usr/bin/python3

          # Run sparse on the subdirectories which are sparse clean
          - bash: |
              set -e
              mkdir build-sparse
              mv CMakeLists.txt CMakeLists-orig.txt
              grep -v "# NO SPARSE" CMakeLists-orig.txt > CMakeLists.txt
              cd build-sparse
              CC=cgcc cmake -GNinja .. -DIOCTL_MODE=both -DNO_PYVERBS=1 -DENABLE_WERROR=1
              ninja | grep -v '^\[' | tee out
              # sparse does not fail gcc on messages
              if [ -s out ]; then
                 false
              fi
              mv ../CMakeLists-orig.txt ../CMakeLists.txt
            displayName: sparse Analysis

          - bash: |
              set -e
              mkdir build-clang
              cd build-clang
              CC=clang-10 CFLAGS="-m32" cmake -GNinja .. -DIOCTL_MODE=both -DNO_PYVERBS=1 -DENABLE_WERROR=1
              ninja
            displayName: clang 10.0 32-bit Compile

          - bash: |
              set -e
              mv util/udma_barrier.h util/udma_barrier.h.old
              echo "#error Fail" >> util/udma_barrier.h
              cd build-gcc10
              rm CMakeCache.txt
              CC=gcc-10 cmake -GNinja .. -DIOCTL_MODE=both -DENABLE_WERROR=1
              ninja
              mv ../util/udma_barrier.h.old ../util/udma_barrier.h
            displayName: Simulate non-coherent DMA Platform Compile

          - bash: |
              set -e
              mkdir build-arm64
              cd build-arm64
              CC=aarch64-linux-gnu-gcc-9 cmake -GNinja .. -DIOCTL_MODE=both -DNO_PYVERBS=1 -DENABLE_WERROR=1
              ninja
            displayName: gcc 9.3 ARM64 Compile

          - bash: |
              set -e
              mkdir build-ppc64el
              cd build-ppc64el
              CC=powerpc64le-linux-gnu-gcc-9 cmake -GNinja .. -DIOCTL_MODE=both -DNO_PYVERBS=1 -DENABLE_WERROR=1
              ninja
            displayName: gcc 9.3 PPC64EL Compile

          - bash: |
              set -e
              sed -i -e 's/ninja \(.*\)-v/ninja \1/g' debian/rules
              debian/rules CC=clang-10 EXTRA_CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=Debug -DENABLE_WERROR=1" build
            displayName: clang 10.0 Bionic Build
          - bash: |
              set -e
              fakeroot debian/rules binary
            displayName: clang 10.0 Bionic .deb Build
          - bash: |
              set -e
              lintian ../*.deb
            displayName: Debian Lintian for .deb packages

      - job: SrcPrep
        displayName: Build Source Tar
        pool:
          vmImage: 'ubuntu-latest'
        container: azp
        steps:
          - checkout: self
            fetchDepth: 1

          - bash: |
              set -e
              mkdir build-pandoc artifacts
              cd build-pandoc
              CC=gcc-10 cmake -GNinja ..
              ninja docs
              cd ../artifacts
              # FIXME: Check Build.SourceBranch for tag consistency
              python3 ../buildlib/cbuild make-dist-tar ../build-pandoc
            displayName: Prebuild Documentation

          - task: PublishPipelineArtifact@0
            inputs:
              # Contains an rdma-core-XX.tar.gz file
              artifactName: source_tar
              targetPath: artifacts

      - job: RPM_Distros
        displayName: Test Build RPMs for
        dependsOn: SrcPrep
        pool:
          vmImage: 'ubuntu-latest'
        strategy:
          matrix:
            centos6:
              CONTAINER: centos6
              SPEC: buildlib/centos6.spec
              RPMBUILD_OPTS:
            centos7:
              CONTAINER: centos7
              SPEC: redhat/rdma-core.spec
              RPMBUILD_OPTS:  --define 'EXTRA_CMAKE_FLAGS -DCMAKE_BUILD_TYPE=Debug -DENABLE_WERROR=1'
            centos8:
              CONTAINER: centos8
              SPEC: redhat/rdma-core.spec
              RPMBUILD_OPTS:  --define 'EXTRA_CMAKE_FLAGS -DCMAKE_BUILD_TYPE=Debug -DENABLE_WERROR=1'
            fedora33:
              CONTAINER: fedora
              SPEC: redhat/rdma-core.spec
              RPMBUILD_OPTS:  --define 'EXTRA_CMAKE_FLAGS -DCMAKE_BUILD_TYPE=Debug -DENABLE_WERROR=1'
            leap:
              CONTAINER: leap
              SPEC: suse/rdma-core.spec
              RPMBUILD_OPTS:  --define 'EXTRA_CMAKE_FLAGS -DCMAKE_BUILD_TYPE=Debug -DENABLE_WERROR=1' --without=curlmini
        container: $[ variables['CONTAINER'] ]
        steps:
          - checkout: none

          - task: DownloadPipelineArtifact@0
            inputs:
              artifactName: source_tar
              targetPath: .

          - bash: |
              set -e
              mkdir SOURCES tmp
              tar --wildcards -xzf rdma-core*.tar.gz  */$(SPEC) --strip-components=2
              RPM_SRC=$((rpmspec -P *.spec || grep ^Source: *.spec) | awk '/^Source:/{split($0,a,"[ \t]+");print(a[2])}')
              (cd SOURCES && ln -sf ../rdma-core*.tar.gz "$RPM_SRC")
              rpmbuild --define '_tmppath '$(pwd)'/tmp' --define '_topdir '$(pwd) -bb *.spec $(RPMBUILD_OPTS)
            displayName: Perform Package Build

      - job: DEB_Distros
        displayName: Test Build DEBs for
        dependsOn: SrcPrep
        pool:
          vmImage: 'ubuntu-latest'
        strategy:
          matrix:
            xenial:
              CONTAINER: xenial
            bionic:
              CONTAINER: bionic
        container: $[ variables['CONTAINER'] ]
        steps:
          - checkout: none

          - task: DownloadPipelineArtifact@0
            inputs:
              artifactName: source_tar
              targetPath: .

          - bash: |
              set -e
              mv *.tar.gz src.tar.gz
              tar -xzf src.tar.gz
              cd rdma-core*/
              dpkg-buildpackage -b -d
            displayName: Perform Package Build