diff mbox series

[v5,7/8] ci: move build stage to common script

Message ID 1535410807-29034-8-git-send-email-odpbot@yandex.ru
State New
Headers show
Series [v5,1/8] travis: fix DOCKER_NAMESPACE variable setting | expand

Commit Message

Github ODP bot Aug. 27, 2018, 11 p.m. UTC
From: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>


Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>

---
/** Email created from pull request 681 (lumag:travis-xenial)
 ** https://github.com/Linaro/odp/pull/681
 ** Patch: https://github.com/Linaro/odp/pull/681.patch
 ** Base sha: 6ce60cac1fea6d65803740f5f9b6627abf6814b3
 ** Merge commit sha: 8c5d835ef3fbc6ab78503945fef582f7c60ac2c9
 **/
 scripts/ci/build.sh         | 11 +++++++++++
 scripts/ci/build_arm64.sh   | 11 ++---------
 scripts/ci/build_armhf.sh   | 11 ++---------
 scripts/ci/build_i386.sh    | 11 ++---------
 scripts/ci/build_powerpc.sh | 12 ++++--------
 scripts/ci/build_x86_64.sh  |  8 +-------
 6 files changed, 22 insertions(+), 42 deletions(-)
 create mode 100755 scripts/ci/build.sh
diff mbox series

Patch

diff --git a/scripts/ci/build.sh b/scripts/ci/build.sh
new file mode 100755
index 000000000..6fca1cc28
--- /dev/null
+++ b/scripts/ci/build.sh
@@ -0,0 +1,11 @@ 
+#!/bin/bash
+set -e
+
+cd "$(dirname "$0")"/../..
+./bootstrap
+./configure \
+	--host=${TARGET_ARCH} --build=x86_64-linux-gnu \
+	--enable-dpdk \
+	${CONF}
+
+make -j 8
diff --git a/scripts/ci/build_arm64.sh b/scripts/ci/build_arm64.sh
index c38385d97..647dd29cf 100755
--- a/scripts/ci/build_arm64.sh
+++ b/scripts/ci/build_arm64.sh
@@ -1,7 +1,7 @@ 
 #!/bin/bash
 set -e
 
-TARGET_ARCH=aarch64-linux-gnu
+export TARGET_ARCH=aarch64-linux-gnu
 if [ "${CC#clang}" != "${CC}" ] ; then
 	export CC="clang --target=${TARGET_ARCH}"
 	export CXX="clang++ --target=${TARGET_ARCH}"
@@ -11,11 +11,4 @@  else
 fi
 export CPPFLAGS="-I/usr/include/${TARGET_ARCH}/dpdk"
 
-cd "$(dirname "$0")"/../..
-./bootstrap
-./configure \
-	--host=${TARGET_ARCH} --build=x86_64-linux-gnu \
-	--enable-dpdk \
-	${CONF}
-
-make -j 8
+exec "$(dirname "$0")"/build.sh
diff --git a/scripts/ci/build_armhf.sh b/scripts/ci/build_armhf.sh
index 74d47ad12..837561f83 100755
--- a/scripts/ci/build_armhf.sh
+++ b/scripts/ci/build_armhf.sh
@@ -1,7 +1,7 @@ 
 #!/bin/bash
 set -e
 
-TARGET_ARCH=arm-linux-gnueabihf
+export TARGET_ARCH=arm-linux-gnueabihf
 if [ "${CC#clang}" != "${CC}" ] ; then
 	export CC="clang --target=${TARGET_ARCH}"
 	export CXX="clang++ --target=${TARGET_ARCH}"
@@ -13,11 +13,4 @@  export CPPFLAGS="-I/usr/include/${TARGET_ARCH}/dpdk"
 export CFLAGS="-march=armv7-a"
 export CXXFLAGS="-march=armv7-a"
 
-cd "$(dirname "$0")"/../..
-./bootstrap
-./configure \
-	--host=${TARGET_ARCH} --build=x86_64-linux-gnu \
-	--enable-dpdk \
-	${CONF}
-
-make -j 8
+exec "$(dirname "$0")"/build.sh
diff --git a/scripts/ci/build_i386.sh b/scripts/ci/build_i386.sh
index 177df6304..17b6bf668 100755
--- a/scripts/ci/build_i386.sh
+++ b/scripts/ci/build_i386.sh
@@ -1,7 +1,7 @@ 
 #!/bin/bash
 set -e
 
-TARGET_ARCH=i686-linux-gnu
+export TARGET_ARCH=i686-linux-gnu
 if [ "${CC#clang}" != "${CC}" ] ; then
 	export CC="clang --target=${TARGET_ARCH}"
 	export CXX="clang++ --target=${TARGET_ARCH}"
@@ -12,11 +12,4 @@  else
 fi
 export CPPFLAGS="-I/usr/include/i386-linux-gnu/dpdk"
 
-cd "$(dirname "$0")"/../..
-./bootstrap
-./configure \
-	--host=${TARGET_ARCH} --build=x86_64-linux-gnu \
-	--enable-dpdk \
-	${CONF}
-
-make -j 8
+exec "$(dirname "$0")"/build.sh
diff --git a/scripts/ci/build_powerpc.sh b/scripts/ci/build_powerpc.sh
index 962a6a465..a213ee1d3 100755
--- a/scripts/ci/build_powerpc.sh
+++ b/scripts/ci/build_powerpc.sh
@@ -1,7 +1,7 @@ 
 #!/bin/bash
 set -e
 
-TARGET_ARCH=powerpc-linux-gnu
+export TARGET_ARCH=powerpc-linux-gnu
 if [ "${CC#clang}" != "${CC}" ] ; then
 	export CC="clang --target=${TARGET_ARCH}"
 	export CXX="clang++ --target=${TARGET_ARCH}"
@@ -9,11 +9,7 @@  else
 	export CC="${TARGET_ARCH}-gcc"
 	export CXX="${TARGET_ARCH}-g++"
 fi
+# No DPDK on PowerPC
+export CONF="${CONF} --disable-dpdk"
 
-cd "$(dirname "$0")"/../..
-./bootstrap
-./configure \
-	--host=${TARGET_ARCH} --build=x86_64-linux-gnu \
-	${CONF}
-
-make -j 8
+exec "$(dirname "$0")"/build.sh
diff --git a/scripts/ci/build_x86_64.sh b/scripts/ci/build_x86_64.sh
index 2ed2e005a..01182fd90 100755
--- a/scripts/ci/build_x86_64.sh
+++ b/scripts/ci/build_x86_64.sh
@@ -5,10 +5,4 @@  if [ "${CC#clang}" != "${CC}" ] ; then
 	export CXX="clang++"
 fi
 
-cd "$(dirname "$0")"/../..
-./bootstrap
-./configure \
-	--enable-dpdk \
-	${CONF}
-
-make -j 8
+exec "$(dirname "$0")"/build.sh