[PATCH rdma-core V1 1/2] travis: Simplify travis config

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Move travis build instructions into separate file.

Signed-off-by: Leon Romanovsky <leon@xxxxxxxxxx>
---
 .travis.yml           | 25 +------------------------
 buildlib/travis-build | 32 ++++++++++++++++++++++++++++++++
 2 files changed, 33 insertions(+), 24 deletions(-)
 create mode 100755 buildlib/travis-build

diff --git a/.travis.yml b/.travis.yml
index 06443530..c4fa1985 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -36,27 +36,4 @@ addons:
       - lib32gcc-6-dev
 
 script:
-  - mkdir build build-clang build32 build-no-dma
-  - cd build
-  # The goal is warning free compile on latest gcc.
-  - CC=gcc-6 CFLAGS=-Werror cmake -GNinja ..
-  - ninja
-
-  # .. and latest clang
-  - cd ../build-clang
-  - CC=clang-3.9 CFLAGS=-Werror cmake -GNinja ..
-  - ninja
-
-  # 32 bit build
-  - cd ../build32
-  # travis's trusty is not configured in a way that enables all 32 bit
-  # packages. We could fix this with some sudo stuff.. For now turn off libnl
-  - CC=gcc-6 CFLAGS="-Werror -m32" cmake -GNinja .. -DENABLE_RESOLVE_NEIGH=0
-  - ninja
-
-  # Test with coherent DMA mode disabled (ie as would be on ARM32, etc)
-  - cd ../build-clang
-  - echo "#error Fail" >> ../libibverbs/arch.h
-  - rm CMakeCache.txt
-  - CC=clang-3.9 CFLAGS=-Werror cmake -GNinja ..
-  - ninja
+  - buildlib/travis-build
diff --git a/buildlib/travis-build b/buildlib/travis-build
new file mode 100755
index 00000000..5fa037bd
--- /dev/null
+++ b/buildlib/travis-build
@@ -0,0 +1,32 @@
+#!/bin/bash
+
+# Stop on error
+set -e
+# Echo all commands to Travis log
+set -x
+
+mkdir build build-clang build32 build-no-dma
+cd build
+# The goal is warning free compile on latest gcc.
+CC=gcc-6 CFLAGS=-Werror cmake -GNinja ..
+ninja
+
+# .. and latest clang
+cd ../build-clang
+CC=clang-3.9 CFLAGS=-Werror cmake -GNinja ..
+ninja
+
+# 32 bit build
+cd ../build32
+# travis's trusty is not configured in a way that enables all 32 bit
+# packages. We could fix this with some sudo stuff.. For now turn off libnl
+CC=gcc-6 CFLAGS="-Werror -m32" cmake -GNinja .. -DENABLE_RESOLVE_NEIGH=0
+ninja
+
+# Test with coherent DMA mode disabled (ie as would be on ARM32, etc)
+cd ../build-clang
+echo "#error Fail" >> ../libibverbs/arch.h
+rm CMakeCache.txt
+CC=clang-3.9 CFLAGS=-Werror cmake -GNinja ..
+ninja
+cd ..
-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux