aboutsummaryrefslogtreecommitdiff
path: root/.travis.yml
diff options
context:
space:
mode:
authorDmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>2017-09-13 16:37:20 +0300
committerMaxim Uvarov <maxim.uvarov@linaro.org>2017-09-14 16:59:14 +0300
commitd445395c66edb38abedb918afdba37ec9f7f95af (patch)
tree4451f0867d9121f529b66d1fa3197cf8e2155cad /.travis.yml
parentb38117eeed5d7bd5a334ef2387bf83d5cb8b9188 (diff)
travis: merge native and cross-compilation scripts
Merge native and cross-compilation scripts. This allows us to simplify Travis CI configuration and to enable e.g. testing of out-of-tree compilation. Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to '.travis.yml')
-rw-r--r--.travis.yml86
1 files changed, 22 insertions, 64 deletions
diff --git a/.travis.yml b/.travis.yml
index 06983f8e7..ac8a4c3ad 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -161,27 +161,33 @@ install:
fi
script:
+ - if [ -z "$CROSS_ARCH" ] ; then
+ EXTRA_CONF="--with-dpdk-path=`pwd`/dpdk/${TARGET} --with-netmap-path=`pwd`/netmap" ;
+ fi
- ./bootstrap
- ./configure --prefix=$HOME/odp-install
--enable-user-guides
- --with-dpdk-path=`pwd`/dpdk/${TARGET}
- --with-netmap-path=`pwd`/netmap
- $CONF
--enable-debug=full
--enable-helper-linux
+ $CROSS $EXTRA_CONF $CONF
- make -j $(nproc)
- mkdir /dev/shm/odp
- - sudo LD_LIBRARY_PATH="$HOME/cunit-install/$CROSS_ARCH/lib:$LD_LIBRARY_PATH" ODP_SHM_DIR=/dev/shm/odp make check
+ - if [ -z "$CROSS_ARCH" ] ; then
+ sudo LD_LIBRARY_PATH="$HOME/cunit-install/$CROSS_ARCH/lib:$LD_LIBRARY_PATH" ODP_SHM_DIR=/dev/shm/odp make check ;
+ fi
- make install
- echo "Checking linking and run from install..."
- pushd $HOME
- echo "Dynamic link.."
- - ${CC} ${OLDPWD}/example/hello/odp_hello.c -o odp_hello_inst `PKG_CONFIG_PATH=${HOME}/odp-install/lib/pkgconfig:${PKG_CONFIG_PATH} pkg-config --cflags --libs libodp-linux`
- - LD_LIBRARY_PATH="${HOME}/odp-install/lib:$LD_LIBRARY_PATH" ./odp_hello_inst
+ - ${CC} ${CFLAGS} ${OLDPWD}/example/hello/odp_hello.c -o odp_hello_inst_dynamic `PKG_CONFIG_PATH=${HOME}/odp-install/lib/pkgconfig:${PKG_CONFIG_PATH} pkg-config --cflags --libs libodp-linux`
- echo "Static link.."
- - ${CC} ${OLDPWD}/example/hello/odp_hello.c -o odp_hello_inst `PKG_CONFIG_PATH=${HOME}/odp-install/lib/pkgconfig:${PKG_CONFIG_PATH} pkg-config --cflags --libs libodp-linux --static` -static
- - ./odp_hello_inst
+ - ${CC} ${CFLAGS} ${OLDPWD}/example/hello/odp_hello.c -o odp_hello_inst_static `PKG_CONFIG_PATH=${HOME}/odp-install/lib/pkgconfig:${PKG_CONFIG_PATH} pkg-config --cflags --libs libodp-linux --static` -static
+ - if [ -z "$CROSS_ARCH" ] ; then
+ LD_LIBRARY_PATH="${HOME}/odp-install/lib:$LD_LIBRARY_PATH" ./odp_hello_inst ;
+ ./odp_hello_inst_static ;
+ fi
+ - popd
- ccache -s
jobs:
@@ -189,83 +195,35 @@ jobs:
- stage: test
compiler: aarch64-linux-gnu-gcc
env: TEST="aarch64-linux-gnu" CROSS_ARCH="arm64"
- install: true
- script:
- - ./bootstrap
- - ./configure --prefix=$HOME/odp-install $CROSS
- --enable-debug=full
- --enable-helper-linux
- - make -j $(nproc)
+ install: gem install asciidoctor
- stage: test
compiler: "\"clang-3.8 --target=aarch64-linux-gnu\""
env: TEST="clang-3.8 aarch64-linux-gnu" CROSS_ARCH="arm64"
- install: true
- script:
- - ./bootstrap
- - ./configure --prefix=$HOME/odp/odp-install $CROSS
- --enable-debug=full
- --enable-helper-linux
- - make -j $(nproc)
+ install: gem install asciidoctor
- stage: test
compiler: arm-linux-gnueabihf-gcc
env: TEST="arm-linux-gnueabihf" CROSS_ARCH="armhf"
- install: true
- script:
- - ./bootstrap
- - ./configure --prefix=$HOME/odp-install $CROSS
- --enable-debug=full
- --enable-helper-linux
- - make -j $(nproc)
+ install: gem install asciidoctor
- stage: test
compiler: "\"clang-3.8 --target=arm-linux-gnueabihf\""
env: TEST="clang-3.8 arm-linux-gnueabihf" CROSS_ARCH="armhf" CFLAGS="-march=armv7-a"
- install: true
- script:
- - ./bootstrap
- - ./configure --prefix=$HOME/odp-install $CROSS
- --enable-debug=full
- --enable-helper-linux
- - make -j $(nproc)
+ install: gem install asciidoctor
- stage: test
compiler: powerpc-linux-gnu-gcc
env: TEST="powerpc-linux-gnueabi" CROSS_ARCH="powerpc"
- install: true
- script:
- - ./bootstrap
- - ./configure --prefix=$HOME/odp-install $CROSS
- --enable-debug=full
- --enable-helper-linux
- - make -j $(nproc)
+ install: gem install asciidoctor
- stage: test
compiler: "\"clang-3.8 --target=powerpc-linux-gnu\""
env: TEST="clang-3.8 powerpc-linux-gnu" CROSS_ARCH="powerpc"
- install: true
- script:
- - ./bootstrap
- - ./configure --prefix=$HOME/odp-install $CROSS
- --enable-debug=full
- --enable-helper-linux
- - make -j $(nproc)
+ install: gem install asciidoctor
- stage: test
compiler: "\"gcc -m32\""
env: TEST="i686-linux-gnueabi" CROSS_ARCH="i386"
- install: true
- script:
- - ./bootstrap
- - ./configure --prefix=$HOME/odp-install $CROSS
- --enable-debug=full
- --enable-helper-linux
- - make -j $(nproc)
+ install: gem install asciidoctor
- stage: test
compiler: "\"clang-3.8 -m32\""
env: TEST="clang-3.8 i686-linux-gnu" CROSS_ARCH="i386"
- install: true
- script:
- - ./bootstrap
- - ./configure --prefix=$HOME/odp-install $CROSS
- --enable-debug=full
- --enable-helper-linux
- - make -j $(nproc)
+ install: gem install asciidoctor
- stage: test
env: TEST=coverage
compiler: gcc