All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH rdma-core 00/19] Complete the azure pipelines configuration
@ 2019-07-23 19:01 Jason Gunthorpe
  2019-07-23 19:01 ` [PATCH rdma-core 01/19] rdmacm: Fix missing libraries on centos6 build Jason Gunthorpe
                   ` (18 more replies)
  0 siblings, 19 replies; 20+ messages in thread
From: Jason Gunthorpe @ 2019-07-23 19:01 UTC (permalink / raw)
  To: linux-rdma; +Cc: Jason Gunthorpe

From: Jason Gunthorpe <jgg@mellanox.com>

Now that it has been running with stability for a while lets finish the job.

This is mostly a grab bag of things to make AZP work properly:
 - Only use python3 so we can reduce the azp image size
 - Migrate functions over from travis so we don't see as many travis false
   failures until we retire it. Notably the problematic suse Leap is dropped
 - Build FC30 and Centos6 in AZP
 - Cross compile on PPC64 as well as ARM64
 - Version number the container images so that stable branches will continue
   to work forever.
 - Minor bug fixes to get clean compiles in all environments

This is a PR:

https://github.com/linux-rdma/rdma-core/pull/552

Jason Gunthorpe (19):
  rdmacm: Fix missing libraries on centos6 build
  util: Enable uninitialized_var on powerpc
  build/cbuild: Remove docker-gc
  build/travis: Do not build packages in travis anymore
  build/travis: Do not run checkpatch
  build/travis: Do not cross compile for ARM64
  build/azp: Use a version number for the docker images
  build/cbuild: Add push-azp-images
  build/azp: Use gcc 9.3 for building
  build/azp: Use clang 8.0 for building
  build/azp: Run a test compile on ppc64el as well
  build/azp: Add Fedora 30 to the distro testing
  build/azp: Update check-build to work with python3
  build/cbuild: Update cbuild to work with python3
  build/azp: Reduce the package list
  build/azp: Add centos6 to the test distributions
  build/azp: Run lintian over the bionic .debs
  build: Use the CMake variable -DENABLE_WERROR to turn on WERROR mode
  build/azp: Have Azure Pipelines create releases when tags are made

 .travis.yml                          |  27 ---
 CMakeLists.txt                       |   5 +
 buildlib/azure-pipelines-release.yml |  48 ++++++
 buildlib/azure-pipelines.yml         |  84 +++++----
 buildlib/cbuild                      | 248 +++++++++++++++++++--------
 buildlib/centos6.spec                | 109 ++++++++++++
 buildlib/check-build                 |  50 +++---
 buildlib/github-release              |   7 -
 buildlib/package-build-test          |  21 ---
 buildlib/travis-build                |   7 +-
 buildlib/travis-checkpatch           |  30 ----
 librdmacm/CMakeLists.txt             |   1 +
 util/compiler.h                      |   5 +-
 13 files changed, 421 insertions(+), 221 deletions(-)
 create mode 100644 buildlib/azure-pipelines-release.yml
 create mode 100644 buildlib/centos6.spec
 delete mode 100755 buildlib/github-release
 delete mode 100755 buildlib/package-build-test
 delete mode 100755 buildlib/travis-checkpatch

-- 
2.22.0


^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH rdma-core 01/19] rdmacm: Fix missing libraries on centos6 build
  2019-07-23 19:01 [PATCH rdma-core 00/19] Complete the azure pipelines configuration Jason Gunthorpe
@ 2019-07-23 19:01 ` Jason Gunthorpe
  2019-07-23 19:01 ` [PATCH rdma-core 02/19] util: Enable uninitialized_var on powerpc Jason Gunthorpe
                   ` (17 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: Jason Gunthorpe @ 2019-07-23 19:01 UTC (permalink / raw)
  To: linux-rdma; +Cc: Jason Gunthorpe

From: Jason Gunthorpe <jgg@mellanox.com>

Build fails with:

CMakeFiles/rdmacm.dir/rsocket.c.o: In function `rs_time_us':
/home/jgg/oss/rdma-core/librdmacm/rsocket.c:449: undefined reference to `clock_gettime'

Need to have -lrt on this old glibc.

Fixes: 38c49232b67a ("rsockets: Replace gettimeofday with clock_gettime")
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
---
 librdmacm/CMakeLists.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/librdmacm/CMakeLists.txt b/librdmacm/CMakeLists.txt
index 4f74d4b0ac3b79..b306841ea2134e 100644
--- a/librdmacm/CMakeLists.txt
+++ b/librdmacm/CMakeLists.txt
@@ -21,6 +21,7 @@ target_link_libraries(rdmacm LINK_PUBLIC ibverbs)
 target_link_libraries(rdmacm LINK_PRIVATE
   ${NL_LIBRARIES}
   ${CMAKE_THREAD_LIBS_INIT}
+  ${RT_LIBRARIES}
   )
 
 # The preload library is a bit special, it needs to be open coded
-- 
2.22.0


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH rdma-core 02/19] util: Enable uninitialized_var on powerpc
  2019-07-23 19:01 [PATCH rdma-core 00/19] Complete the azure pipelines configuration Jason Gunthorpe
  2019-07-23 19:01 ` [PATCH rdma-core 01/19] rdmacm: Fix missing libraries on centos6 build Jason Gunthorpe
@ 2019-07-23 19:01 ` Jason Gunthorpe
  2019-07-23 19:01 ` [PATCH rdma-core 03/19] build/cbuild: Remove docker-gc Jason Gunthorpe
                   ` (16 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: Jason Gunthorpe @ 2019-07-23 19:01 UTC (permalink / raw)
  To: linux-rdma; +Cc: Jason Gunthorpe

From: Jason Gunthorpe <jgg@mellanox.com>

For some reason the gcc 8/3 build for powerpc behaves differently from
AMD64 and ARM64:

../providers/mlx4/qp.c: In function 'mlx4_post_send':
../providers/mlx4/qp.c:478:22: warning: 'ctrl' may be used uninitialized in this function [-Wmaybe-uninitialized]
   ctrl->owner_opcode |= htobe32((qp->sq.head & 0xffff) << 8);

Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
---
 util/compiler.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/util/compiler.h b/util/compiler.h
index 16f5ee14be2a8a..dfce82f1884149 100644
--- a/util/compiler.h
+++ b/util/compiler.h
@@ -7,9 +7,10 @@
 
    This is only enabled for old compilers. gcc 6.x and beyond have excellent
    static flow analysis. If code solicits a warning from 6.x it is almost
-   certainly too complex for a human to understand.
+   certainly too complex for a human to understand. For some reason powerpc
+   uses a different scheme than gcc for flow analysis.
 */
-#if __GNUC__ >= 6 || defined(__clang__)
+#if (__GNUC__ >= 6 && !defined(__powerpc__)) || defined(__clang__)
 #define uninitialized_var(x) x
 #else
 #define uninitialized_var(x) x = x
-- 
2.22.0


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH rdma-core 03/19] build/cbuild: Remove docker-gc
  2019-07-23 19:01 [PATCH rdma-core 00/19] Complete the azure pipelines configuration Jason Gunthorpe
  2019-07-23 19:01 ` [PATCH rdma-core 01/19] rdmacm: Fix missing libraries on centos6 build Jason Gunthorpe
  2019-07-23 19:01 ` [PATCH rdma-core 02/19] util: Enable uninitialized_var on powerpc Jason Gunthorpe
@ 2019-07-23 19:01 ` Jason Gunthorpe
  2019-07-23 19:01 ` [PATCH rdma-core 04/19] build/travis: Do not build packages in travis anymore Jason Gunthorpe
                   ` (15 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: Jason Gunthorpe @ 2019-07-23 19:01 UTC (permalink / raw)
  To: linux-rdma; +Cc: Jason Gunthorpe

From: Jason Gunthorpe <jgg@mellanox.com>

This is now part of standard docker via the command:
   docker system prune

Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
---
 buildlib/cbuild | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/buildlib/cbuild b/buildlib/cbuild
index 83ada8ee44aa5e..7f93baa82b1959 100755
--- a/buildlib/cbuild
+++ b/buildlib/cbuild
@@ -1084,20 +1084,6 @@ def cmd_make_dist_tar(args):
         with open(os.path.join(args.script_pwd,args.tarfn),"w") as F:
             subprocess.check_call(["gzip","-9c",tmp_tarfn],stdout=F);
 
-# -------------------------------------------------------------------------
-def args_docker_gc(parser):
-    pass;
-def cmd_docker_gc(args):
-    """Run garbage collection on docker images and containers."""
-
-    containers = set(docker_cmd_str(args,"ps","-a","-q","--filter","status=exited").split());
-    images = set(docker_cmd_str(args,"images","-q","--filter","dangling=true").split());
-
-    if containers:
-        docker_cmd(args,"rm",*sorted(containers));
-    if images:
-        docker_cmd(args,"rmi",*sorted(images));
-
 # -------------------------------------------------------------------------
 
 if __name__ == '__main__':
-- 
2.22.0


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH rdma-core 04/19] build/travis: Do not build packages in travis anymore
  2019-07-23 19:01 [PATCH rdma-core 00/19] Complete the azure pipelines configuration Jason Gunthorpe
                   ` (2 preceding siblings ...)
  2019-07-23 19:01 ` [PATCH rdma-core 03/19] build/cbuild: Remove docker-gc Jason Gunthorpe
@ 2019-07-23 19:01 ` Jason Gunthorpe
  2019-07-23 19:01 ` [PATCH rdma-core 05/19] build/travis: Do not run checkpatch Jason Gunthorpe
                   ` (14 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: Jason Gunthorpe @ 2019-07-23 19:01 UTC (permalink / raw)
  To: linux-rdma; +Cc: Jason Gunthorpe

From: Jason Gunthorpe <jgg@mellanox.com>

AZP does this now and (so far) doesn't randomly fail.

Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
---
 .travis.yml                 |  4 ----
 buildlib/package-build-test | 21 ---------------------
 2 files changed, 25 deletions(-)
 delete mode 100755 buildlib/package-build-test

diff --git a/.travis.yml b/.travis.yml
index 1cc2c69ca8671d..23226a679acb6b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -39,9 +39,6 @@ addons:
       - python3-dev
       - python3-pip
 
-service:
-    - docker
-
 before_script:
   - export LATEST_GCC_LINARO_URL=`wget -qO - https://releases.linaro.org/components/toolchain/binaries/latest-7/aarch64-linux-gnu/ | grep -o '<a href=['"'"'"].*gcc-linaro-.*x86_64_aarch64-linux-gnu.tar.xz['"'"'"]'  |  sed -e 's/^<a href=["'"'"']//' -e 's/["'"'"']$//'`
   - export LATEST_GCC_LINARO_TAR=`basename $LATEST_GCC_LINARO_URL`
@@ -52,7 +49,6 @@ before_script:
 script:
   - buildlib/travis-build
   - buildlib/travis-checkpatch
-  - buildlib/package-build-test
   - buildlib/github-release
 deploy:
   # Deploy assets to Github releases
diff --git a/buildlib/package-build-test b/buildlib/package-build-test
deleted file mode 100755
index 29c17838e9e894..00000000000000
--- a/buildlib/package-build-test
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/bash
-
-# fail on errors
-set -e
-# be verbose
-set -x
-
-# Do not run these tests if we are already inside a container
-if [ -e "/.dockerenv" ] || (grep -q docker /proc/self/cgroup &>/dev/null); then
-       echo "We are running in a container, skipping ..."
-       exit 0
-fi
-
-for OS in centos7 leap
-do
-	echo
-	echo "Checking package build for ${OS} ...."
-	echo
-	buildlib/cbuild build-images ${OS}
-	buildlib/cbuild pkg --use-prebuilt-pandoc --with static ${OS}
-done
-- 
2.22.0


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH rdma-core 05/19] build/travis: Do not run checkpatch
  2019-07-23 19:01 [PATCH rdma-core 00/19] Complete the azure pipelines configuration Jason Gunthorpe
                   ` (3 preceding siblings ...)
  2019-07-23 19:01 ` [PATCH rdma-core 04/19] build/travis: Do not build packages in travis anymore Jason Gunthorpe
@ 2019-07-23 19:01 ` Jason Gunthorpe
  2019-07-23 19:01 ` [PATCH rdma-core 06/19] build/travis: Do not cross compile for ARM64 Jason Gunthorpe
                   ` (13 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: Jason Gunthorpe @ 2019-07-23 19:01 UTC (permalink / raw)
  To: linux-rdma; +Cc: Jason Gunthorpe

From: Jason Gunthorpe <jgg@mellanox.com>

AZP does this now and shows the results in a much clearer way.

Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
---
 .travis.yml                |  1 -
 buildlib/travis-checkpatch | 30 ------------------------------
 2 files changed, 31 deletions(-)
 delete mode 100755 buildlib/travis-checkpatch

diff --git a/.travis.yml b/.travis.yml
index 23226a679acb6b..d20dadf8e9d90f 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -48,7 +48,6 @@ before_script:
   - http_proxy= pip3 install cython
 script:
   - buildlib/travis-build
-  - buildlib/travis-checkpatch
   - buildlib/github-release
 deploy:
   # Deploy assets to Github releases
diff --git a/buildlib/travis-checkpatch b/buildlib/travis-checkpatch
deleted file mode 100755
index 5e78ec47406210..00000000000000
--- a/buildlib/travis-checkpatch
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/bin/bash
-# Copyright 2017 Mellanox Technologies Ltd.
-# Licensed under BSD (MIT variant) or GPLv2. See COPYING.
-
-
-if [ "x$TRAVIS_EVENT_TYPE" != "xpull_request" ]; then
-	# Peform checkpatch checks on pull requests only
-	exit 0
-fi
-
-# The below "set" is commented, because the checkpatch.pl returns 1 (error) for warnings too.
-# And the rdma-core code is not mature enough to be warning safe
-# set -e
-
-if [ "x$TRAVIS_COMMIT_RANGE" != "x" ]; then
-	cd buildlib/
-	wget -q https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/plain/scripts/checkpatch.pl \
-	        https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/plain/scripts/spelling.txt
-	DIR_FOR_PATCHES_TO_CHECK=$(mktemp -d)
-	git format-patch --no-cover-letter $TRAVIS_COMMIT_RANGE ^$TRAVIS_BRANCH -o $DIR_FOR_PATCHES_TO_CHECK/
-	CHECKPATCH_OPT="--no-tree --ignore PREFER_KERNEL_TYPES,FILE_PATH_CHANGES,EXECUTE_PERMISSIONS,USE_NEGATIVE_ERRNO,CONST_STRUCT $DIR_FOR_PATCHES_TO_CHECK/*"
-	perl checkpatch.pl $CHECKPATCH_OPT
-	if [ $? -ne 0 ]; then
-		# We rerun checkpatch to simplify parsing and to understand if we failed for errors
-		# For example, the output on some arbitrary patchset of the following line without awk is:
-		# total: 1 errors, 3 warnings, 42 lines checked
-		NUMB_ERRRORS=$(perl checkpatch.pl --terse $CHECKPATCH_OPT | awk 'BEGIN {FS = "total:"} ; {sum+=$2} END {print sum}')
-		exit $NUMB_ERRRORS
-	fi
-fi
-- 
2.22.0


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH rdma-core 06/19] build/travis: Do not cross compile for ARM64
  2019-07-23 19:01 [PATCH rdma-core 00/19] Complete the azure pipelines configuration Jason Gunthorpe
                   ` (4 preceding siblings ...)
  2019-07-23 19:01 ` [PATCH rdma-core 05/19] build/travis: Do not run checkpatch Jason Gunthorpe
@ 2019-07-23 19:01 ` Jason Gunthorpe
  2019-07-23 19:01 ` [PATCH rdma-core 07/19] build/azp: Use a version number for the docker images Jason Gunthorpe
                   ` (12 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: Jason Gunthorpe @ 2019-07-23 19:01 UTC (permalink / raw)
  To: linux-rdma; +Cc: Jason Gunthorpe

From: Jason Gunthorpe <jgg@mellanox.com>

AZP does this now, and does a better job as it has all the cross compile
system libraries available.

Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
---
 .travis.yml           | 5 -----
 buildlib/travis-build | 7 +------
 2 files changed, 1 insertion(+), 11 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index d20dadf8e9d90f..82f16d65e0a646 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -40,11 +40,6 @@ addons:
       - python3-pip
 
 before_script:
-  - export LATEST_GCC_LINARO_URL=`wget -qO - https://releases.linaro.org/components/toolchain/binaries/latest-7/aarch64-linux-gnu/ | grep -o '<a href=['"'"'"].*gcc-linaro-.*x86_64_aarch64-linux-gnu.tar.xz['"'"'"]'  |  sed -e 's/^<a href=["'"'"']//' -e 's/["'"'"']$//'`
-  - export LATEST_GCC_LINARO_TAR=`basename $LATEST_GCC_LINARO_URL`
-  - wget -q http://releases.linaro.org/$LATEST_GCC_LINARO_URL
-  - mkdir $HOME/aarch64 && tar xf $LATEST_GCC_LINARO_TAR -C $HOME/aarch64 --strip 1
-  - rm $LATEST_GCC_LINARO_TAR
   - http_proxy= pip3 install cython
 script:
   - buildlib/travis-build
diff --git a/buildlib/travis-build b/buildlib/travis-build
index f84b77fc782147..48c1c8f68f146d 100755
--- a/buildlib/travis-build
+++ b/buildlib/travis-build
@@ -7,7 +7,7 @@ set -e
 # Echo all commands to Travis log
 set -x
 
-mkdir build-travis build32 build-sparse build-aarch64
+mkdir build-travis build32 build-sparse
 
 # Build with latest clang first
 cd build-travis
@@ -22,11 +22,6 @@ cd ../build32
 CC=gcc-8 CFLAGS="-Werror -m32 -msse3" cmake -GNinja .. -DENABLE_RESOLVE_NEIGH=0 -DIOCTL_MODE=both -DNO_PYVERBS=1
 ninja
 
-# aarch64 build to check compilation on ARM 64bit platform
-cd ../build-aarch64
-CC=$HOME/aarch64/bin/aarch64-linux-gnu-gcc CFLAGS="-Werror -Wno-maybe-uninitialized" cmake -GNinja .. -DENABLE_RESOLVE_NEIGH=0 -DIOCTL_MODE=ioctl -DNO_PYVERBS=1
-ninja
-
 # Run sparse on the subdirectories which are sparse clean
 cd ../build-sparse
 mv ../CMakeLists.txt ../CMakeLists-orig.txt
-- 
2.22.0


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH rdma-core 07/19] build/azp: Use a version number for the docker images
  2019-07-23 19:01 [PATCH rdma-core 00/19] Complete the azure pipelines configuration Jason Gunthorpe
                   ` (5 preceding siblings ...)
  2019-07-23 19:01 ` [PATCH rdma-core 06/19] build/travis: Do not cross compile for ARM64 Jason Gunthorpe
@ 2019-07-23 19:01 ` Jason Gunthorpe
  2019-07-23 19:01 ` [PATCH rdma-core 08/19] build/cbuild: Add push-azp-images Jason Gunthorpe
                   ` (11 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: Jason Gunthorpe @ 2019-07-23 19:01 UTC (permalink / raw)
  To: linux-rdma; +Cc: Jason Gunthorpe

From: Jason Gunthorpe <jgg@mellanox.com>

This way when we make a stable branch the CI container images will remain
unchanged for that branch instead of tracking the master branch.

If incompatible changes are made during a release then a suffix should be
appended.

The version number for the image is taken from the
buildlib/azure-pipelines.yml.

Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
---
 buildlib/azure-pipelines.yml |  6 +++---
 buildlib/cbuild              | 22 ++++++++++++++++++----
 2 files changed, 21 insertions(+), 7 deletions(-)

diff --git a/buildlib/azure-pipelines.yml b/buildlib/azure-pipelines.yml
index 998b598bfc482f..e1ed19c6e7ad93 100644
--- a/buildlib/azure-pipelines.yml
+++ b/buildlib/azure-pipelines.yml
@@ -8,13 +8,13 @@ pr:
 resources:
   containers:
     - container: azp
-      image: ucfconsort.azurecr.io/rdma-core/azure_pipelines:latest
+      image: ucfconsort.azurecr.io/rdma-core/azure_pipelines:25.0
       endpoint: ucfconsort_registry
     - container: centos7
-      image: ucfconsort.azurecr.io/rdma-core/centos7:latest
+      image: ucfconsort.azurecr.io/rdma-core/centos7:25.0
       endpoint: ucfconsort_registry
     - container: leap
-      image: ucfconsort.azurecr.io/rdma-core/opensuse-15.0:latest
+      image: ucfconsort.azurecr.io/rdma-core/opensuse-15.0:25.0
       endpoint: ucfconsort_registry
 
 stages:
diff --git a/buildlib/cbuild b/buildlib/cbuild
index 7f93baa82b1959..1c325c9fe7cbdf 100755
--- a/buildlib/cbuild
+++ b/buildlib/cbuild
@@ -52,6 +52,7 @@ import shutil
 import subprocess
 import sys
 import tempfile
+import yaml
 from contextlib import contextmanager;
 
 project = "rdma-core";
@@ -72,6 +73,7 @@ class DockerFile(object):
         self.lines = ["FROM %s"%(src)];
 
 class Environment(object):
+    azp_images = None;
     pandoc = True;
     python_cmd = "python3";
     aliases = set();
@@ -81,9 +83,23 @@ class Environment(object):
 
     to_azp = False;
 
+    def _get_azp_names(self):
+        if Environment.azp_images:
+            return Environment.azp_images;
+
+        with open("buildlib/azure-pipelines.yml") as F:
+            azp = yaml.safe_load(F)
+        Environment.azp_images = set(I["image"] for I in azp["resources"]["containers"])
+        return Environment.azp_images;
+
     def image_name(self):
         if self.to_azp:
-            return "ucfconsort.azurecr.io/%s/%s"%(project, self.name);
+            # Get the version number of the container out of the azp file.
+            prefix = "ucfconsort.azurecr.io/%s/%s:"%(project, self.name);
+            for I in self._get_azp_names():
+                if I.startswith(prefix):
+                    return I;
+            raise ValueError("Image is not used in buildlib/azure-pipelines.yml")
         return "build-%s/%s"%(project,self.name);
 
 # -------------------------------------------------------------------------
@@ -252,7 +268,6 @@ class travis(APTEnvironment):
     _yaml = None;
 
     def get_yaml(self):
-        import yaml
         if self._yaml:
             return self._yaml;
 
@@ -394,6 +409,7 @@ class azure_pipelines(bionic):
         "gcc-8",
         "git",
         "python2.7",
+        "python3-yaml",
         "sparse",
         'python-docutils',
     } | {
@@ -750,7 +766,6 @@ def copy_abi_files(src):
             shutil.copy(cur_fn, ref_fn);
 
 def run_travis_build(args,env):
-    import yaml
     with private_tmp(args) as tmpdir:
         os.mkdir(os.path.join(tmpdir,"src"));
         os.mkdir(os.path.join(tmpdir,"tmp"));
@@ -815,7 +830,6 @@ def run_travis_build(args,env):
         copy_abi_files(os.path.join(tmpdir, "src/ABI"));
 
 def run_azp_build(args,env):
-    import yaml
     # Load the commands from the pipelines file
     with open("buildlib/azure-pipelines.yml") as F:
         azp = yaml.safe_load(F);
-- 
2.22.0


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH rdma-core 08/19] build/cbuild: Add push-azp-images
  2019-07-23 19:01 [PATCH rdma-core 00/19] Complete the azure pipelines configuration Jason Gunthorpe
                   ` (6 preceding siblings ...)
  2019-07-23 19:01 ` [PATCH rdma-core 07/19] build/azp: Use a version number for the docker images Jason Gunthorpe
@ 2019-07-23 19:01 ` Jason Gunthorpe
  2019-07-23 19:01 ` [PATCH rdma-core 09/19] build/azp: Use gcc 9.3 for building Jason Gunthorpe
                   ` (10 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: Jason Gunthorpe @ 2019-07-23 19:01 UTC (permalink / raw)
  To: linux-rdma; +Cc: Jason Gunthorpe

From: Jason Gunthorpe <jgg@mellanox.com>

Do a parallel push of all the Azure Pipelines images to the container
registry.

Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
---
 buildlib/cbuild | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/buildlib/cbuild b/buildlib/cbuild
index 1c325c9fe7cbdf..9fd51cc750dcbb 100755
--- a/buildlib/cbuild
+++ b/buildlib/cbuild
@@ -161,6 +161,7 @@ class centos7_epel(centos7):
     ninja_cmd = "ninja-build";
     # Our spec file does not know how to cope with cmake3
     is_rpm = False;
+    to_azp = False;
 
     def get_docker_file(self):
         res = YumEnvironment.get_docker_file(self);
@@ -1059,6 +1060,29 @@ def cmd_build_images(args):
                      tmpdir]);
             docker_cmd(args,*opts);
 
+# -------------------------------------------------------------------------
+
+def args_push_azp_images(args):
+    pass
+def cmd_push_azp_images(args):
+    """Push the images required for Azure Pipelines to the container
+    registry. Must have done 'az login' first"""
+    subprocess.check_call(["sudo","az","acr","login","--name","ucfconsort"]);
+    with private_tmp(args) as tmpdir:
+        nfn = os.path.join(tmpdir,"build.ninja");
+        with open(nfn,"w") as F:
+            F.write("""rule push
+            command = docker push $img
+            description=Push $img\n""");
+
+            for env in environments:
+                name = env.image_name()
+                if "ucfconsort.azurecr.io" not in name:
+                    continue
+                F.write("build push_%s : push\n   img = %s\n"%(env.name,env.image_name()));
+                F.write("default push_%s\n"%(env.name));
+        subprocess.check_call(["sudo","ninja"],cwd=tmpdir);
+
 # -------------------------------------------------------------------------
 def args_make_dist_tar(parser):
     parser.add_argument("BUILD",help="Path to the build directory")
-- 
2.22.0


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH rdma-core 09/19] build/azp: Use gcc 9.3 for building
  2019-07-23 19:01 [PATCH rdma-core 00/19] Complete the azure pipelines configuration Jason Gunthorpe
                   ` (7 preceding siblings ...)
  2019-07-23 19:01 ` [PATCH rdma-core 08/19] build/cbuild: Add push-azp-images Jason Gunthorpe
@ 2019-07-23 19:01 ` Jason Gunthorpe
  2019-07-23 19:01 ` [PATCH rdma-core 10/19] build/azp: Use clang 8.0 " Jason Gunthorpe
                   ` (9 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: Jason Gunthorpe @ 2019-07-23 19:01 UTC (permalink / raw)
  To: linux-rdma; +Cc: Jason Gunthorpe

From: Jason Gunthorpe <jgg@mellanox.com>

Latest release

Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
---
 buildlib/azure-pipelines.yml | 18 +++++-----
 buildlib/cbuild              | 69 ++++++++++++++++++++++++++----------
 2 files changed, 60 insertions(+), 27 deletions(-)

diff --git a/buildlib/azure-pipelines.yml b/buildlib/azure-pipelines.yml
index e1ed19c6e7ad93..f488bfe607c482 100644
--- a/buildlib/azure-pipelines.yml
+++ b/buildlib/azure-pipelines.yml
@@ -35,16 +35,16 @@ stages:
 
           - bash: |
               set -e
-              mkdir build-gcc8
-              cd build-gcc8
-              CC=gcc-8 CFLAGS="-Werror" cmake -GNinja .. -DIOCTL_MODE=both -DENABLE_STATIC=1
+              mkdir build-gcc9
+              cd build-gcc9
+              CC=gcc-9 CFLAGS="-Werror" cmake -GNinja .. -DIOCTL_MODE=both -DENABLE_STATIC=1
               ninja
-            displayName: gcc 8.3 Compile
+            displayName: gcc 9.1 Compile
 
           - bash: |
               set -e
-              cd build-gcc8
-              python2.7 ../buildlib/check-build --src .. --cc gcc-8
+              cd build-gcc9
+              python2.7 ../buildlib/check-build --src .. --cc gcc-9
             displayName: Check Build Script
 
           # Run sparse on the subdirectories which are sparse clean
@@ -75,9 +75,9 @@ stages:
               set -e
               mv util/udma_barrier.h util/udma_barrier.h.old
               echo "#error Fail" >> util/udma_barrier.h
-              cd build-gcc8
+              cd build-gcc9
               rm CMakeCache.txt
-              CC=gcc-8 CFLAGS="-Werror" cmake -GNinja .. -DIOCTL_MODE=both
+              CC=gcc-9 CFLAGS="-Werror" cmake -GNinja .. -DIOCTL_MODE=both
               ninja
               mv ../util/udma_barrier.h.old ../util/udma_barrier.h
             displayName: Simulate non-coherent DMA Platform Compile
@@ -117,7 +117,7 @@ stages:
               set -e
               mkdir build-pandoc artifacts
               cd build-pandoc
-              CC=gcc-8 cmake -GNinja ..
+              CC=gcc-9 cmake -GNinja ..
               ninja docs
               cd ../artifacts
               # FIXME: Check Build.SourceBranch for tag consistency
diff --git a/buildlib/cbuild b/buildlib/cbuild
index 9fd51cc750dcbb..34051e55c24e81 100755
--- a/buildlib/cbuild
+++ b/buildlib/cbuild
@@ -106,7 +106,7 @@ class Environment(object):
 
 class YumEnvironment(Environment):
     is_rpm = True;
-    def get_docker_file(self):
+    def get_docker_file(self,tmpdir):
         res = DockerFile(self.docker_parent);
         res.lines.append("RUN yum install -y %s && yum clean all"%(
             " ".join(sorted(self.pkgs))));
@@ -163,8 +163,8 @@ class centos7_epel(centos7):
     is_rpm = False;
     to_azp = False;
 
-    def get_docker_file(self):
-        res = YumEnvironment.get_docker_file(self);
+    def get_docker_file(self,tmpdir):
+        res = YumEnvironment.get_docker_file(self,tmpdir);
         res.lines.insert(1,"RUN yum install -y epel-release");
         res.lines.append("RUN ln -s /usr/bin/cmake3 /usr/local/bin/cmake && ln -sf /usr/bin/python3.4 /usr/bin/python3");
         return res;
@@ -185,7 +185,7 @@ class fc30(Environment):
     is_rpm = True;
     aliases = {"fedora"};
 
-    def get_docker_file(self):
+    def get_docker_file(self,tmpdir):
         res = DockerFile(self.docker_parent);
         res.lines.append("RUN dnf install -y %s && dnf clean all"%(
             " ".join(sorted(self.pkgs))));
@@ -196,12 +196,39 @@ class fc30(Environment):
 class APTEnvironment(Environment):
     is_deb = True;
     build_python = True;
-    def get_docker_file(self):
+    def get_docker_file(self,tmpdir):
         res = DockerFile(self.docker_parent);
         res.lines.append("RUN apt-get update && apt-get install -y --no-install-recommends %s && apt-get clean && rm -rf /usr/share/doc/ /usr/lib/debug"%(
             " ".join(sorted(self.pkgs))));
         return res;
 
+    def add_source_list(self,tmpdir,name,content):
+        sld = os.path.join(tmpdir,"etc","apt","sources.list.d");
+        if not os.path.isdir(sld):
+            os.makedirs(sld);
+        with open(os.path.join(sld,name),"w") as F:
+            F.write(content + "\n");
+
+    def add_ppa(self,tmpdir,srcline,keyid):
+        gpgd = os.path.join(tmpdir,"etc","apt","trusted.gpg.d");
+        if not os.path.isdir(gpgd):
+            os.makedirs(gpgd);
+
+        # The container does not have gpg or other stuff to get the signing
+        # key for the toolchain ppa.  Fetch it in the host and just import the
+        # gpg data directly into the trusted keyring.
+        kb = os.path.join(tmpdir,"%s.kb.gpg"%(keyid));
+        subprocess.check_call(["gpg","--no-default-keyring","--keyring",kb,"--always-trust",
+                               "--recv-key",keyid]);
+        kr = os.path.join(gpgd,"%s.gpg"%(keyid));
+        with open(kr,"wb") as F:
+            F.write(subprocess.check_output(["gpg","--no-default-keyring",
+                                             "--keyring",kb,
+                                             "--export",keyid]));
+        os.unlink(kb);
+
+        self.add_source_list(tmpdir,keyid + ".list",srcline);
+
 class xenial(APTEnvironment):
     docker_parent = "ubuntu:16.04"
     pkgs = {
@@ -252,7 +279,7 @@ class debian_experimental(APTEnvironment):
     pkgs = (stretch.pkgs ^ {"gcc"}) | {"gcc-9"};
     name = "debian-experimental";
 
-    def get_docker_file(self):
+    def get_docker_file(self,tmpdir):
         res = DockerFile(self.docker_parent);
         res.lines.append("RUN apt-get update && apt-get -t experimental install -y --no-install-recommends %s && apt-get clean"%(
             " ".join(sorted(self.pkgs))));
@@ -330,10 +357,10 @@ class travis(APTEnvironment):
     def get_cython(self):
         return ["""RUN pip3 install cython"""]
 
-    def get_docker_file(self):
+    def get_docker_file(self,tmpdir):
         # First this to get apt-add-repository
         self.pkgs = {"software-properties-common"}
-        res = APTEnvironment.get_docker_file(self);
+        res = APTEnvironment.get_docker_file(self,tmpdir);
 
         # Sources list from the travis.yml
         res.lines.extend(self.get_repos());
@@ -357,7 +384,7 @@ class travis(APTEnvironment):
 class ZypperEnvironment(Environment):
     proxy = False;
     is_rpm = True;
-    def get_docker_file(self):
+    def get_docker_file(self,tmpdir):
         res = DockerFile(self.docker_parent);
         res.lines.append("RUN zypper --non-interactive refresh");
         res.lines.append("RUN zypper --non-interactive dist-upgrade");
@@ -407,7 +434,7 @@ class azure_pipelines(bionic):
         "ca-certificates",
         "clang-7",
         "fakeroot",
-        "gcc-8",
+        "gcc-9",
         "git",
         "python2.7",
         "python3-yaml",
@@ -415,7 +442,7 @@ class azure_pipelines(bionic):
         'python-docutils',
     } | {
         # 32 bit build support
-        "libgcc-8-dev:i386",
+        "libgcc-9-dev:i386",
         "libc6-dev:i386",
         "libnl-3-dev:i386",
         "libnl-route-3-dev:i386",
@@ -435,14 +462,20 @@ class azure_pipelines(bionic):
     name = "azure_pipelines";
     aliases = {"azp"}
 
-    def get_docker_file(self):
-        res = bionic.get_docker_file(self);
+    def get_docker_file(self,tmpdir):
+        res = bionic.get_docker_file(self,tmpdir);
+        self.add_ppa(tmpdir,
+                     "deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu bionic main",
+                     "60C317803A41BA51845E371A1E9377A2BA9EF27F");
+        self.add_source_list(tmpdir,"arm64.list",
+                             """deb [arch=arm64] http://ports.ubuntu.com/ bionic main universe
+deb [arch=arm64] http://ports.ubuntu.com/ bionic-security main universe
+deb [arch=arm64] http://ports.ubuntu.com/ bionic-updates main universe""");
+
+        res.lines.insert(1,"ADD etc/ /etc/");
         res.lines.insert(1,"RUN dpkg --add-architecture i386 &&"
                          "dpkg --add-architecture arm64 &&"
-                         "sed -i -e 's/^deb /deb [arch=amd64,i386] /g' /etc/apt/sources.list &&"
-                         "echo 'deb [arch=arm64] http://ports.ubuntu.com/ bionic main universe\\n"
-                               "deb [arch=arm64] http://ports.ubuntu.com/ bionic-security main universe\\n"
-                               "deb [arch=arm64] http://ports.ubuntu.com/ bionic-updates main universe' > /etc/apt/sources.list.d/arm64.list");
+                         "sed -i -e 's/^deb /deb [arch=amd64,i386] /g' /etc/apt/sources.list");
         return res;
 
 # -------------------------------------------------------------------------
@@ -1047,8 +1080,8 @@ def cmd_build_images(args):
     """Run from the top level source directory to make the docker images that are
     needed for building. This only needs to be run once."""
     for env in args.ENV:
-        df = env.get_docker_file();
         with private_tmp(args) as tmpdir:
+            df = env.get_docker_file(tmpdir);
             fn = os.path.join(tmpdir,"Dockerfile");
             with open(fn,"wt") as F:
                 for ln in df.lines:
-- 
2.22.0


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH rdma-core 10/19] build/azp: Use clang 8.0 for building
  2019-07-23 19:01 [PATCH rdma-core 00/19] Complete the azure pipelines configuration Jason Gunthorpe
                   ` (8 preceding siblings ...)
  2019-07-23 19:01 ` [PATCH rdma-core 09/19] build/azp: Use gcc 9.3 for building Jason Gunthorpe
@ 2019-07-23 19:01 ` Jason Gunthorpe
  2019-07-23 19:01 ` [PATCH rdma-core 11/19] build/azp: Run a test compile on ppc64el as well Jason Gunthorpe
                   ` (8 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: Jason Gunthorpe @ 2019-07-23 19:01 UTC (permalink / raw)
  To: linux-rdma; +Cc: Jason Gunthorpe

From: Jason Gunthorpe <jgg@mellanox.com>

Latest release

Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
---
 buildlib/azure-pipelines.yml | 10 +++++-----
 buildlib/cbuild              |  5 ++++-
 2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/buildlib/azure-pipelines.yml b/buildlib/azure-pipelines.yml
index f488bfe607c482..f6f71ac0adfa42 100644
--- a/buildlib/azure-pipelines.yml
+++ b/buildlib/azure-pipelines.yml
@@ -67,9 +67,9 @@ stages:
               set -e
               mkdir build-clang
               cd build-clang
-              CC=clang-7 CFLAGS="-Werror -m32 -msse3" cmake -GNinja .. -DIOCTL_MODE=both -DNO_PYVERBS=1
+              CC=clang-8 CFLAGS="-Werror -m32 -msse3" cmake -GNinja .. -DIOCTL_MODE=both -DNO_PYVERBS=1
               ninja
-            displayName: clang 7.0 32-bit Compile
+            displayName: clang 8.0 32-bit Compile
 
           - bash: |
               set -e
@@ -97,12 +97,12 @@ stages:
               echo 'set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")' >> buildlib/RDMA_EnableCStd.cmake
               sed -i -e 's/-DCMAKE_BUILD_TYPE=Release/-DCMAKE_BUILD_TYPE=Debug/g' debian/rules
               sed -i -e 's/ninja \(.*\)-v/ninja \1/g' debian/rules
-              debian/rules CC=clang-7 build
-            displayName: clang 7.0 Bionic Build
+              debian/rules CC=clang-8 build
+            displayName: clang 8.0 Bionic Build
           - bash: |
               set -e
               fakeroot debian/rules binary
-            displayName: clang 7.0 Bionic .deb Build
+            displayName: clang 8.0 Bionic .deb Build
 
       - job: SrcPrep
         displayName: Build Source Tar
diff --git a/buildlib/cbuild b/buildlib/cbuild
index 34051e55c24e81..0be5d498bc1ae8 100755
--- a/buildlib/cbuild
+++ b/buildlib/cbuild
@@ -432,7 +432,7 @@ class azure_pipelines(bionic):
         "abi-compliance-checker",
         "abi-dumper",
         "ca-certificates",
-        "clang-7",
+        "clang-8",
         "fakeroot",
         "gcc-9",
         "git",
@@ -467,6 +467,9 @@ class azure_pipelines(bionic):
         self.add_ppa(tmpdir,
                      "deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu bionic main",
                      "60C317803A41BA51845E371A1E9377A2BA9EF27F");
+        self.add_ppa(tmpdir,
+                     "deb [arch=amd64] http://apt.llvm.org/bionic/ llvm-toolchain-bionic-8 main",
+                     "15CF4D18AF4F7421");
         self.add_source_list(tmpdir,"arm64.list",
                              """deb [arch=arm64] http://ports.ubuntu.com/ bionic main universe
 deb [arch=arm64] http://ports.ubuntu.com/ bionic-security main universe
-- 
2.22.0


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH rdma-core 11/19] build/azp: Run a test compile on ppc64el as well
  2019-07-23 19:01 [PATCH rdma-core 00/19] Complete the azure pipelines configuration Jason Gunthorpe
                   ` (9 preceding siblings ...)
  2019-07-23 19:01 ` [PATCH rdma-core 10/19] build/azp: Use clang 8.0 " Jason Gunthorpe
@ 2019-07-23 19:01 ` Jason Gunthorpe
  2019-07-23 19:01 ` [PATCH rdma-core 12/19] build/azp: Add Fedora 30 to the distro testing Jason Gunthorpe
                   ` (7 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: Jason Gunthorpe @ 2019-07-23 19:01 UTC (permalink / raw)
  To: linux-rdma; +Cc: Jason Gunthorpe

From: Jason Gunthorpe <jgg@mellanox.com>

Now that we have bionic this is fairly simple to get a cross compile
environment, use the same approach as for ARM64.

Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
---
 buildlib/azure-pipelines.yml |  8 ++++++++
 buildlib/cbuild              | 16 +++++++++++++---
 2 files changed, 21 insertions(+), 3 deletions(-)

diff --git a/buildlib/azure-pipelines.yml b/buildlib/azure-pipelines.yml
index f6f71ac0adfa42..1d4e1f317bbe0f 100644
--- a/buildlib/azure-pipelines.yml
+++ b/buildlib/azure-pipelines.yml
@@ -90,6 +90,14 @@ stages:
               ninja
             displayName: gcc 8.3 ARM64 Compile
 
+          - bash: |
+              set -e
+              mkdir build-ppc64el
+              cd build-ppc64el
+              CC=powerpc64le-linux-gnu-gcc-8 CFLAGS="-Werror" cmake -GNinja .. -DIOCTL_MODE=both -DNO_PYVERBS=1
+              ninja
+            displayName: gcc 8.3 PPC64EL Compile
+
           # When running cmake through debian/rules it is hard to set -Werror,
           # instead force it on by changing the CMakeLists.txt
           - bash: |
diff --git a/buildlib/cbuild b/buildlib/cbuild
index 0be5d498bc1ae8..6e9a9cec9cd6cd 100755
--- a/buildlib/cbuild
+++ b/buildlib/cbuild
@@ -457,6 +457,15 @@ class azure_pipelines(bionic):
         "libnl-route-3-dev:arm64",
         "libsystemd-dev:arm64",
         "libudev-dev:arm64",
+    } | {
+        # PPC 64 cross compiler
+        "gcc-8-powerpc64le-linux-gnu",
+        "libgcc-8-dev:ppc64el",
+        "libc6-dev:ppc64el",
+        "libnl-3-dev:ppc64el",
+        "libnl-route-3-dev:ppc64el",
+        "libsystemd-dev:ppc64el",
+        "libudev-dev:ppc64el",
     }
     to_azp = True;
     name = "azure_pipelines";
@@ -471,12 +480,13 @@ class azure_pipelines(bionic):
                      "deb [arch=amd64] http://apt.llvm.org/bionic/ llvm-toolchain-bionic-8 main",
                      "15CF4D18AF4F7421");
         self.add_source_list(tmpdir,"arm64.list",
-                             """deb [arch=arm64] http://ports.ubuntu.com/ bionic main universe
-deb [arch=arm64] http://ports.ubuntu.com/ bionic-security main universe
-deb [arch=arm64] http://ports.ubuntu.com/ bionic-updates main universe""");
+                             """deb [arch=arm64,ppc64el] http://ports.ubuntu.com/ bionic main universe
+deb [arch=arm64,ppc64el] http://ports.ubuntu.com/ bionic-security main universe
+deb [arch=arm64,ppc64el] http://ports.ubuntu.com/ bionic-updates main universe""");
 
         res.lines.insert(1,"ADD etc/ /etc/");
         res.lines.insert(1,"RUN dpkg --add-architecture i386 &&"
+                         "dpkg --add-architecture ppc64el &&"
                          "dpkg --add-architecture arm64 &&"
                          "sed -i -e 's/^deb /deb [arch=amd64,i386] /g' /etc/apt/sources.list");
         return res;
-- 
2.22.0


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH rdma-core 12/19] build/azp: Add Fedora 30 to the distro testing
  2019-07-23 19:01 [PATCH rdma-core 00/19] Complete the azure pipelines configuration Jason Gunthorpe
                   ` (10 preceding siblings ...)
  2019-07-23 19:01 ` [PATCH rdma-core 11/19] build/azp: Run a test compile on ppc64el as well Jason Gunthorpe
@ 2019-07-23 19:01 ` Jason Gunthorpe
  2019-07-23 19:01 ` [PATCH rdma-core 13/19] build/azp: Update check-build to work with python3 Jason Gunthorpe
                   ` (6 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: Jason Gunthorpe @ 2019-07-23 19:01 UTC (permalink / raw)
  To: linux-rdma; +Cc: Jason Gunthorpe

From: Jason Gunthorpe <jgg@mellanox.com>

Fedora represents the latest cutting edge upstream.

Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
---
 buildlib/azure-pipelines.yml | 7 +++++++
 buildlib/cbuild              | 1 +
 2 files changed, 8 insertions(+)

diff --git a/buildlib/azure-pipelines.yml b/buildlib/azure-pipelines.yml
index 1d4e1f317bbe0f..7df483e3329534 100644
--- a/buildlib/azure-pipelines.yml
+++ b/buildlib/azure-pipelines.yml
@@ -13,6 +13,9 @@ resources:
     - container: centos7
       image: ucfconsort.azurecr.io/rdma-core/centos7:25.0
       endpoint: ucfconsort_registry
+    - container: fedora
+      image: ucfconsort.azurecr.io/rdma-core/fc30:25.0
+      endpoint: ucfconsort_registry
     - container: leap
       image: ucfconsort.azurecr.io/rdma-core/opensuse-15.0:25.0
       endpoint: ucfconsort_registry
@@ -149,6 +152,10 @@ stages:
               CONTAINER: centos7
               SPEC: redhat/rdma-core.spec
               RPMBUILD_OPTS:
+            fedora30:
+              CONTAINER: fedora
+              SPEC: redhat/rdma-core.spec
+              RPMBUILD_OPTS:
             leap:
               CONTAINER: leap
               SPEC: suse/rdma-core.spec
diff --git a/buildlib/cbuild b/buildlib/cbuild
index 6e9a9cec9cd6cd..1441a91a8427fd 100755
--- a/buildlib/cbuild
+++ b/buildlib/cbuild
@@ -184,6 +184,7 @@ class fc30(Environment):
     ninja_cmd = "ninja-build";
     is_rpm = True;
     aliases = {"fedora"};
+    to_azp = True;
 
     def get_docker_file(self,tmpdir):
         res = DockerFile(self.docker_parent);
-- 
2.22.0


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH rdma-core 13/19] build/azp: Update check-build to work with python3
  2019-07-23 19:01 [PATCH rdma-core 00/19] Complete the azure pipelines configuration Jason Gunthorpe
                   ` (11 preceding siblings ...)
  2019-07-23 19:01 ` [PATCH rdma-core 12/19] build/azp: Add Fedora 30 to the distro testing Jason Gunthorpe
@ 2019-07-23 19:01 ` Jason Gunthorpe
  2019-07-23 19:01 ` [PATCH rdma-core 14/19] build/cbuild: Update cbuild " Jason Gunthorpe
                   ` (5 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: Jason Gunthorpe @ 2019-07-23 19:01 UTC (permalink / raw)
  To: linux-rdma; +Cc: Jason Gunthorpe

From: Jason Gunthorpe <jgg@mellanox.com>

Remove dependencies on python2.7 so it can be removed from the container.

Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
---
 buildlib/azure-pipelines.yml | 10 +++++---
 buildlib/cbuild              |  7 +++--
 buildlib/check-build         | 50 +++++++++++++++++++-----------------
 3 files changed, 37 insertions(+), 30 deletions(-)

diff --git a/buildlib/azure-pipelines.yml b/buildlib/azure-pipelines.yml
index 7df483e3329534..39188a4c0b727b 100644
--- a/buildlib/azure-pipelines.yml
+++ b/buildlib/azure-pipelines.yml
@@ -44,11 +44,13 @@ stages:
               ninja
             displayName: gcc 9.1 Compile
 
-          - bash: |
-              set -e
-              cd build-gcc9
-              python2.7 ../buildlib/check-build --src .. --cc gcc-9
+          - task: PythonScript@0
             displayName: Check Build Script
+            inputs:
+              scriptPath: buildlib/check-build
+              arguments: --src .. --cc gcc-9
+              workingDirectory: build-gcc9
+              pythonInterpreter: /usr/bin/python3
 
           # Run sparse on the subdirectories which are sparse clean
           - bash: |
diff --git a/buildlib/cbuild b/buildlib/cbuild
index 1441a91a8427fd..1de550e7bf8934 100755
--- a/buildlib/cbuild
+++ b/buildlib/cbuild
@@ -903,8 +903,11 @@ def run_azp_build(args,env):
             script.append(I["bash"]);
         elif I.get("task") == "PythonScript@0":
             script.append("set -e");
-            script.append("%s %s"%(I["inputs"]["pythonInterpreter"],
-                                   I["inputs"]["scriptPath"]));
+            if "workingDirectory" in I["inputs"]:
+                script.append("cd %s"%(os.path.join(srcdir,I["inputs"]["workingDirectory"])));
+            script.append("%s %s %s"%(I["inputs"]["pythonInterpreter"],
+                                      os.path.join(srcdir,I["inputs"]["scriptPath"]),
+                                      I["inputs"].get("arguments","")));
         else:
             raise ValueError("Unknown stanza %r"%(I));
 
diff --git a/buildlib/check-build b/buildlib/check-build
index 82812272b40b1d..acb72f0e1f2588 100755
--- a/buildlib/check-build
+++ b/buildlib/check-build
@@ -1,7 +1,8 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # Copyright 2017 Obsidian Research Corp.
 # Licensed under BSD (MIT variant) or GPLv2. See COPYING.
 """check-build - Run static checks on a build"""
+from __future__ import print_function
 import argparse
 import inspect
 import os
@@ -18,7 +19,7 @@ from distutils.version import LooseVersion;
 
 def get_src_dir():
     """Get the source directory using git"""
-    git_top = subprocess.check_output(["git","rev-parse","--git-dir"]).strip();
+    git_top = subprocess.check_output(["git","rev-parse","--git-dir"]).decode().strip();
     if git_top == ".git":
         return ".";
     return os.path.dirname(git_top);
@@ -55,7 +56,8 @@ def private_tmp():
 
 def get_symbol_vers(fn,exported=True):
     """Return the symbol version suffixes from the ELF file, eg IB_VERBS_1.0, etc"""
-    syms = subprocess.check_output(["readelf","--wide","-s",fn]);
+    syms = subprocess.check_output(["readelf","--wide","-s",fn]).decode();
+
     go = False;
     res = set();
     for I in syms.splitlines():
@@ -166,7 +168,7 @@ def check_abi(args,fn):
                            "-o",cur_fn]);
 
     if not os.path.exists(ref_fn):
-        print >> sys.stderr, "ABI file does not exist for %r"%(ref_fn);
+        print("ABI file does not exist for %r"%(ref_fn), file=sys.stderr);
         return False;
 
     subprocess.check_call(["abi-compliance-checker",
@@ -183,7 +185,7 @@ def test_verbs_uapi(args):
 
     # User must provide the ABI dir in the source tree
     if not os.path.isdir(os.path.join(args.SRC,"ABI")):
-        print "ABI check skipped, no ABI/ directory.";
+        print("ABI check skipped, no ABI/ directory.");
         return;
 
     libd = os.path.join(args.BUILD,"lib");
@@ -221,24 +223,24 @@ def get_headers(incdir):
     return includes;
 
 def compile_test_headers(tmpd,incdir,includes,with_cxx=False):
-    cppflags = subprocess.check_output(["pkg-config","libnl-3.0","--cflags-only-I"]).strip();
+    cppflags = subprocess.check_output(["pkg-config","libnl-3.0","--cflags-only-I"]).decode().strip();
     cppflags = "-I %s %s"%(incdir,cppflags)
     with open(os.path.join(tmpd,"build.ninja"),"wt") as F:
-        print >> F,"rule comp";
-        print >> F," command = %s -Werror -c %s $in -o $out"%(args.CC,cppflags);
-        print >> F," description=Header check for $in";
-        print >> F,"rule comp_cxx";
-        print >> F," command = %s -Werror -c %s $in -o $out"%(args.CXX,cppflags);
-        print >> F," description=Header C++ check for $in";
+        print("rule comp", file=F);
+        print(" command = %s -Werror -c %s $in -o $out"%(args.CC,cppflags), file=F);
+        print(" description=Header check for $in", file=F);
+        print("rule comp_cxx", file=F);
+        print(" command = %s -Werror -c %s $in -o $out"%(args.CXX,cppflags), file=F);
+        print(" description=Header C++ check for $in", file=F);
         count = 0;
         for I in sorted(includes):
             if is_obsolete(I) or is_fixup(I):
                 continue;
-            print >> F,"build %s : comp %s"%("out%d.o"%(count),I);
-            print >> F,"default %s"%("out%d.o"%(count));
-            print >> F,"build %s : comp_cxx %s"%("outxx%d.o"%(count),I);
+            print("build %s : comp %s"%("out%d.o"%(count),I), file=F);
+            print("default %s"%("out%d.o"%(count)), file=F);
+            print("build %s : comp_cxx %s"%("outxx%d.o"%(count),I), file=F);
             if with_cxx:
-                print >> F,"default %s"%("outxx%d.o"%(count));
+                print("default %s"%("outxx%d.o"%(count)), file=F);
             count = count + 1;
     subprocess.check_call(["ninja"],cwd=tmpd);
 
@@ -286,7 +288,7 @@ def test_installed_headers(args):
         subprocess.check_output(["ninja","install"],env=env,cwd=args.BUILD);
 
         includes = get_headers(tmpd);
-        incdir = os.path.commonprefix(includes);
+        incdir = os.path.commonprefix(list(includes));
         rincludes = {I[len(incdir):] for I in includes};
 
         bincdir = os.path.abspath(os.path.join(args.BUILD,"include"));
@@ -308,7 +310,7 @@ def test_installed_headers(args):
                 os.makedirs(dfn);
             assert not os.path.exists(I);
             with open(I,"w") as F:
-                print >> F,'#error "Private internal header"';
+                print('#error "Private internal header"', file=F);
 
         # Roughly check that the headers have the extern "C" for C++
         # compilation.
@@ -324,7 +326,7 @@ def test_installed_headers(args):
 
 def get_symbol_names(fn):
     """Return the defined, public, symbols from a ELF shlib"""
-    syms = subprocess.check_output(["readelf", "--wide", "-s", fn])
+    syms = subprocess.check_output(["readelf", "--wide", "-s", fn]).decode()
     go = False
     res = set()
     for I in syms.splitlines():
@@ -352,7 +354,7 @@ def get_cc_args_from_pkgconfig(args, name, static):
     flags = ["pkg-config", "--errors-to-stdout", "--cflags", "--libs"]
     if static:
         flags.append("--static")
-    opts = subprocess.check_output(flags + ["lib" + name])
+    opts = subprocess.check_output(flags + ["lib" + name]).decode()
     opts = shlex.split(opts)
 
     opts.insert(0, "-Wall")
@@ -365,7 +367,7 @@ def get_cc_args_from_pkgconfig(args, name, static):
     # The old pkg-config that travis uses incorrectly removes duplicated
     # flags, which breaks linking.
     if (name == "ibverbs" and
-        subprocess.check_output(["pkg-config", "--version"]).strip() == "0.26"):
+        subprocess.check_output(["pkg-config", "--version"]).decode().strip() == "0.26"):
         opts.insert(0, "-libverbs")
 
     # Only static link the pkg-config stuff, otherwise we get warnings about
@@ -392,7 +394,7 @@ def get_cc_args_from_pkgconfig(args, name, static):
 
 
 def compile_ninja(args, Fninja, name, cfn, opts):
-    print >> Fninja, """
+    print("""
 rule comp_{name}
     command = {CC} -Wall -o $out $in {opts}
     description = Compile and link $out
@@ -401,7 +403,7 @@ default {name}""".format(
         name=name,
         CC=args.CC,
         cfn=cfn,
-        opts=" ".join(pipes.quote(I) for I in opts))
+        opts=" ".join(pipes.quote(I) for I in opts)), file=Fninja)
 
 
 def get_providers(args):
@@ -510,6 +512,6 @@ args.SRC = os.path.abspath(args.SRC);
 args.PACKAGE_VERSION = get_package_version(args);
 
 funcs = globals();
-for k,v in funcs.items():
+for k,v in list(funcs.items()):
     if k.startswith("test_") and inspect.isfunction(v):
         v(args);
-- 
2.22.0


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH rdma-core 14/19] build/cbuild: Update cbuild to work with python3
  2019-07-23 19:01 [PATCH rdma-core 00/19] Complete the azure pipelines configuration Jason Gunthorpe
                   ` (12 preceding siblings ...)
  2019-07-23 19:01 ` [PATCH rdma-core 13/19] build/azp: Update check-build to work with python3 Jason Gunthorpe
@ 2019-07-23 19:01 ` Jason Gunthorpe
  2019-07-23 19:01 ` [PATCH rdma-core 15/19] build/azp: Reduce the package list Jason Gunthorpe
                   ` (4 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: Jason Gunthorpe @ 2019-07-23 19:01 UTC (permalink / raw)
  To: linux-rdma; +Cc: Jason Gunthorpe

From: Jason Gunthorpe <jgg@mellanox.com>

This is the last script run from azp that was using python2.

Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
---
 buildlib/azure-pipelines.yml |  2 +-
 buildlib/cbuild              | 53 +++++++++++++++++++-----------------
 2 files changed, 29 insertions(+), 26 deletions(-)

diff --git a/buildlib/azure-pipelines.yml b/buildlib/azure-pipelines.yml
index 39188a4c0b727b..e062908e23756b 100644
--- a/buildlib/azure-pipelines.yml
+++ b/buildlib/azure-pipelines.yml
@@ -134,7 +134,7 @@ stages:
               ninja docs
               cd ../artifacts
               # FIXME: Check Build.SourceBranch for tag consistency
-              python2.7 ../buildlib/cbuild make-dist-tar ../build-pandoc
+              python3 ../buildlib/cbuild make-dist-tar ../build-pandoc
             displayName: Prebuild Documentation
 
           - task: PublishPipelineArtifact@0
diff --git a/buildlib/cbuild b/buildlib/cbuild
index 1de550e7bf8934..d6727f46669197 100755
--- a/buildlib/cbuild
+++ b/buildlib/cbuild
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # Copyright 2015-2016 Obsidian Research Corp.
 # Licensed under BSD (MIT variant) or GPLv2. See COPYING.
 # PYTHON_ARGCOMPLETE_OK
@@ -36,6 +36,7 @@ finished, only the base container created during 'build-images' is kept. The
 running the build command and instead run an interactive bash shell. This is
 useful for debugging certain kinds of build problems."""
 
+from __future__ import print_function
 import argparse
 import collections
 import filecmp
@@ -572,8 +573,8 @@ def docker_cmd_str(env,*cmd):
     """Invoke docker"""
     cmd = list(cmd);
     if env.sudo:
-        return subprocess.check_output(["sudo","docker"] + cmd);
-    return subprocess.check_output(["docker"] + cmd);
+        return subprocess.check_output(["sudo","docker"] + cmd).decode();
+    return subprocess.check_output(["docker"] + cmd).decode();
 
 @contextmanager
 def private_tmp(args):
@@ -684,7 +685,7 @@ def run_rpm_build(args,spec_file,env):
         # rpmbuild complains if we do not have an entry in passwd and group
         # for the user we are going to use to do the build.
         with open(os.path.join(tmpdir,"go.py"),"w") as F:
-            print >> F,"""
+            print("""
 import os,subprocess;
 with open("/etc/passwd","a") as F:
    F.write({passwd!r} + "\\n");
@@ -703,7 +704,7 @@ os.symlink({tarfn!r},os.path.join(b"SOURCES",tarfn));
            uid=os.getuid(),
            gid=os.getgid(),
            tarfn=tarfn,
-           tspec_file=tspec_file);
+           tspec_file=tspec_file), file=F);
 
             extra_opts = getattr(env,"rpmbuild_options", [])
             bopts = ["-bb",tspec_file] + extra_opts;
@@ -715,8 +716,8 @@ os.symlink({tarfn!r},os.path.join(b"SOURCES",tarfn));
                 if env.build_pyverbs:
                     bopts.extend(["--with", "pyverbs"]);
 
-            print >> F,'os.execlp("rpmbuild","rpmbuild",%s)'%(
-                ",".join(repr(I) for I in bopts));
+            print('os.execlp("rpmbuild","rpmbuild",%s)'%(
+                ",".join(repr(I) for I in bopts)), file=F);
 
         if args.run_shell:
             opts.append("-ti");
@@ -729,10 +730,10 @@ os.symlink({tarfn!r},os.path.join(b"SOURCES",tarfn));
 
         docker_cmd(args,*opts)
 
-        print
+        print()
         for path,jnk,files in os.walk(os.path.join(tmpdir,"RPMS")):
             for I in files:
-                print "Final RPM: ",os.path.join("..",I);
+                print("Final RPM: ",os.path.join("..",I));
                 shutil.move(os.path.join(path,I),
                             os.path.join("..",I));
 
@@ -765,7 +766,7 @@ def run_deb_build(args,env):
         # Create a go.py that will let us run the compilation as the user and
         # then switch to root only for the packaging step.
         with open(os.path.join(tmpdir,"go.py"),"w") as F:
-            print >> F,"""
+            print("""
 import subprocess,os;
 def to_user():
    os.setgid({gid:d});
@@ -774,7 +775,7 @@ subprocess.check_call(["debian/rules","debian/rules","build"],
             preexec_fn=to_user);
 subprocess.check_call(["debian/rules","debian/rules","binary"]);
 """.format(uid=os.getuid(),
-           gid=os.getgid());
+           gid=os.getgid()), file=F);
 
         if args.run_shell:
             opts.append("-ti");
@@ -787,10 +788,10 @@ subprocess.check_call(["debian/rules","debian/rules","binary"]);
 
         docker_cmd(args,*opts);
 
-        print
+        print()
         for I in os.listdir(tmpdir):
             if I.endswith(".deb"):
-                print "Final DEB: ",os.path.join("..",I);
+                print("Final DEB: ",os.path.join("..",I));
                 shutil.move(os.path.join(tmpdir,I),
                             os.path.join("..",I));
 
@@ -810,7 +811,7 @@ def copy_abi_files(src):
             if os.path.isfile(ref_fn) and filecmp.cmp(ref_fn,cur_fn,False):
                 continue;
 
-            print "Changed ABI File: ", ref_fn;
+            print("Changed ABI File: ", ref_fn);
             shutil.copy(cur_fn, ref_fn);
 
 def run_travis_build(args,env):
@@ -832,7 +833,7 @@ def run_travis_build(args,env):
             base = subprocess.check_output(["git",
                                             "--git-dir",os.path.join(opwd,".git"),
                                             "merge-base",
-                                            "HEAD","FETCH_HEAD"]).strip();
+                                            "HEAD","FETCH_HEAD"]).decode().strip();
 
         home = os.path.join(os.path.sep,"home","travis");
         home_build = os.path.join(os.path.sep,home,"build");
@@ -856,10 +857,10 @@ def run_travis_build(args,env):
             cmds = yaml.safe_load(F)["script"];
 
         with open(os.path.join(tmpdir,"go.sh"),"w") as F:
-            print >> F,"#!/bin/bash";
-            print >> F,"set -e";
+            print("#!/bin/bash", file=F);
+            print("set -e", file=F);
             for I in cmds:
-                print >> F,I;
+                print(I, file=F);
 
         if args.run_shell:
             opts.append("-ti");
@@ -872,7 +873,7 @@ def run_travis_build(args,env):
 
         try:
             docker_cmd(args,*opts);
-        except subprocess.CalledProcessError, e:
+        except subprocess.CalledProcessError as e:
             copy_abi_files(os.path.join(tmpdir, "src/ABI"));
             raise;
         copy_abi_files(os.path.join(tmpdir, "src/ABI"));
@@ -929,7 +930,7 @@ def run_azp_build(args,env):
             base = subprocess.check_output(["git",
                                             "--git-dir",os.path.join(opwd,".git"),
                                             "merge-base",
-                                            "HEAD","FETCH_HEAD"]).strip();
+                                            "HEAD","FETCH_HEAD"]).decode().strip();
 
         opts = [
             "run",
@@ -959,7 +960,7 @@ def run_azp_build(args,env):
 
         try:
             docker_cmd(args,*opts);
-        except subprocess.CalledProcessError, e:
+        except subprocess.CalledProcessError as e:
             copy_abi_files(os.path.join(tmpdir, "s/ABI"));
             raise;
         copy_abi_files(os.path.join(tmpdir, "s/ABI"));
@@ -988,7 +989,7 @@ def cmd_pkg(args):
                           getattr(env,"specfile","%s.spec"%(project)),
                           env);
         else:
-            print "%s does not support packaging"%(env.name);
+            print("%s does not support packaging"%(env.name));
 
 # -------------------------------------------------------------------------
 
@@ -1102,7 +1103,7 @@ def cmd_build_images(args):
             fn = os.path.join(tmpdir,"Dockerfile");
             with open(fn,"wt") as F:
                 for ln in df.lines:
-                    print >> F,ln;
+                    print(ln, file=F);
             opts = (["build"] +
                     get_build_args(args,env) +
                     ["-f",fn,
@@ -1176,13 +1177,15 @@ def cmd_make_dist_tar(args):
 
 if __name__ == '__main__':
     parser = argparse.ArgumentParser(description='Operate docker for building this package')
-    subparsers = parser.add_subparsers(title="Sub Commands");
+    subparsers = parser.add_subparsers(title="Sub Commands",dest="command");
+    subparsers.required = True;
 
     funcs = globals();
-    for k,v in funcs.items():
+    for k,v in list(funcs.items()):
         if k.startswith("cmd_") and inspect.isfunction(v):
             sparser = subparsers.add_parser(k[4:].replace('_','-'),
                                             help=v.__doc__);
+            sparser.required = True;
             funcs["args_" + k[4:]](sparser);
             sparser.set_defaults(func=v);
 
-- 
2.22.0


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH rdma-core 15/19] build/azp: Reduce the package list
  2019-07-23 19:01 [PATCH rdma-core 00/19] Complete the azure pipelines configuration Jason Gunthorpe
                   ` (13 preceding siblings ...)
  2019-07-23 19:01 ` [PATCH rdma-core 14/19] build/cbuild: Update cbuild " Jason Gunthorpe
@ 2019-07-23 19:01 ` Jason Gunthorpe
  2019-07-23 19:01 ` [PATCH rdma-core 16/19] build/azp: Add centos6 to the test distributions Jason Gunthorpe
                   ` (3 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: Jason Gunthorpe @ 2019-07-23 19:01 UTC (permalink / raw)
  To: linux-rdma; +Cc: Jason Gunthorpe

From: Jason Gunthorpe <jgg@mellanox.com>

Remove some unneeded packages and files from the container. The unpacked
image size is reduced by about 120MB.

Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
---
 buildlib/cbuild | 27 +++++++++++++++++++++++----
 1 file changed, 23 insertions(+), 4 deletions(-)

diff --git a/buildlib/cbuild b/buildlib/cbuild
index d6727f46669197..cc9c7e2999a9d2 100755
--- a/buildlib/cbuild
+++ b/buildlib/cbuild
@@ -200,7 +200,7 @@ class APTEnvironment(Environment):
     build_python = True;
     def get_docker_file(self,tmpdir):
         res = DockerFile(self.docker_parent);
-        res.lines.append("RUN apt-get update && apt-get install -y --no-install-recommends %s && apt-get clean && rm -rf /usr/share/doc/ /usr/lib/debug"%(
+        res.lines.append("RUN apt-get update && apt-get install -y --no-install-recommends %s && apt-get clean && rm -rf /usr/share/doc/ /usr/lib/debug /var/lib/apt/lists/"%(
             " ".join(sorted(self.pkgs))));
         return res;
 
@@ -429,19 +429,38 @@ class tumbleweed(ZypperEnvironment):
 
 # -------------------------------------------------------------------------
 
-class azure_pipelines(bionic):
-    pkgs = bionic.pkgs | {
+class azure_pipelines(APTEnvironment):
+    docker_parent = "ubuntu:18.04"
+    pkgs = {
         "abi-compliance-checker",
         "abi-dumper",
         "ca-certificates",
         "clang-8",
+        "cmake",
+        "cython3",
+        "debhelper",
+        "dh-systemd",
+        "dpkg-dev",
         "fakeroot",
         "gcc-9",
         "git",
         "python2.7",
+        "libc6-dev",
+        "libnl-3-dev",
+        "libnl-route-3-dev",
+        "libsystemd-dev",
+        "libudev-dev",
+        "make",
+        "ninja-build",
+        "pandoc",
+        "pkg-config",
+        "python3-docutils",
+        "python3",
+        "python3-dev",
+        "python3-docutils",
         "python3-yaml",
         "sparse",
-        'python-docutils',
+        "valgrind",
     } | {
         # 32 bit build support
         "libgcc-9-dev:i386",
-- 
2.22.0


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH rdma-core 16/19] build/azp: Add centos6 to the test distributions
  2019-07-23 19:01 [PATCH rdma-core 00/19] Complete the azure pipelines configuration Jason Gunthorpe
                   ` (14 preceding siblings ...)
  2019-07-23 19:01 ` [PATCH rdma-core 15/19] build/azp: Reduce the package list Jason Gunthorpe
@ 2019-07-23 19:01 ` Jason Gunthorpe
  2019-07-23 19:01 ` [PATCH rdma-core 17/19] build/azp: Run lintian over the bionic .debs Jason Gunthorpe
                   ` (2 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: Jason Gunthorpe @ 2019-07-23 19:01 UTC (permalink / raw)
  To: linux-rdma; +Cc: Jason Gunthorpe

From: Jason Gunthorpe <jgg@mellanox.com>

We keep having small defects related to these old glibc's, run a build
here too. The spec file is based on the old pre-packaging rdma-core spec
file.

Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
---
 buildlib/azure-pipelines.yml |  11 +++-
 buildlib/cbuild              |  15 +++--
 buildlib/centos6.spec        | 109 +++++++++++++++++++++++++++++++++++
 3 files changed, 127 insertions(+), 8 deletions(-)
 create mode 100644 buildlib/centos6.spec

diff --git a/buildlib/azure-pipelines.yml b/buildlib/azure-pipelines.yml
index e062908e23756b..6a69e940a5b19e 100644
--- a/buildlib/azure-pipelines.yml
+++ b/buildlib/azure-pipelines.yml
@@ -10,6 +10,9 @@ resources:
     - container: azp
       image: ucfconsort.azurecr.io/rdma-core/azure_pipelines:25.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
@@ -150,6 +153,10 @@ stages:
           vmImage: 'Ubuntu-16.04'
         strategy:
           matrix:
+            centos6:
+              CONTAINER: centos6
+              SPEC: buildlib/centos6.spec
+              RPMBUILD_OPTS:
             centos7:
               CONTAINER: centos7
               SPEC: redhat/rdma-core.spec
@@ -175,7 +182,7 @@ stages:
               set -e
               mkdir SOURCES tmp
               tar --wildcards -xzf rdma-core*.tar.gz  */$(SPEC) --strip-components=2
-              RPM_SRC=$(rpmspec -P rdma-core.spec | awk '/^Source:/{split($0,a,"[ \t]+");print(a[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 rdma-core.spec $(RPMBUILD_OPTS)
+              rpmbuild --define '_tmppath '$(pwd)'/tmp' --define '_topdir '$(pwd) -bb *.spec $(RPMBUILD_OPTS)
             displayName: Perform Package Build
diff --git a/buildlib/cbuild b/buildlib/cbuild
index cc9c7e2999a9d2..e7065e3e7d8d2d 100755
--- a/buildlib/cbuild
+++ b/buildlib/cbuild
@@ -131,9 +131,10 @@ class centos6(YumEnvironment):
     name = "centos6";
     use_make = True;
     pandoc = False;
-    is_rpm = False;
     build_pyverbs = False;
+    specfile = "buildlib/centos6.spec";
     python_cmd = "python";
+    to_azp = True;
 
 class centos7(YumEnvironment):
     docker_parent = "centos:7";
@@ -713,11 +714,13 @@ with open("/etc/group","a") as F:
 os.setgid({gid:d});
 os.setuid({uid:d});
 
-# Get RPM to tell us the expected tar filename.
-for ln in subprocess.check_output(["rpmspec","-P",{tspec_file!r}]).splitlines():
-   if ln.startswith(b"Source:"):
-      tarfn = ln.strip().partition(b' ')[2].strip();
-os.symlink({tarfn!r},os.path.join(b"SOURCES",tarfn));
+# For Centos6
+if "check_output" in dir(subprocess):
+    # Get RPM to tell us the expected tar filename.
+    for ln in subprocess.check_output(["rpmspec","-P",{tspec_file!r}]).splitlines():
+       if ln.startswith(b"Source:"):
+          tarfn = ln.strip().partition(b' ')[2].strip();
+    os.symlink({tarfn!r},os.path.join(b"SOURCES",tarfn));
 """.format(passwd=":".join(str(I) for I in pwd.getpwuid(os.getuid())),
            group=":".join(str(I) for I in grp.getgrgid(os.getgid())),
            uid=os.getuid(),
diff --git a/buildlib/centos6.spec b/buildlib/centos6.spec
new file mode 100644
index 00000000000000..943b5e65c7e1e5
--- /dev/null
+++ b/buildlib/centos6.spec
@@ -0,0 +1,109 @@
+Name: rdma-core
+Version: 25.0
+Release: 1%{?dist}
+Summary: RDMA core userspace libraries and daemons
+
+# Almost everything is licensed under the OFA dual GPLv2, 2 Clause BSD license
+#  providers/ipathverbs/ Dual licensed using a BSD license with an extra patent clause
+#  providers/rxe/ Incorporates code from ipathverbs and contains the patent clause
+#  providers/hfi1verbs Uses the 3 Clause BSD license
+License: (GPLv2 or BSD) and (GPLv2 or PathScale-BSD)
+Url: https://github.com/linux-rdma/rdma-core
+Source: rdma-core.tgz
+
+BuildRequires: binutils
+BuildRequires: cmake >= 2.8.11
+BuildRequires: gcc
+BuildRequires: libudev-devel
+BuildRequires: pkgconfig
+BuildRequires: pkgconfig(libnl-3.0)
+BuildRequires: pkgconfig(libnl-route-3.0)
+BuildRequires: valgrind-devel
+BuildRequires: python
+
+%define CMAKE_FLAGS %{nil}
+BuildRequires: make
+
+%description
+Temporary packaging
+
+This is a simple example without the split sub packages to get things started.
+
+%prep
+%setup
+
+%build
+
+%define my_unitdir /tmp/
+
+# New RPM defines _rundir, usually as /run
+%if 0%{?_rundir:1}
+%else
+%define _rundir /var/run
+%endif
+
+# New RPM defines _udevrulesdir, usually as /usr/lib/udev/rules.d
+%if 0%{?_udevrulesdir:1}
+%else
+# This is the old path (eg for C6)
+%define _udevrulesdir /lib/udev/rules.d
+%endif
+
+# Pass all of the rpm paths directly to GNUInstallDirs and our other defines.
+%cmake %{CMAKE_FLAGS} \
+         -DCMAKE_BUILD_TYPE=Release \
+         -DCMAKE_INSTALL_BINDIR:PATH=%{_bindir} \
+         -DCMAKE_INSTALL_SBINDIR:PATH=%{_sbindir} \
+         -DCMAKE_INSTALL_LIBDIR:PATH=%{_libdir} \
+         -DCMAKE_INSTALL_LIBEXECDIR:PATH=%{_libexecdir} \
+         -DCMAKE_INSTALL_LOCALSTATEDIR:PATH=%{_localstatedir} \
+         -DCMAKE_INSTALL_SHAREDSTATEDIR:PATH=%{_sharedstatedir} \
+         -DCMAKE_INSTALL_INCLUDEDIR:PATH=%{_includedir} \
+         -DCMAKE_INSTALL_INFODIR:PATH=%{_infodir} \
+         -DCMAKE_INSTALL_MANDIR:PATH=%{_mandir} \
+         -DCMAKE_INSTALL_SYSCONFDIR:PATH=%{_sysconfdir} \
+	 -DCMAKE_INSTALL_SYSTEMD_SERVICEDIR:PATH=%{my_unitdir} \
+	 -DCMAKE_INSTALL_INITDDIR:PATH=%{_initrddir} \
+	 -DCMAKE_INSTALL_RUNDIR:PATH=%{_rundir} \
+	 -DCMAKE_INSTALL_DOCDIR:PATH=%{_docdir}/%{name}-%{version} \
+	 -DCMAKE_INSTALL_UDEV_RULESDIR:PATH=%{_udevrulesdir} \
+         -DCMAKE_INSTALL_PERLDIR:PATH=%{perl_vendorlib}
+make -s %{?_smp_mflags}
+
+%install
+DESTDIR=%{buildroot} make install
+
+%if 0%{?_unitdir:1}
+rm -rf %{buildroot}/%{_initrddir}/
+%else
+rm -rf %{buildroot}/%{my_unitdir}/
+%endif
+
+%files
+%doc %{_mandir}/man*/*
+%{_bindir}/*
+%{_includedir}/*
+%{_libdir}/lib*.so*
+%{_libdir}/libibverbs/*
+%{_libdir}/ibacm/*
+%{_libdir}/rsocket/*
+%{_libdir}/pkgconfig/*.pc
+%{_sbindir}/*
+%{_libexecdir}/*
+%{_udevrulesdir}/*
+%{_udevrulesdir}/../rdma_rename
+%doc %{_docdir}/%{name}-%{version}/*
+%if 0%{?_unitdir:1}
+%{_unitdir}/*
+%else
+%config %{_initrddir}/*
+%endif
+%config %{_sysconfdir}/iwpmd.conf
+%config %{_sysconfdir}/srp_daemon.conf
+%config %{_sysconfdir}/libibverbs.d/*
+%config %{_sysconfdir}/rdma/modules/*
+%{perl_vendorlib}/IBswcountlimits.pm
+%config(noreplace) %{_sysconfdir}/udev/rules.d/*
+%config(noreplace) %{_sysconfdir}/infiniband-diags/error_thresholds
+%config(noreplace) %{_sysconfdir}/infiniband-diags/ibdiag.conf
+%{_sysconfdir}/modprobe.d/*
-- 
2.22.0


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH rdma-core 17/19] build/azp: Run lintian over the bionic .debs
  2019-07-23 19:01 [PATCH rdma-core 00/19] Complete the azure pipelines configuration Jason Gunthorpe
                   ` (15 preceding siblings ...)
  2019-07-23 19:01 ` [PATCH rdma-core 16/19] build/azp: Add centos6 to the test distributions Jason Gunthorpe
@ 2019-07-23 19:01 ` Jason Gunthorpe
  2019-07-23 19:01 ` [PATCH rdma-core 18/19] build: Use the CMake variable -DENABLE_WERROR to turn on WERROR mode Jason Gunthorpe
  2019-07-23 19:01 ` [PATCH rdma-core 19/19] build/azp: Have Azure Pipelines create releases when tags are made Jason Gunthorpe
  18 siblings, 0 replies; 20+ messages in thread
From: Jason Gunthorpe @ 2019-07-23 19:01 UTC (permalink / raw)
  To: linux-rdma; +Cc: Jason Gunthorpe

From: Jason Gunthorpe <jgg@mellanox.com>

Lets look for errors as we go.

Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
---
 buildlib/azure-pipelines.yml | 4 ++++
 buildlib/cbuild              | 1 +
 2 files changed, 5 insertions(+)

diff --git a/buildlib/azure-pipelines.yml b/buildlib/azure-pipelines.yml
index 6a69e940a5b19e..153d437d8e81e9 100644
--- a/buildlib/azure-pipelines.yml
+++ b/buildlib/azure-pipelines.yml
@@ -119,6 +119,10 @@ stages:
               set -e
               fakeroot debian/rules binary
             displayName: clang 8.0 Bionic .deb Build
+          - bash: |
+              set -e
+              lintian ../*.deb
+            displayName: Debian Lintian for .deb packages
 
       - job: SrcPrep
         displayName: Build Source Tar
diff --git a/buildlib/cbuild b/buildlib/cbuild
index e7065e3e7d8d2d..c9522841dc1b8e 100755
--- a/buildlib/cbuild
+++ b/buildlib/cbuild
@@ -451,6 +451,7 @@ class azure_pipelines(APTEnvironment):
         "libnl-route-3-dev",
         "libsystemd-dev",
         "libudev-dev",
+        "lintian",
         "make",
         "ninja-build",
         "pandoc",
-- 
2.22.0


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH rdma-core 18/19] build: Use the CMake variable -DENABLE_WERROR to turn on WERROR mode
  2019-07-23 19:01 [PATCH rdma-core 00/19] Complete the azure pipelines configuration Jason Gunthorpe
                   ` (16 preceding siblings ...)
  2019-07-23 19:01 ` [PATCH rdma-core 17/19] build/azp: Run lintian over the bionic .debs Jason Gunthorpe
@ 2019-07-23 19:01 ` Jason Gunthorpe
  2019-07-23 19:01 ` [PATCH rdma-core 19/19] build/azp: Have Azure Pipelines create releases when tags are made Jason Gunthorpe
  18 siblings, 0 replies; 20+ messages in thread
From: Jason Gunthorpe @ 2019-07-23 19:01 UTC (permalink / raw)
  To: linux-rdma; +Cc: Jason Gunthorpe

From: Jason Gunthorpe <jgg@mellanox.com>

This way the flag can be passed through EXTRA_CMAKE_FLAGS to rpmbuild and
debian/rules instead of hacking it in via sed/etc.

Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
---
 CMakeLists.txt               |  5 +++++
 buildlib/azure-pipelines.yml | 24 ++++++++++--------------
 2 files changed, 15 insertions(+), 14 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index f9353ddbc86d1e..9bb58a9b803667 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -538,6 +538,11 @@ RDMA_DoFixup("${HAVE_STATIC_ASSERT}" "assert.h")
 RDMA_AddOptCFlag(CMAKE_C_FLAGS HAVE_C_WSTRICT_PROTOTYPES "-Wstrict-prototypes")
 RDMA_AddOptCFlag(CMAKE_C_FLAGS HAVE_C_WOLD_STYLE_DEFINITION "-Wold-style-definition")
 
+if (ENABLE_WERROR)
+  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")
+  message(STATUS "Enabled -Werror")
+endif()
+
 # Old versions of libnl have a duplicated rtnl_route_put, disbale the warning on those
 # systems
 if (NOT NL_KIND EQUAL 0)
diff --git a/buildlib/azure-pipelines.yml b/buildlib/azure-pipelines.yml
index 153d437d8e81e9..4eef7408af027c 100644
--- a/buildlib/azure-pipelines.yml
+++ b/buildlib/azure-pipelines.yml
@@ -43,7 +43,7 @@ stages:
               set -e
               mkdir build-gcc9
               cd build-gcc9
-              CC=gcc-9 CFLAGS="-Werror" cmake -GNinja .. -DIOCTL_MODE=both -DENABLE_STATIC=1
+              CC=gcc-9 cmake -GNinja .. -DIOCTL_MODE=both -DENABLE_STATIC=1 -DENABLE_WERROR=1
               ninja
             displayName: gcc 9.1 Compile
 
@@ -62,7 +62,7 @@ stages:
               mv CMakeLists.txt CMakeLists-orig.txt
               grep -v "# NO SPARSE" CMakeLists-orig.txt > CMakeLists.txt
               cd build-sparse
-              CC=cgcc CFLAGS="-Werror" cmake -GNinja .. -DIOCTL_MODE=both -DNO_PYVERBS=1
+              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
@@ -75,7 +75,7 @@ stages:
               set -e
               mkdir build-clang
               cd build-clang
-              CC=clang-8 CFLAGS="-Werror -m32 -msse3" cmake -GNinja .. -DIOCTL_MODE=both -DNO_PYVERBS=1
+              CC=clang-8 CFLAGS="-m32" cmake -GNinja .. -DIOCTL_MODE=both -DNO_PYVERBS=1 -DENABLE_WERROR=1
               ninja
             displayName: clang 8.0 32-bit Compile
 
@@ -85,7 +85,7 @@ stages:
               echo "#error Fail" >> util/udma_barrier.h
               cd build-gcc9
               rm CMakeCache.txt
-              CC=gcc-9 CFLAGS="-Werror" cmake -GNinja .. -DIOCTL_MODE=both
+              CC=gcc-9 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
@@ -94,7 +94,7 @@ stages:
               set -e
               mkdir build-arm64
               cd build-arm64
-              CC=aarch64-linux-gnu-gcc-8 CFLAGS="-Werror" cmake -GNinja .. -DIOCTL_MODE=both -DNO_PYVERBS=1
+              CC=aarch64-linux-gnu-gcc-8 cmake -GNinja .. -DIOCTL_MODE=both -DNO_PYVERBS=1 -DENABLE_WERROR=1
               ninja
             displayName: gcc 8.3 ARM64 Compile
 
@@ -102,18 +102,14 @@ stages:
               set -e
               mkdir build-ppc64el
               cd build-ppc64el
-              CC=powerpc64le-linux-gnu-gcc-8 CFLAGS="-Werror" cmake -GNinja .. -DIOCTL_MODE=both -DNO_PYVERBS=1
+              CC=powerpc64le-linux-gnu-gcc-8 cmake -GNinja .. -DIOCTL_MODE=both -DNO_PYVERBS=1 -DENABLE_WERROR=1
               ninja
             displayName: gcc 8.3 PPC64EL Compile
 
-          # When running cmake through debian/rules it is hard to set -Werror,
-          # instead force it on by changing the CMakeLists.txt
           - bash: |
               set -e
-              echo 'set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")' >> buildlib/RDMA_EnableCStd.cmake
-              sed -i -e 's/-DCMAKE_BUILD_TYPE=Release/-DCMAKE_BUILD_TYPE=Debug/g' debian/rules
               sed -i -e 's/ninja \(.*\)-v/ninja \1/g' debian/rules
-              debian/rules CC=clang-8 build
+              debian/rules CC=clang-8 EXTRA_CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=Debug -DENABLE_WERROR=1" build
             displayName: clang 8.0 Bionic Build
           - bash: |
               set -e
@@ -164,15 +160,15 @@ stages:
             centos7:
               CONTAINER: centos7
               SPEC: redhat/rdma-core.spec
-              RPMBUILD_OPTS:
+              RPMBUILD_OPTS:  --define 'EXTRA_CMAKE_FLAGS -DCMAKE_BUILD_TYPE=Debug -DENABLE_WERROR=1'
             fedora30:
               CONTAINER: fedora
               SPEC: redhat/rdma-core.spec
-              RPMBUILD_OPTS:
+              RPMBUILD_OPTS:  --define 'EXTRA_CMAKE_FLAGS -DCMAKE_BUILD_TYPE=Debug -DENABLE_WERROR=1'
             leap:
               CONTAINER: leap
               SPEC: suse/rdma-core.spec
-              RPMBUILD_OPTS: --without=curlmini
+              RPMBUILD_OPTS:  --define 'EXTRA_CMAKE_FLAGS -DCMAKE_BUILD_TYPE=Debug -DENABLE_WERROR=1' --without=curlmini
         container: $[ variables['CONTAINER'] ]
         steps:
           - checkout: none
-- 
2.22.0


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH rdma-core 19/19] build/azp: Have Azure Pipelines create releases when tags are made
  2019-07-23 19:01 [PATCH rdma-core 00/19] Complete the azure pipelines configuration Jason Gunthorpe
                   ` (17 preceding siblings ...)
  2019-07-23 19:01 ` [PATCH rdma-core 18/19] build: Use the CMake variable -DENABLE_WERROR to turn on WERROR mode Jason Gunthorpe
@ 2019-07-23 19:01 ` Jason Gunthorpe
  18 siblings, 0 replies; 20+ messages in thread
From: Jason Gunthorpe @ 2019-07-23 19:01 UTC (permalink / raw)
  To: linux-rdma; +Cc: Jason Gunthorpe

From: Jason Gunthorpe <jgg@mellanox.com>

Build a draft release and push the source .tar.gz to GitHub's releases
page.

For some reason this relies on an Azure Pipeline's user-specific service
connection instead of the existing app installation:

https://github.com/MicrosoftDocs/vsts-docs/issues/4260

This is done in a dedicated YAML file as it runs with a separate
configuration on AZP that authorizes it to use the write-access service
connections.

Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
---
 .travis.yml                          | 17 ----------
 buildlib/azure-pipelines-release.yml | 48 ++++++++++++++++++++++++++++
 buildlib/github-release              |  7 ----
 3 files changed, 48 insertions(+), 24 deletions(-)
 create mode 100644 buildlib/azure-pipelines-release.yml
 delete mode 100755 buildlib/github-release

diff --git a/.travis.yml b/.travis.yml
index 82f16d65e0a646..e00b0165215b4d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -43,20 +43,3 @@ before_script:
   - http_proxy= pip3 install cython
 script:
   - buildlib/travis-build
-  - buildlib/github-release
-deploy:
-  # Deploy assets to Github releases
-  # https://docs.travis-ci.com/user/deployment/releases/
-  provider: releases
-  api_key:
-    # This is encrypted OAth token generated by
-    # Travis CLI tool (travis setup releases) limited to specific repo.
-    secure: ok/WMzFgsSnk+NZ850QEUESHRfJ4Ae7T8eA4dcx4fuw2RqybAh8wjxrLP5GKR27WrzB3hKHHTi7fgE0VtBY024kGJ/+wlQXHN1p89JvCiQlGOKkxy5YIlS4GUhwwkqgoU+hmifxl1i+9yCuowHPIM4WoP+NR+IZgvMahlrdPCS2OleFtrqyaHZbC/Usdt0WZLeQzG+rVLec/NvPnVOn81e17yuAuluHAzu+qcV94szqe/zwDzG8RUUKXaeDEQ3JQja4bCLL/kTkWR8JGsfwvcqc9Ut4Ry2b7uEWp5/FIcxUGWviKRgRzEdcT40iMMiJbIrH7gYp66Ymr/dypqUfc4u/xSb4AmpTMcYGUXJxsdzKyL6d/7HbuHIIVc5o1V/L5mdaIjeO5KjTFjMMD5KoSXfBlNIGk2as1JD/99lxJ3VlpQGwI5390+Tyl8o4Ao4aBXSCG96PDK4+UkYFht/wrw+UoYdV07u3x7zz21O3N3Lu5733hDvcvyOW6uIzoeLQ5O62/3Pq+DOFRs/nnRiW8/gjIkEQAyj/GGxw/taslpFJFcdVt/MSueV4t5OCI2YdGA/NxG/c4FIGy+dntV5BB6Gld8KkP/PP74yzJ1o/PRDRExTbsQzrdisDrVIf0r4pxTTsw1gXRE5r6S0tQ5aNoXAQ5h4xiwAIGqqBF4HESJjA=
-  file: rdma-core-*.tar.gz
-  # Allow asterisks in file names.
-  file_glob: true
-  skip_cleanup: true
-  # Limit scope of deploy to specific repo.
-  on:
-    repo: linux-rdma/rdma-core
-    tags: true
diff --git a/buildlib/azure-pipelines-release.yml b/buildlib/azure-pipelines-release.yml
new file mode 100644
index 00000000000000..fd5e4a1e43270d
--- /dev/null
+++ b/buildlib/azure-pipelines-release.yml
@@ -0,0 +1,48 @@
+# See https://aka.ms/yaml
+# This pipeline runs to produce GitHub releases when tags are pushed. The
+# pipeline is never run from a PR and has access to all the build secrets,
+# including write permission to GitHub.
+
+trigger:
+  tags:
+    include:
+      - v*
+
+resources:
+  containers:
+    - container: azp
+      image: ucfconsort.azurecr.io/rdma-core/azure_pipelines:25.0
+      endpoint: ucfconsort_registry
+
+stages:
+  - stage: Release
+    jobs:
+      - job: SrcPrep
+        displayName: Build Source Tar
+        pool:
+          vmImage: 'Ubuntu-16.04'
+        container: azp
+        steps:
+          - checkout: self
+            fetchDepth: 1
+
+          - bash: |
+              set -e
+              mkdir build-pandoc artifacts
+              cd build-pandoc
+              CC=gcc-9 cmake -GNinja ..
+              ninja docs
+
+              cd ..
+              python3 buildlib/cbuild make-dist-tar build-pandoc
+            displayName: Prebuild Documentation
+
+          - task: GithubRelease@0
+            displayName: 'Create GitHub Release'
+            inputs:
+              githubConnection: github_release
+              repositoryName: linux-rdma/rdma-core
+              assets: ./*.tar.gz
+              action: create
+              isDraft: true
+              addChangeLog: true
diff --git a/buildlib/github-release b/buildlib/github-release
deleted file mode 100755
index 8fc536fb8b1074..00000000000000
--- a/buildlib/github-release
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/bash
-
-set -e
-
-if [[ $TRAVIS_TAG == v* ]] && [ "$TRAVIS_OS_NAME" = "linux" ]; then
-    buildlib/cbuild make-dist-tar --tag "$TRAVIS_TAG" build-travis
-fi
-- 
2.22.0


^ permalink raw reply related	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2019-07-23 19:11 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-23 19:01 [PATCH rdma-core 00/19] Complete the azure pipelines configuration Jason Gunthorpe
2019-07-23 19:01 ` [PATCH rdma-core 01/19] rdmacm: Fix missing libraries on centos6 build Jason Gunthorpe
2019-07-23 19:01 ` [PATCH rdma-core 02/19] util: Enable uninitialized_var on powerpc Jason Gunthorpe
2019-07-23 19:01 ` [PATCH rdma-core 03/19] build/cbuild: Remove docker-gc Jason Gunthorpe
2019-07-23 19:01 ` [PATCH rdma-core 04/19] build/travis: Do not build packages in travis anymore Jason Gunthorpe
2019-07-23 19:01 ` [PATCH rdma-core 05/19] build/travis: Do not run checkpatch Jason Gunthorpe
2019-07-23 19:01 ` [PATCH rdma-core 06/19] build/travis: Do not cross compile for ARM64 Jason Gunthorpe
2019-07-23 19:01 ` [PATCH rdma-core 07/19] build/azp: Use a version number for the docker images Jason Gunthorpe
2019-07-23 19:01 ` [PATCH rdma-core 08/19] build/cbuild: Add push-azp-images Jason Gunthorpe
2019-07-23 19:01 ` [PATCH rdma-core 09/19] build/azp: Use gcc 9.3 for building Jason Gunthorpe
2019-07-23 19:01 ` [PATCH rdma-core 10/19] build/azp: Use clang 8.0 " Jason Gunthorpe
2019-07-23 19:01 ` [PATCH rdma-core 11/19] build/azp: Run a test compile on ppc64el as well Jason Gunthorpe
2019-07-23 19:01 ` [PATCH rdma-core 12/19] build/azp: Add Fedora 30 to the distro testing Jason Gunthorpe
2019-07-23 19:01 ` [PATCH rdma-core 13/19] build/azp: Update check-build to work with python3 Jason Gunthorpe
2019-07-23 19:01 ` [PATCH rdma-core 14/19] build/cbuild: Update cbuild " Jason Gunthorpe
2019-07-23 19:01 ` [PATCH rdma-core 15/19] build/azp: Reduce the package list Jason Gunthorpe
2019-07-23 19:01 ` [PATCH rdma-core 16/19] build/azp: Add centos6 to the test distributions Jason Gunthorpe
2019-07-23 19:01 ` [PATCH rdma-core 17/19] build/azp: Run lintian over the bionic .debs Jason Gunthorpe
2019-07-23 19:01 ` [PATCH rdma-core 18/19] build: Use the CMake variable -DENABLE_WERROR to turn on WERROR mode Jason Gunthorpe
2019-07-23 19:01 ` [PATCH rdma-core 19/19] build/azp: Have Azure Pipelines create releases when tags are made Jason Gunthorpe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.