diff mbox

[U-Boot] .travis.yml: build u-boot on travis-ci

Message ID 1415194714-13192-1-git-send-email-r.meier@siemens.com
State Changes Requested
Delegated to: Tom Rini
Headers show

Commit Message

Meier, Roger Nov. 5, 2014, 1:38 p.m. UTC
Signed-off-by: Roger Meier <r.meier@siemens.com>
---
 .travis.yml |   86 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 86 insertions(+)
 create mode 100644 .travis.yml

Comments

Meier, Roger Nov. 5, 2014, 3:10 p.m. UTC | #1
And here is the result:
https://travis-ci.org/siemens/u-boot/builds/40058028


> -----Original Message-----
> From: Roger Meier [mailto:r.meier@siemens.com]
> Sent: Mittwoch, 5. November 2014 14:39
> To: u-boot@lists.denx.de
> Cc: Roger Meier; Meier, Roger
> Subject: [PATCH] .travis.yml: build u-boot on travis-ci
> 
> Signed-off-by: Roger Meier <r.meier@siemens.com>
> ---
>  .travis.yml |   86
> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 86 insertions(+)
>  create mode 100644 .travis.yml
> 
> diff --git a/.travis.yml b/.travis.yml
> new file mode 100644
> index 0000000..027aff2
> --- /dev/null
> +++ b/.travis.yml
> @@ -0,0 +1,86 @@
> +# Copyright Roger Meier <r.meier@siemens.com>
> +# SPDX-License-Identifier:	GPL-2.0+
> +
> +# build U-Boot on Travis CI - https://travis-ci.org/
> +
> +language: c
> +
> +cache:
> + - apt
> +
> +install:
> + - sudo apt-get install -qq cppcheck sloccount sparse bc device-tree-compiler
> gcc-arm-linux-gnueabi
> +
> +env:
> +  global:
> +    - BUILD_DIR=build
> +    - DOWNLOAD_URL=""
> +    - INSTALL_CMD=""
> +    - CROSS_COMPILE=""
> +    - HOSTCC  = "cc"
> +    - HOSTCXX = "c++"
> +
> +before_script:
> + - if [[ "$DOWNLOAD_URL" != "" ]]; then wget $DOWNLOAD_URL ; fi
> + - if [[ "$INSTALL_CMD" != "" ]]; then $INSTALL_CMD ; fi
> +
> +script:
> + - export BUILD_NCPUS="`grep processor /proc/cpuinfo | wc -l`"
> + - echo "BUILD on" $BUILD_NCPUS "cpu's"
> + - echo $TEST_CMD && $TEST_CMD
> +
> +matrix:
> +  include:
> +# arm and powerpc have too many boards for th 50min time limit
> +# so we need to build by vendor
> +    - env:
> +        - TEST_CMD="./MAKEALL -a arm -v atmel"
> +          CROSS_COMPILE="arm-linux-gnueabi-"
> +    - env:
> +        - TEST_CMD="./MAKEALL -a arm -v denx"
> +          CROSS_COMPILE="arm-linux-gnueabi-"
> +    - env:
> +        - TEST_CMD="./MAKEALL -a arm -v freescale"
> +          CROSS_COMPILE="arm-linux-gnueabi-"
> +    - env:
> +        - TEST_CMD="./MAKEALL -a arm -v siemens"
> +          CROSS_COMPILE="arm-linux-gnueabi-"
> +    - env:
> +        - TEST_CMD="./MAKEALL -a arm -v ti"
> +          CROSS_COMPILE="arm-linux-gnueabi-"
> +    - env:
> +        - TEST_CMD="./MAKEALL -a x86"
> +        - HOSTCC  = "gcc"
> +        - HOSTCXX  = "g++"
> +    - env:
> +        - TEST_CMD="./MAKEALL -a x86"
> +        - HOSTCC  = "clang"
> +        - HOSTCXX  = "clang++"
> +    - env:
> +        - TEST_CMD="./MAKEALL -a powerpc -v freescale"
> +          CROSS_COMPILE="/opt/eldk-5.4/powerpc/sysroots/i686-eldk-
> linux/usr/bin/powerpc-linux/powerpc-"
> +          DOWNLOAD_URL="ftp://ftp.denx.de/pub/eldk/5.4/targets/powerpc/eldk-
> eglibc-i686-powerpc-toolchain-gmae-5.4.sh"
> +          INSTALL_CMD="sh eldk-eglibc-i686-powerpc-toolchain-gmae-5.4.sh -y"
> +    - env:
> +        - TEST_CMD="./MAKEALL -a mips"
> +          CROSS_COMPILE="/opt/eldk-5.4/mips/sysroots/i686-eldk-
> linux/usr/bin/mips32-linux/mips-linux-"
> +          DOWNLOAD_URL="ftp://ftp.denx.de/pub/eldk/5.4/targets/mips/eldk-
> eglibc-i686-mips-toolchain-gmae-5.4.sh"
> +          INSTALL_CMD="sh eldk-eglibc-i686-mips-toolchain-gmae-5.4.sh -y"
> +    - env:
> +        - TEST_CMD="./MAKEALL -a arm -v denx -v siemens"
> +          CROSS_COMPILE="/opt/eldk-5.4/armv7a-hf/sysroots/i686-eldk-
> linux/usr/bin/armv7ahf-vfp-neon-linux-gnueabi/arm-linux-gnueabi-"
> +          DOWNLOAD_URL="ftp://ftp.denx.de/pub/eldk/5.4/targets/armv7a-
> hf/eldk-eglibc-i686-arm-toolchain-gmae-5.4.sh"
> +          INSTALL_CMD="sh eldk-eglibc-i686-arm-toolchain-gmae-5.4.sh -y"
> +    - env:
> +        - TEST_CMD="cppcheck --force --quiet ."
> +    - env:
> +        - TEST_CMD="grep -r TODO *"
> +    - env:
> +        - TEST_CMD="grep -r FIXME *"
> +    - env:
> +        - TEST_CMD="grep -r HACK *"
> +    - env:
> +        - TEST_CMD="sloccount ."
> +
> +notifications:
> +  email: false
> --
> 1.7.10.4
Tom Rini Nov. 5, 2014, 3:51 p.m. UTC | #2
On Wed, Nov 05, 2014 at 03:10:11PM +0000, Meier, Roger wrote:

> And here is the result:
> https://travis-ci.org/siemens/u-boot/builds/40058028

Interesting.  I just saw something else about travis-ci elsewhere.  My
first thought is can you update it to use buildman instead of MAKEALL?
And a few more comments about what/why and I don't see a downside to
including at least a sample config and we can explore wider usage of
travis-ci (the 50min thing worries me a bit but maybe we can find some
other ways to break it down).  Thanks!
Wolfgang Denk Nov. 5, 2014, 4:57 p.m. UTC | #3
Dear Roger Meier,

In message <1415194714-13192-1-git-send-email-r.meier@siemens.com> you wrote:
> Signed-off-by: Roger Meier <r.meier@siemens.com>
> ---
>  .travis.yml |   86 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 86 insertions(+)
>  create mode 100644 .travis.yml

Cool,  thanks a lot!

As Tom already commented, we should probably move to buildman now that
MAKEALL is scheduled for removel, but I really like this approach!

Acked-by: Wolfgang Denk <wd@denx.de>

Best regards,

Wolfgang Denk
Meier, Roger Nov. 5, 2014, 5:16 p.m. UTC | #4
> On Wed, Nov 05, 2014 at 03:10:11PM +0000, Meier, Roger wrote:
> 
> > And here is the result:
> > https://travis-ci.org/siemens/u-boot/builds/40058028
> 
> Interesting.  I just saw something else about travis-ci elsewhere.  My
> first thought is can you update it to use buildman instead of MAKEALL?
> And a few more comments about what/why and I don't see a downside to
> including at least a sample config and we can explore wider usage of
> travis-ci (the 50min thing worries me a bit but maybe we can find some
> other ways to break it down).  Thanks!
Yes, I know buildman is the new MAKEALL.
It is already on my list, I will try to get it up and running during the
next few days and will include some more comments with a further version. 

A big challenge is to add all toolchains and create small configurations
to stay within time limit. That's why I created some vendor configs.
Parallel execution is another key element, I guess buildman is already
taking care on this.

Would be great, if somebody can have a look at the broken builds we have
with this .travis.yml file.

Best!
-roger
Daniel Schwierzeck Nov. 5, 2014, 5:25 p.m. UTC | #5
On 05.11.2014 14:38, Roger Meier wrote:
> Signed-off-by: Roger Meier <r.meier@siemens.com>
> ---
>  .travis.yml |   86 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 86 insertions(+)
>  create mode 100644 .travis.yml
> 
> diff --git a/.travis.yml b/.travis.yml
> new file mode 100644
> index 0000000..027aff2
> --- /dev/null
> +++ b/.travis.yml
> @@ -0,0 +1,86 @@
> +# Copyright Roger Meier <r.meier@siemens.com>
> +# SPDX-License-Identifier:	GPL-2.0+
> +
> +# build U-Boot on Travis CI - https://travis-ci.org/
> +
> +language: c
> +
> +cache:
> + - apt
> +
> +install:
> + - sudo apt-get install -qq cppcheck sloccount sparse bc device-tree-compiler gcc-arm-linux-gnueabi

does Ubuntu's device-tree-compiler work for you with current mainline? 
Actually Ubuntu 12.04 ships dtc-1.3 and U-Boot requires at least dtc-1.4. 
I need following fragments to get sandbox working:

install:
  - git clone --depth=1 https://git.kernel.org/pub/scm/utils/dtc/dtc.git /tmp/dtc
  - make -j4 -C /tmp/dtc

script:
  - make sandbox_defconfig
  - make -j4

env:
  global:
    - PATH=$PATH:/tmp/dtc

> +
> +env:
> +  global:
> +    - BUILD_DIR=build
> +    - DOWNLOAD_URL=""
> +    - INSTALL_CMD=""
> +    - CROSS_COMPILE=""
> +    - HOSTCC  = "cc"
> +    - HOSTCXX = "c++"
> +
> +before_script:
> + - if [[ "$DOWNLOAD_URL" != "" ]]; then wget $DOWNLOAD_URL ; fi
> + - if [[ "$INSTALL_CMD" != "" ]]; then $INSTALL_CMD ; fi
> +
> +script:
> + - export BUILD_NCPUS="`grep processor /proc/cpuinfo | wc -l`"
> + - echo "BUILD on" $BUILD_NCPUS "cpu's"
> + - echo $TEST_CMD && $TEST_CMD
> +
> +matrix:
> +  include:
> +# arm and powerpc have too many boards for th 50min time limit
> +# so we need to build by vendor
> +    - env:
> +        - TEST_CMD="./MAKEALL -a arm -v atmel"
> +          CROSS_COMPILE="arm-linux-gnueabi-"
> +    - env:
> +        - TEST_CMD="./MAKEALL -a arm -v denx"
> +          CROSS_COMPILE="arm-linux-gnueabi-"
> +    - env:
> +        - TEST_CMD="./MAKEALL -a arm -v freescale"
> +          CROSS_COMPILE="arm-linux-gnueabi-"
> +    - env:
> +        - TEST_CMD="./MAKEALL -a arm -v siemens"
> +          CROSS_COMPILE="arm-linux-gnueabi-"
> +    - env:
> +        - TEST_CMD="./MAKEALL -a arm -v ti"
> +          CROSS_COMPILE="arm-linux-gnueabi-"
> +    - env:
> +        - TEST_CMD="./MAKEALL -a x86"
> +        - HOSTCC  = "gcc"
> +        - HOSTCXX  = "g++"
> +    - env:
> +        - TEST_CMD="./MAKEALL -a x86"
> +        - HOSTCC  = "clang"
> +        - HOSTCXX  = "clang++"
> +    - env:
> +        - TEST_CMD="./MAKEALL -a powerpc -v freescale"
> +          CROSS_COMPILE="/opt/eldk-5.4/powerpc/sysroots/i686-eldk-linux/usr/bin/powerpc-linux/powerpc-"
> +          DOWNLOAD_URL="ftp://ftp.denx.de/pub/eldk/5.4/targets/powerpc/eldk-eglibc-i686-powerpc-toolchain-gmae-5.4.sh"
> +          INSTALL_CMD="sh eldk-eglibc-i686-powerpc-toolchain-gmae-5.4.sh -y"
> +    - env:
> +        - TEST_CMD="./MAKEALL -a mips"
> +          CROSS_COMPILE="/opt/eldk-5.4/mips/sysroots/i686-eldk-linux/usr/bin/mips32-linux/mips-linux-"
> +          DOWNLOAD_URL="ftp://ftp.denx.de/pub/eldk/5.4/targets/mips/eldk-eglibc-i686-mips-toolchain-gmae-5.4.sh"
> +          INSTALL_CMD="sh eldk-eglibc-i686-mips-toolchain-gmae-5.4.sh -y"
> +    - env:
> +        - TEST_CMD="./MAKEALL -a arm -v denx -v siemens"
> +          CROSS_COMPILE="/opt/eldk-5.4/armv7a-hf/sysroots/i686-eldk-linux/usr/bin/armv7ahf-vfp-neon-linux-gnueabi/arm-linux-gnueabi-"
> +          DOWNLOAD_URL="ftp://ftp.denx.de/pub/eldk/5.4/targets/armv7a-hf/eldk-eglibc-i686-arm-toolchain-gmae-5.4.sh"
> +          INSTALL_CMD="sh eldk-eglibc-i686-arm-toolchain-gmae-5.4.sh -y"
> +    - env:
> +        - TEST_CMD="cppcheck --force --quiet ."
> +    - env:
> +        - TEST_CMD="grep -r TODO *"
> +    - env:
> +        - TEST_CMD="grep -r FIXME *"
> +    - env:
> +        - TEST_CMD="grep -r HACK *"
> +    - env:
> +        - TEST_CMD="sloccount ."
> +
> +notifications:
> +  email: false
>
diff mbox

Patch

diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..027aff2
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,86 @@ 
+# Copyright Roger Meier <r.meier@siemens.com>
+# SPDX-License-Identifier:	GPL-2.0+
+
+# build U-Boot on Travis CI - https://travis-ci.org/
+
+language: c
+
+cache:
+ - apt
+
+install:
+ - sudo apt-get install -qq cppcheck sloccount sparse bc device-tree-compiler gcc-arm-linux-gnueabi
+
+env:
+  global:
+    - BUILD_DIR=build
+    - DOWNLOAD_URL=""
+    - INSTALL_CMD=""
+    - CROSS_COMPILE=""
+    - HOSTCC  = "cc"
+    - HOSTCXX = "c++"
+
+before_script:
+ - if [[ "$DOWNLOAD_URL" != "" ]]; then wget $DOWNLOAD_URL ; fi
+ - if [[ "$INSTALL_CMD" != "" ]]; then $INSTALL_CMD ; fi
+
+script:
+ - export BUILD_NCPUS="`grep processor /proc/cpuinfo | wc -l`"
+ - echo "BUILD on" $BUILD_NCPUS "cpu's"
+ - echo $TEST_CMD && $TEST_CMD
+
+matrix:
+  include:
+# arm and powerpc have too many boards for th 50min time limit
+# so we need to build by vendor
+    - env:
+        - TEST_CMD="./MAKEALL -a arm -v atmel"
+          CROSS_COMPILE="arm-linux-gnueabi-"
+    - env:
+        - TEST_CMD="./MAKEALL -a arm -v denx"
+          CROSS_COMPILE="arm-linux-gnueabi-"
+    - env:
+        - TEST_CMD="./MAKEALL -a arm -v freescale"
+          CROSS_COMPILE="arm-linux-gnueabi-"
+    - env:
+        - TEST_CMD="./MAKEALL -a arm -v siemens"
+          CROSS_COMPILE="arm-linux-gnueabi-"
+    - env:
+        - TEST_CMD="./MAKEALL -a arm -v ti"
+          CROSS_COMPILE="arm-linux-gnueabi-"
+    - env:
+        - TEST_CMD="./MAKEALL -a x86"
+        - HOSTCC  = "gcc"
+        - HOSTCXX  = "g++"
+    - env:
+        - TEST_CMD="./MAKEALL -a x86"
+        - HOSTCC  = "clang"
+        - HOSTCXX  = "clang++"
+    - env:
+        - TEST_CMD="./MAKEALL -a powerpc -v freescale"
+          CROSS_COMPILE="/opt/eldk-5.4/powerpc/sysroots/i686-eldk-linux/usr/bin/powerpc-linux/powerpc-"
+          DOWNLOAD_URL="ftp://ftp.denx.de/pub/eldk/5.4/targets/powerpc/eldk-eglibc-i686-powerpc-toolchain-gmae-5.4.sh"
+          INSTALL_CMD="sh eldk-eglibc-i686-powerpc-toolchain-gmae-5.4.sh -y"
+    - env:
+        - TEST_CMD="./MAKEALL -a mips"
+          CROSS_COMPILE="/opt/eldk-5.4/mips/sysroots/i686-eldk-linux/usr/bin/mips32-linux/mips-linux-"
+          DOWNLOAD_URL="ftp://ftp.denx.de/pub/eldk/5.4/targets/mips/eldk-eglibc-i686-mips-toolchain-gmae-5.4.sh"
+          INSTALL_CMD="sh eldk-eglibc-i686-mips-toolchain-gmae-5.4.sh -y"
+    - env:
+        - TEST_CMD="./MAKEALL -a arm -v denx -v siemens"
+          CROSS_COMPILE="/opt/eldk-5.4/armv7a-hf/sysroots/i686-eldk-linux/usr/bin/armv7ahf-vfp-neon-linux-gnueabi/arm-linux-gnueabi-"
+          DOWNLOAD_URL="ftp://ftp.denx.de/pub/eldk/5.4/targets/armv7a-hf/eldk-eglibc-i686-arm-toolchain-gmae-5.4.sh"
+          INSTALL_CMD="sh eldk-eglibc-i686-arm-toolchain-gmae-5.4.sh -y"
+    - env:
+        - TEST_CMD="cppcheck --force --quiet ."
+    - env:
+        - TEST_CMD="grep -r TODO *"
+    - env:
+        - TEST_CMD="grep -r FIXME *"
+    - env:
+        - TEST_CMD="grep -r HACK *"
+    - env:
+        - TEST_CMD="sloccount ."
+
+notifications:
+  email: false