diff mbox series

[API-NEXT,v1,1/10] travis: add cross-compilation checks

Message ID 1499378421-25511-2-git-send-email-odpbot@yandex.ru
State New
Headers show
Series [API-NEXT,v1,1/10] travis: add cross-compilation checks | expand

Commit Message

Github ODP bot July 6, 2017, 10 p.m. UTC
From: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>


Include setup to cross-compile ODP for ARM hard float, ARM64 and PowerPC
targets.

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

Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>

---
/** Email created from pull request 71 (muvarov:api-next)
 ** https://github.com/Linaro/odp/pull/71
 ** Patch: https://github.com/Linaro/odp/pull/71.patch
 ** Base sha: 15c97427d01c81dc9f4d0aafe9b0a99cdb2d1fc6
 ** Merge commit sha: e20c61ba5eae9586adcbc76e43cdfaa869055b55
 **/
 .travis.yml | 100 +++++++++++++++++++++++++++++++++++++++++++++++++++---------
 1 file changed, 86 insertions(+), 14 deletions(-)
diff mbox series

Patch

diff --git a/.travis.yml b/.travis.yml
index bae23600..f0567e59 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -38,12 +38,15 @@  addons:
         apt:
                 sources:
                         - ubuntu-toolchain-r-test
-                        - llvm-toolchain-precise-3.8
                 packages:
                         - gcc
                         - clang-3.8
                         - automake autoconf libtool libssl-dev graphviz mscgen doxygen
                         - libpcap-dev
+                        - dpkg-cross equivs
+                        - gcc-aarch64-linux-gnu pkg-config-aarch64-linux-gnu libc6-dev-arm64-cross
+                        - gcc-arm-linux-gnueabihf pkg-config-arm-linux-gnueabihf libc6-dev-armhf-cross
+                        - gcc-powerpc-linux-gnu pkg-config-powerpc-linux-gnu libc6-dev-powerpc-cross
 #        coverity_scan:
 #                project:
 #                        name: "$TRAVIS_REPO_SLUG"
@@ -62,30 +65,35 @@  env:
         - CONF="--enable-schedule-sp"
         - CONF="--enable-schedule-iquery"
 
-install:
-        - echo 1000 | sudo tee /proc/sys/vm/nr_hugepages
-        - sudo mkdir -p /mnt/huge
-        - sudo mount -t hugetlbfs nodev /mnt/huge
-
-        - sudo apt-get -qq update
-        - sudo apt-get install linux-headers-`uname -r`
-        - sudo pip install coverage
-        - gem install asciidoctor
-        - PATH=${PATH//:\.\/node_modules\/\.bin/}
-
+before_install:
 #       Install cunit for the validation tests because distro version is too old and fails C99 compile
         - sudo apt-get remove libcunit1-dev libcunit1
         - export CUNIT_VERSION=2.1-3
         - curl -sSOL https://github.com/Linaro/libcunit/releases/download/${CUNIT_VERSION}/CUnit-${CUNIT_VERSION}.tar.bz2
         - tar -jxf *.bz2
         - pushd CUnit*
-        - ./bootstrap
-        - ./configure --enable-debug --enable-automated --enable-basic --enable-console --enable-examples --enable-test
+        - libtoolize --force --copy
+        - aclocal
+        - autoheader
+        - automake --add-missing --include-deps --copy
+        - autoconf
+        - ./configure --enable-debug --enable-automated --enable-basic --enable-console --enable-examples --enable-test $CROSS || cat config.log
         - make
         - sudo make install
         - popd
         - export LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH"
 
+install:
+        - echo 1000 | sudo tee /proc/sys/vm/nr_hugepages
+        - sudo mkdir -p /mnt/huge
+        - sudo mount -t hugetlbfs nodev /mnt/huge
+
+        - sudo apt-get -qq update
+        - sudo apt-get install linux-headers-`uname -r`
+        - sudo pip install coverage
+        - gem install asciidoctor
+        - PATH=${PATH//:\.\/node_modules\/\.bin/}
+
 #	DPDK pktio
         - TARGET=${TARGET:-"x86_64-native-linuxapp-gcc"}
         - git -c advice.detachedHead=false clone -q --depth=1 --single-branch --branch=v17.02 http://dpdk.org/git/dpdk dpdk
@@ -125,6 +133,69 @@  script:
 jobs:
         include:
                 - stage: test
+                  compiler: aarch64-linux-gnu-gcc
+                  env: TEST="aarch64-linux-gnu" CROSS="--host=aarch64-linux-gnu --prefix=/usr/aarch64-linux-gnu"
+                  install: true
+                  script:
+                          - mkdir cross
+                          - pushd cross
+                            # one can not include colon in the command or bad things will happen, so mimic it
+                          - env echo -e 'Provides\x3a multiarch-support, debconf, debconf-2.0' > dummy
+                          - equivs-build -a arm64 dummy
+                          - wget
+                            http://ports.ubuntu.com/pool/main/o/openssl/libssl-dev_1.0.1f-1ubuntu2.22_arm64.deb
+                            http://ports.ubuntu.com/pool/main/o/openssl/libssl1.0.0_1.0.1f-1ubuntu2.22_arm64.deb
+                            http://ports.ubuntu.com/pool/main/z/zlib/zlib1g-dev_1.2.8.dfsg-1ubuntu1_arm64.deb
+                            http://ports.ubuntu.com/pool/main/z/zlib/zlib1g_1.2.8.dfsg-1ubuntu1_arm64.deb
+                          - sudo dpkg-cross -i -M -A -a arm64 *.deb
+                          - popd
+                          - ./bootstrap
+                          - ./configure --prefix=$HOME/odp-install $CROSS
+                            --disable-test-cpp --enable-test-vald --enable-test-helper --enable-test-perf --enable-test-perf-proc --enable-test-example
+                          - make -j $(nproc)
+                - stage: test
+                  compiler: arm-linux-gnueabihf-gcc
+                  env: TEST="arm-linux-gnueabihf" CROSS="--host=arm-linux-gnueabihf --prefix=/usr/arm-linux-gnueabihf"
+                  install: true
+                  script:
+                          - mkdir cross
+                          - pushd cross
+                            # one can not include colon in the command or bad things will happen, so mimic it
+                          - env echo -e 'Provides\x3a multiarch-support, debconf, debconf-2.0' > dummy
+                          - equivs-build -a armhf dummy
+                          - wget
+                            http://ports.ubuntu.com/pool/main/o/openssl/libssl-dev_1.0.1f-1ubuntu2.22_armhf.deb
+                            http://ports.ubuntu.com/pool/main/o/openssl/libssl1.0.0_1.0.1f-1ubuntu2.22_armhf.deb
+                            http://ports.ubuntu.com/pool/main/z/zlib/zlib1g-dev_1.2.8.dfsg-1ubuntu1_armhf.deb
+                            http://ports.ubuntu.com/pool/main/z/zlib/zlib1g_1.2.8.dfsg-1ubuntu1_armhf.deb
+                          - sudo dpkg-cross -i -M -A -a armhf *.deb
+                          - popd
+                          - ./bootstrap
+                          - ./configure --prefix=$HOME/odp-install $CROSS
+                            --disable-test-cpp --enable-test-vald --enable-test-helper --enable-test-perf --enable-test-perf-proc --enable-test-example
+                          - make -j $(nproc)
+                - stage: test
+                  compiler: powerpc-linux-gnu-gcc
+                  env: TEST="powerpc-linux-gnu" CROSS="--host=powerpc-linux-gnu --prefix=/usr/powerpc-linux-gnu"
+                  install: true
+                  script:
+                          - mkdir cross
+                          - pushd cross
+                            # one can not include colon in the command or bad things will happen, so mimic it
+                          - env echo -e 'Provides\x3a multiarch-support, debconf, debconf-2.0' > dummy
+                          - equivs-build -a powerpc dummy
+                          - wget
+                            http://ports.ubuntu.com/pool/main/o/openssl/libssl-dev_1.0.1f-1ubuntu2.22_powerpc.deb
+                            http://ports.ubuntu.com/pool/main/o/openssl/libssl1.0.0_1.0.1f-1ubuntu2.22_powerpc.deb
+                            http://ports.ubuntu.com/pool/main/z/zlib/zlib1g-dev_1.2.8.dfsg-1ubuntu1_powerpc.deb
+                            http://ports.ubuntu.com/pool/main/z/zlib/zlib1g_1.2.8.dfsg-1ubuntu1_powerpc.deb
+                          - sudo dpkg-cross -i -M -A -a powerpc *.deb
+                          - popd
+                          - ./bootstrap
+                          - ./configure --prefix=$HOME/odp-install $CROSS
+                            --disable-test-cpp --enable-test-vald --enable-test-helper --enable-test-perf --enable-test-perf-proc --enable-test-example
+                          - make -j $(nproc)
+                - stage: test
                   env: TEST=coverage
                   compiler: gcc
                   script:
@@ -158,4 +229,5 @@  jobs:
                           - ./scripts/ci-checkpatches.sh ${ODP_PATCHES};
 
 after_failure:
+  - cat config.log
   - find . -name 'test-suite.log' -execdir grep -il "FAILED" {} \; -exec echo {} \; -exec cat {} \;