Skip to content

Commit

Permalink
Merge pull request #1263 from linux-rdma/azp-jammy
Browse files Browse the repository at this point in the history
Update Azure Pipelines to newer images
  • Loading branch information
jgunthorpe committed Nov 29, 2022
2 parents c6b4dbc + 5208dc8 commit c66be3d
Show file tree
Hide file tree
Showing 27 changed files with 457 additions and 127 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ GTAGS
GRTAGS
GPATH

# clangd
.cache/

# cscope
cscope.files
cscope.out
Expand Down
9 changes: 8 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,13 @@ endif()
RDMA_BuildType()
include_directories(${BUILD_INCLUDE})

# Working means that the compiler doesn't spew output that confuses cmake's
# capabilitiy tests. ie cmake will test and succeed a simple program
RDMA_Check_C_Compiles(HAVE_WORKING_WERROR "int main(int argc,const char *argv[]) { return 0; }" "")
if (NOT HAVE_WORKING_WERROR)
message(FATAL_ERROR "-Werror doesn't work (compiler always creates warnings?). Werror is required for CMake.")
endif()

# Look for Python. We prefer some variant of python 3 if the system has it.
FIND_PACKAGE(PythonInterp 3 QUIET)
if (PythonInterp_FOUND)
Expand Down Expand Up @@ -233,7 +240,7 @@ RDMA_EnableCStd()
# but turn off some that are not terribly useful for this source.
# FIXME: I wonder how many of the signed compares are bugs?
RDMA_AddOptCFlag(CMAKE_C_FLAGS HAVE_C_WARNINGS
"-Wall -Wextra -Wno-sign-compare -Wno-unused-parameter -Wno-stringop-overread")
"-Wall -Wextra -Wno-sign-compare -Wno-unused-parameter")
RDMA_AddOptCFlag(CMAKE_C_FLAGS HAVE_C_WMISSING_PROTOTYPES "-Wmissing-prototypes")
RDMA_AddOptCFlag(CMAKE_C_FLAGS HAVE_C_WMISSING_DECLARATIONS "-Wmissing-declarations")
RDMA_AddOptCFlag(CMAKE_C_FLAGS HAVE_C_WWRITE_STRINGS "-Wwrite-strings")
Expand Down
2 changes: 1 addition & 1 deletion buildlib/RDMA_Sparse.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ int main(int argc,const char *argv[]) {return 0;}
RESULT_VARIABLE retcode)
if(NOT "${retcode}" STREQUAL "0")
message(FATAL_ERROR "glibc header file patching for sparse failed. Review include/*.rej and fix the rejects, then do "
"${BUILDLIB}/gen-sparse.py -out ${BUILD_INCLUDE}/ --src ${PROJECT_SOURCE_DIR}/ --save")
"${BUILDLIB}/gen-sparse.py --out ${BUILD_INCLUDE}/ --src ${PROJECT_SOURCE_DIR}/ --save")
endif()

# Enable endian analysis in sparse
Expand Down
4 changes: 4 additions & 0 deletions buildlib/azp-checkpatch
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import os
import re
import tempfile
import collections
import copy
import sys

base = os.environ["SYSTEM_PULLREQUEST_TARGETBRANCH"]
Expand Down Expand Up @@ -38,13 +39,16 @@ with tempfile.TemporaryDirectory() as dfn:
"--emacs", "--mailback", "--quiet", "--no-summary"
]

environ = copy.copy(os.environ)
environ["GIT_DIR"] = subprocess.check_output(["git","rev-parse","--absolute-git-dir"]).decode().strip()
failed = False
for fn in patches:
proc = subprocess.run(
checkpatch + [os.path.basename(fn)],
cwd=dfn,
stdout=subprocess.PIPE,
universal_newlines=True,
env=environ,
stderr=subprocess.STDOUT)
if proc.returncode == 0:
assert (not proc.stdout)
Expand Down
4 changes: 2 additions & 2 deletions buildlib/azure-pipelines-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ trigger:
resources:
containers:
- container: azp
image: ucfconsort.azurecr.io/rdma-core/azure_pipelines:38.0
image: ucfconsort.azurecr.io/rdma-core/azure_pipelines:44.0
endpoint: ucfconsort_registry

stages:
Expand All @@ -30,7 +30,7 @@ stages:
set -e
mkdir build-pandoc artifacts
cd build-pandoc
CC=gcc-11 cmake -GNinja ..
CC=gcc-12 cmake -GNinja ..
ninja docs
cd ..
Expand Down
76 changes: 45 additions & 31 deletions buildlib/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pr:
resources:
containers:
- container: azp
image: ucfconsort.azurecr.io/rdma-core/azure_pipelines:38.0
image: ucfconsort.azurecr.io/rdma-core/azure_pipelines:44.0
endpoint: ucfconsort_registry
- container: centos6
image: ucfconsort.azurecr.io/rdma-core/centos6:25.0
Expand All @@ -31,17 +31,23 @@ resources:
image: ucfconsort.azurecr.io/rdma-core/centos7:25.0
endpoint: ucfconsort_registry
- container: centos8
image: ucfconsort.azurecr.io/rdma-core/centos8:25.0
image: ucfconsort.azurecr.io/rdma-core/centos8:44.0
endpoint: ucfconsort_registry
- container: centos9
image: ucfconsort.azurecr.io/rdma-core/centos9:44.0
endpoint: ucfconsort_registry
- container: fedora
image: ucfconsort.azurecr.io/rdma-core/fc35:38.0
image: ucfconsort.azurecr.io/rdma-core/fc37:44.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: focal
image: ucfconsort.azurecr.io/rdma-core/ubuntu-20.04:44.0
endpoint: ucfconsort_registry
- container: leap
image: ucfconsort.azurecr.io/rdma-core/opensuse-15.0:25.0
endpoint: ucfconsort_registry
Expand All @@ -68,18 +74,18 @@ stages:

- bash: |
set -e
mkdir build-gcc11
cd build-gcc11
CC=gcc-11 cmake -GNinja .. -DIOCTL_MODE=both -DENABLE_STATIC=1 -DENABLE_WERROR=1
mkdir build-gcc12
cd build-gcc12
CC=gcc-12 cmake -GNinja .. -DIOCTL_MODE=both -DENABLE_STATIC=1 -DENABLE_WERROR=1
ninja
displayName: gcc 11.1 Compile
displayName: gcc 12.1 Compile
- task: PythonScript@0
displayName: Check Build Script
inputs:
scriptPath: buildlib/check-build
arguments: --src .. --cc gcc-11
workingDirectory: build-gcc11
arguments: --src .. --cc gcc-12
workingDirectory: build-gcc12
pythonInterpreter: /usr/bin/python3

# Run sparse on the subdirectories which are sparse clean
Expand All @@ -98,13 +104,21 @@ stages:
mv ../CMakeLists-orig.txt ../CMakeLists.txt
displayName: sparse Analysis
- bash: |
set -e
mkdir build-clang
cd build-clang
CC=clang-15 cmake -GNinja .. -DCMAKE_BUILD_TYPE=Debug -DIOCTL_MODE=both -DENABLE_WERROR=1
ninja
displayName: clang 15 Compile
- bash: |
set -e
mv util/udma_barrier.h util/udma_barrier.h.old
echo "#error Fail" >> util/udma_barrier.h
cd build-gcc11
cd build-gcc12
rm CMakeCache.txt
CC=gcc-11 cmake -GNinja .. -DIOCTL_MODE=both -DENABLE_WERROR=1
CC=gcc-12 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
Expand All @@ -113,31 +127,17 @@ stages:
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
CC=aarch64-linux-gnu-gcc-12 PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig/ cmake -GNinja .. -DIOCTL_MODE=both -DNO_PYVERBS=1 -DENABLE_WERROR=1
ninja
displayName: gcc 9.3 ARM64 Compile
displayName: gcc 12.1 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
CC=powerpc64le-linux-gnu-gcc-12 PKG_CONFIG_PATH=/usr/lib/powerpc64le-linux-gnu/pkgconfig/ 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
displayName: gcc 12.1 PPC64EL Compile
- job: Compile32
displayName: Compile Tests 32 bit
Expand Down Expand Up @@ -166,7 +166,7 @@ stages:
set -e
mkdir build-pandoc artifacts
cd build-pandoc
CC=gcc-11 cmake -GNinja ..
CC=gcc-12 cmake -GNinja ..
ninja docs
cd ../artifacts
# FIXME: Check Build.SourceBranch for tag consistency
Expand Down Expand Up @@ -198,7 +198,11 @@ stages:
CONTAINER: centos8
SPEC: redhat/rdma-core.spec
RPMBUILD_OPTS: --define 'EXTRA_CMAKE_FLAGS -DCMAKE_BUILD_TYPE=Debug -DENABLE_WERROR=1'
fedora35:
centos9:
CONTAINER: centos9
SPEC: redhat/rdma-core.spec
RPMBUILD_OPTS: --define 'EXTRA_CMAKE_FLAGS -DCMAKE_BUILD_TYPE=Debug -DENABLE_WERROR=1'
fedora37:
CONTAINER: fedora
SPEC: redhat/rdma-core.spec
RPMBUILD_OPTS: --define 'EXTRA_CMAKE_FLAGS -DCMAKE_BUILD_TYPE=Debug -DENABLE_WERROR=1'
Expand Down Expand Up @@ -235,6 +239,11 @@ stages:
CONTAINER: xenial
bionic:
CONTAINER: bionic
focal:
CONTAINER: focal
jammy:
CONTAINER: azp
LINTIAN: true
container: $[ variables['CONTAINER'] ]
steps:
- checkout: none
Expand All @@ -251,3 +260,8 @@ stages:
cd rdma-core*/
dpkg-buildpackage -b -d
displayName: Perform Package Build
- bash: |
lintian *.deb
displayName: Debian Lintian for .deb packages
condition: eq(variables['LINTIAN'], 'true')

0 comments on commit c66be3d

Please sign in to comment.