| # 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:38.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/fc35:38.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 |
| - container: i386 |
| image: ucfconsort.azurecr.io/rdma-core/debian-11-i386:37.0 |
| options: --platform linux/386 |
| 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-gcc11 |
| cd build-gcc11 |
| CC=gcc-11 cmake -GNinja .. -DIOCTL_MODE=both -DENABLE_STATIC=1 -DENABLE_WERROR=1 |
| ninja |
| displayName: gcc 11.1 Compile |
| |
| - task: PythonScript@0 |
| displayName: Check Build Script |
| inputs: |
| scriptPath: buildlib/check-build |
| arguments: --src .. --cc gcc-11 |
| workingDirectory: build-gcc11 |
| 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 |
| mv util/udma_barrier.h util/udma_barrier.h.old |
| echo "#error Fail" >> util/udma_barrier.h |
| cd build-gcc11 |
| rm CMakeCache.txt |
| CC=gcc-11 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-13 EXTRA_CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=Debug -DENABLE_WERROR=1" build |
| displayName: clang 13.0 Bionic Build |
| - bash: | |
| set -e |
| fakeroot debian/rules binary |
| displayName: clang 13.0 Bionic .deb Build |
| - bash: | |
| set -e |
| lintian ../*.deb |
| displayName: Debian Lintian for .deb packages |
| |
| - job: Compile32 |
| displayName: Compile Tests 32 bit |
| pool: |
| vmImage: 'ubuntu-latest' |
| container: i386 |
| steps: |
| - bash: | |
| set -e |
| mkdir build-i386 |
| cd build-i386 |
| cmake -GNinja .. -DIOCTL_MODE=both -DENABLE_WERROR=1 |
| ninja |
| displayName: gcc 10.2 i386 Compile |
| |
| - 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-11 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: |
| 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' |
| fedora35: |
| 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 |