diff mbox series

[API-NEXT,v1,6/19] travis: merge native and cross-compilation scripts

Message ID 1505422809-5632-7-git-send-email-odpbot@yandex.ru
State New
Headers show
Series [API-NEXT,v1,1/19] travis: fix powerpc test name | expand

Commit Message

Github ODP bot Sept. 14, 2017, 8:59 p.m. UTC
From: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>


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>

---
/** Email created from pull request 179 (muvarov:api-next)
 ** https://github.com/Linaro/odp/pull/179
 ** Patch: https://github.com/Linaro/odp/pull/179.patch
 ** Base sha: 6b6253c30f88c80bf632436ff06c1b000860a2f1
 ** Merge commit sha: ada61f5ba5f940d03a95893940c21028d4c75d19
 **/
 .travis.yml | 86 ++++++++++++++++---------------------------------------------
 1 file changed, 22 insertions(+), 64 deletions(-)
diff mbox series

Patch

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