diff mbox series

[v1,2/2] travis: add cross-compilation checks

Message ID 1498568406-20591-3-git-send-email-odpbot@yandex.ru
State Superseded
Headers show
Series None | expand

Commit Message

Github ODP bot June 27, 2017, 1 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>

---
/** Email created from pull request 60 (lumag:cross)
 ** https://github.com/Linaro/odp/pull/60
 ** Patch: https://github.com/Linaro/odp/pull/60.patch
 ** Base sha: a4add29291572219143dc667db4e8a7832a5692b
 ** Merge commit sha: 8dd9c8beb459d65838212e3d7bbba49762c50b4b
 **/
 .travis.yml | 100 +++++++++++++++++++++++++++++++++++++++++++++++++++---------
 1 file changed, 86 insertions(+), 14 deletions(-)

Comments

Maxim Uvarov June 27, 2017, 1:13 p.m. UTC | #1
On 06/27/17 16:00, Github ODP bot wrote:
> -        - ./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"


I really would like that these lines match documentation. If in README
we say to run ./bootstrap it has to be here also.

Maxim.
Maxim Uvarov June 27, 2017, 1:15 p.m. UTC | #2
On 06/27/17 16:00, Github ODP bot wrote:
> +                          - env echo -e 'Provides\x3a multiarch-support, debconf, debconf-2.0' > dummy

typo
Dmitry Eremin-Solenikov June 27, 2017, 1:17 p.m. UTC | #3
On 27.06.2017 16:15, Maxim Uvarov wrote:
> On 06/27/17 16:00, Github ODP bot wrote:

>> +                          - env echo -e 'Provides\x3a multiarch-support, debconf, debconf-2.0' > dummy

> typo


Where?

-- 
With best wishes
Dmitry
Dmitry Eremin-Solenikov June 27, 2017, 1:18 p.m. UTC | #4
On 27.06.2017 16:13, Maxim Uvarov wrote:
> On 06/27/17 16:00, Github ODP bot wrote:

>> -        - ./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"

> 

> I really would like that these lines match documentation. If in README

> we say to run ./bootstrap it has to be here also.


It won't work, because bootstrap calls configure with improper
arguments. E.g. I did not find a way to pass --host to it. So
compilation of CUnit fails.

-- 
With best wishes
Dmitry
Maxim Uvarov June 27, 2017, 1:28 p.m. UTC | #5
On 06/27/17 16:18, Dmitry Eremin-Solenikov wrote:
> On 27.06.2017 16:13, Maxim Uvarov wrote:

>> On 06/27/17 16:00, Github ODP bot wrote:

>>> -        - ./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"

>>

>> I really would like that these lines match documentation. If in README

>> we say to run ./bootstrap it has to be here also.

> 

> It won't work, because bootstrap calls configure with improper

> arguments. E.g. I did not find a way to pass --host to it. So

> compilation of CUnit fails.

> 

ah, it's not odp, it's Cunit. Then we do not care. My comment was only
for ODP. Sorry for confusing..

Maxim.
Maxim Uvarov June 27, 2017, 3:51 p.m. UTC | #6
On 06/27/17 16:17, Dmitry Eremin-Solenikov wrote:
> On 27.06.2017 16:15, Maxim Uvarov wrote:

>> On 06/27/17 16:00, Github ODP bot wrote:

>>> +                          - env echo -e 'Provides\x3a multiarch-support, debconf, debconf-2.0' > dummy

>> typo

> 

> Where?

> 

what is "\x3a" ?

Maxim.
Dmitry Eremin-Solenikov June 27, 2017, 9:54 p.m. UTC | #7
On 27.06.2017 18:51, Maxim Uvarov wrote:
> On 06/27/17 16:17, Dmitry Eremin-Solenikov wrote:

>> On 27.06.2017 16:15, Maxim Uvarov wrote:

>>> On 06/27/17 16:00, Github ODP bot wrote:

>>>> +                          - env echo -e 'Provides\x3a multiarch-support, debconf, debconf-2.0' > dummy

>>> typo

>>

>> Where?

>>

> what is "\x3a" ?


See the comment above. Travis responds badly to colon in the command
line, so I had to use hex escape sequence.

-- 
With best wishes
Dmitry
Maxim Uvarov June 28, 2017, 7:38 a.m. UTC | #8
On 28 June 2017 at 00:54, Dmitry Eremin-Solenikov <
dmitry.ereminsolenikov@linaro.org> wrote:

> On 27.06.2017 18:51, Maxim Uvarov wrote:

> > On 06/27/17 16:17, Dmitry Eremin-Solenikov wrote:

> >> On 27.06.2017 16:15, Maxim Uvarov wrote:

> >>> On 06/27/17 16:00, Github ODP bot wrote:

> >>>> +                          - env echo -e 'Provides\x3a

> multiarch-support, debconf, debconf-2.0' > dummy

> >>> typo

> >>

> >> Where?

> >>

> > what is "\x3a" ?

>

> See the comment above. Travis responds badly to colon in the command

> line, so I had to use hex escape sequence.

>

>

ok, thanks, got it.


> --

> With best wishes

> Dmitry

>
diff mbox series

Patch

diff --git a/.travis.yml b/.travis.yml
index 2cc8caf7..27be7d48 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 autoconf-archive 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 {} \;