[ovs-dev] [PATCH ] travis: support ppc64le builds

Ilya Maximets i.maximets at ovn.org
Tue Oct 29 16:52:02 UTC 2019


On 28.10.2019 22:22, David Wilder wrote:
> Add support for travis-ci ppc64le builds.
> 
> - Updated matrix in .travis.yml to include a ppc64le build.
> - Added support to install packages needed by specific architectures.
> 
> To keep the total build time at an acceptable level only a single build
> job is included in the matrix for ppc64le.
> 
> A build report example can be found here [1]
> [0] http://travis-ci.org/
> [1] https://travis-ci.org/djlwilder/ovs/builds/604098141
> 
> Signed-off-by: David Wilder <dwilder at us.ibm.com>

Hi David,
Thanks for working on this. I have a couple of question regarding
ppc64le support by TravisCI.  It seems that they are not supporting
this architecture officially and refusing[1] to solve any issues that
appears while using it. There also no official documentation.
It's kind of a hidden feature that some projects are using for their
own risk [2]. Do you know why this happens or maybe you have some
insights about what is going on/how it works?
The API is also a bit strange because Travis started to officially
support arm builds, but this is done via 'arch' knob, not the 'os'.
Will it be changed over time for ppc64le?

[1] https://travis-ci.community/t/ppc64le-arch-support-on-travis-ci-com-vs-travis-ci-org/2898/2
[2] https://github.com/openssl/openssl/commit/13da3ad00c80e1da816ca27f6c15b0ecee1bb0b8

Few code comments inline.

> ---
>   .travis.yml              |  5 +++--
>   .travis/linux-prepare.sh | 18 ++++++++++++++----
>   2 files changed, 17 insertions(+), 6 deletions(-)
> 
> diff --git a/.travis.yml b/.travis.yml
> index 5676d9748..c99f26815 100644
> --- a/.travis.yml
> +++ b/.travis.yml
> @@ -14,7 +14,6 @@ addons:
>     apt:
>       packages:
>         - bc
> -      - gcc-multilib
>         - libssl-dev
>         - llvm-dev
>         - libjemalloc1
> @@ -24,7 +23,6 @@ addons:
>         - libelf-dev
>         - selinux-policy-dev
>         - libunbound-dev
> -      - libunbound-dev:i386
>         - libunwind-dev
>   
>   before_install: ./.travis/${TRAVIS_OS_NAME}-prepare.sh
> @@ -50,6 +48,9 @@ matrix:
>       - os: osx
>         compiler: clang
>         env: OPTS="--disable-ssl"
> +    - os: linux-ppc64le
> +      compiler: gcc
> +      env: OPTS="--disable-ssl"
>   
>   script: ./.travis/${TRAVIS_OS_NAME}-build.sh $OPTS
>   
> diff --git a/.travis/linux-prepare.sh b/.travis/linux-prepare.sh
> index e546d32cb..f3a9a6d44 100755
> --- a/.travis/linux-prepare.sh
> +++ b/.travis/linux-prepare.sh
> @@ -15,8 +15,18 @@ cd ..
>   pip install --disable-pip-version-check --user six flake8 hacking
>   pip install --user --upgrade docutils
>   
> -if [ "$M32" ]; then
> -    # 32-bit and 64-bit libunwind can not be installed at the same time.
> -    # This will remove the 64-bit libunwind and install 32-bit version.
> -    sudo apt-get install -y libunwind-dev:i386
> +# Include packages needed by specific architectures.
> +if [ $TRAVIS_ARCH == amd64 ]; then
> +   sudo apt-get install -y \
> +        libunbound-dev:i386 \
> +        gcc-multilib

These packages are only needed for 32bit build, so you may just move them
to the command that installs 32bit version of libunwind.
And since you're not building 32bit with ppc64le, the code could look like:

if [ "$M32" ]; then
    # install 32 bit libs
fi

if [ $TRAVIS_ARCH == ppc64le ]; then
    # install ppc64le specific things.
fi

> +
> +    if [ "$M32" ]; then
> +       # 32-bit and 64-bit libunwind can not be installed at the same time.
> +       # This will remove the 64-bit libunwind and install 32-bit version.
> +       sudo apt-get install -y libunwind-dev:i386
> +    fi
> +
> +elif [ $TRAVIS_ARCH == ppc64le ]; then
> +   sudo apt-get install -y flex

Why 'flex' is needed?

Best regards, Ilya Maximets.


More information about the dev mailing list