aboutsummaryrefslogtreecommitdiff
path: root/scripts/ci
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/ci')
-rwxr-xr-xscripts/ci/build.sh23
-rwxr-xr-xscripts/ci/build_armhf.sh5
-rwxr-xr-xscripts/ci/build_i386.sh1
-rwxr-xr-xscripts/ci/build_x86_64.sh2
-rwxr-xr-xscripts/ci/check.sh3
-rwxr-xr-xscripts/ci/coverage.sh9
-rwxr-xr-xscripts/ci/doxygen.sh17
7 files changed, 44 insertions, 16 deletions
diff --git a/scripts/ci/build.sh b/scripts/ci/build.sh
index 21922a493..04c237f39 100755
--- a/scripts/ci/build.sh
+++ b/scripts/ci/build.sh
@@ -5,7 +5,6 @@ cd "$(dirname "$0")"/../..
./bootstrap
./configure \
--host=${TARGET_ARCH} --build=x86_64-linux-gnu \
- --enable-dpdk \
--prefix=/opt/odp \
${CONF}
@@ -14,9 +13,27 @@ make -j $(nproc)
make install
pushd ${HOME}
-${CC} ${CFLAGS} ${OLDPWD}/example/hello/odp_hello.c -o odp_hello_inst_dynamic `PKG_CONFIG_PATH=/opt/odp/lib/pkgconfig:${PKG_CONFIG_PATH} pkg-config --cflags --libs libodp-linux`
-if [ -z "$TARGET_ARCH" ]
+
+# Fix build on CentOS
+PKG_CONFIG="${TARGET_ARCH}-pkg-config"
+if ! [ -x "$(command -v ${PKG_CONFIG})" ]; then
+ PKG_CONFIG="pkg-config"
+fi
+
+CC="${CC:-${TARGET_ARCH}-gcc}"
+${CC} ${CFLAGS} ${OLDPWD}/example/hello/odp_hello.c -o odp_hello_inst_dynamic \
+ `PKG_CONFIG_PATH=/opt/odp/lib/pkgconfig ${PKG_CONFIG} --cflags --libs libodp-linux` \
+ `${PKG_CONFIG} --cflags --libs libdpdk`
+
+sysctl vm.nr_hugepages=1000
+mkdir -p /mnt/huge
+mount -t hugetlbfs nodev /mnt/huge
+
+if [ "$TARGET_ARCH" = "x86_64-linux-gnu" ]
then
LD_LIBRARY_PATH="/opt/odp/lib:$LD_LIBRARY_PATH" ./odp_hello_inst_dynamic
fi
popd
+
+#dpdk wrapper script can umount hugepages itself
+umount /mnt/huge || true
diff --git a/scripts/ci/build_armhf.sh b/scripts/ci/build_armhf.sh
index 4ae0f19b1..36f54b047 100755
--- a/scripts/ci/build_armhf.sh
+++ b/scripts/ci/build_armhf.sh
@@ -9,12 +9,9 @@ else
export CC="${TARGET_ARCH}-gcc"
export CXX="${TARGET_ARCH}-g++"
fi
-export CFLAGS="-march=armv7-a"
+export CFLAGS="-march=armv7-a -mfpu=neon"
export CXXFLAGS="-march=armv7-a"
-# No DPDK on ARMv7
-export CONF="${CONF} --disable-dpdk"
-
# Use target libraries
export PKG_CONFIG_PATH=
export PKG_CONFIG_LIBDIR=/usr/lib/${TARGET_ARCH}/pkgconfig
diff --git a/scripts/ci/build_i386.sh b/scripts/ci/build_i386.sh
index 797dd454d..e49558bcc 100755
--- a/scripts/ci/build_i386.sh
+++ b/scripts/ci/build_i386.sh
@@ -5,6 +5,7 @@ export TARGET_ARCH=i686-linux-gnu
if [ "${CC#clang}" != "${CC}" ] ; then
export CC="clang --target=${TARGET_ARCH}"
export CXX="clang++ --target=${TARGET_ARCH}"
+ sed -i 's/ODP_CHECK_CFLAG(\[\-Wcast-align\])/#ODP_CHECK_CFLAG(\[\-Wcast-align\])/g' /odp/configure.ac
else
export CFLAGS="-m32"
export CXXFLAGS="-m32"
diff --git a/scripts/ci/build_x86_64.sh b/scripts/ci/build_x86_64.sh
index 01182fd90..115c0bf26 100755
--- a/scripts/ci/build_x86_64.sh
+++ b/scripts/ci/build_x86_64.sh
@@ -1,8 +1,10 @@
#!/bin/bash
set -e
+export TARGET_ARCH=x86_64-linux-gnu
if [ "${CC#clang}" != "${CC}" ] ; then
export CXX="clang++"
+ sed -i 's/ODP_CHECK_CFLAG(\[\-Wcast-align\])/#ODP_CHECK_CFLAG(\[\-Wcast-align\])/g' /odp/configure.ac
fi
exec "$(dirname "$0")"/build.sh
diff --git a/scripts/ci/check.sh b/scripts/ci/check.sh
index 948149300..a181a184b 100755
--- a/scripts/ci/check.sh
+++ b/scripts/ci/check.sh
@@ -14,4 +14,5 @@ cd "$(dirname "$0")"/../..
export CI="true"
make check
-umount /mnt/huge
+#dpdk wrapper script can umount hugepages itself
+umount /mnt/huge || true
diff --git a/scripts/ci/coverage.sh b/scripts/ci/coverage.sh
index 38cb46756..dc0d8cfc7 100755
--- a/scripts/ci/coverage.sh
+++ b/scripts/ci/coverage.sh
@@ -9,22 +9,15 @@ cd "$(dirname "$0")"/../..
./bootstrap
./configure \
CFLAGS="-O0 -coverage $CLFAGS" CXXFLAGS="-O0 -coverage $CXXFLAGS" LDFLAGS="--coverage $LDFLAGS" \
- --enable-debug=full --enable-helper-linux --enable-dpdk
+ --enable-debug=full --enable-helper-linux
export CCACHE_DISABLE=1
make -j $(nproc)
-echo 1000 | tee /proc/sys/vm/nr_hugepages
-mkdir -p /mnt/huge
-mount -t hugetlbfs nodev /mnt/huge
-
# Ignore possible failures there because these tests depends on measurements
# and systems might differ in performance.
export CI="true"
ODP_SCHEDULER=basic make check
ODP_SCHEDULER=sp make check
-ODP_SCHEDULER=scalable make check
bash <(curl -s https://codecov.io/bash) -X coveragepy
-
-umount /mnt/huge
diff --git a/scripts/ci/doxygen.sh b/scripts/ci/doxygen.sh
new file mode 100755
index 000000000..e8972b00b
--- /dev/null
+++ b/scripts/ci/doxygen.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+set -e
+
+export TARGET_ARCH=x86_64-linux-gnu
+if [ "${CC#clang}" != "${CC}" ] ; then
+ export CXX="clang++"
+fi
+
+exec "$(dirname "$0")"/build.sh
+make doxygen-doc 2>&1 |tee doxygen.log
+fgrep -rq warning ./doxygen.log
+if [ $? -eq 0 ]; then
+ exit -1
+else
+ exit 0
+fi
+