All of lore.kernel.org
 help / color / mirror / Atom feed
From: Roger Meier <r.meier@siemens.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v4] .travis.yml: build u-boot on travis-ci
Date: Wed, 19 Nov 2014 15:26:18 +0100	[thread overview]
Message-ID: <1416407178-26676-1-git-send-email-r.meier@siemens.com> (raw)
In-Reply-To: <1415194714-13192-1-git-send-email-r.meier@siemens.com>

From: "Meier, Roger" <r.meier@siemens.com>

Goal:
  - building all variants of U-Boot with multiple configurations
  - code quality checks and metrics
  - https://travis-ci.org/u-boot/u-boot/builds

---
Changes for v4:
  - ignore HACKKIT board (suggested by Wolfgang Denk)
  - add /tmp/dtc as first element to PATH (suggested by Wolfgang Denk)

Changes for v3:
  - fix patch format (recognized by Andreas F?rber)
  - get in touch with GitHub about the orphan u-boot account and get it
  - install travis-ci hook on the account https://github.com/u-boot/u-boot/
  - push master and travis branch to https://github.com/u-boot/u-boot/
  - add Goal to the commit message

Changes for v2:
  - use latest device tree compiler (suggested by Daniel Schwierzeck)
  - add sandbox (suggested by Daniel Schwierzeck)
  - seperate echo and execution of TEST_CMD
  - remove BUILD_NCPUS( part of script)
  - introduce ${TEST_CONFIG_CMD}
  - add libsdl-dev package which is required by sandbox
  - use buildman (suggested by Tom Rini)
  - generate ~/.buildman
  - split ppc into several jobs
  - install gcc-arm-linux-gnueabihf
  - use --inline-suppr option for cppcheck

Signed-off-by: Roger Meier <r.meier@siemens.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Tom Rini <trini@ti.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cc: Andreas F?rber <afaerber@suse.de>
---
 .travis.yml |  150 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 150 insertions(+)
 create mode 100644 .travis.yml

diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..90f0fd7
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,150 @@
+# 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:
+ # install U-Boot build dependencies
+ - sudo apt-get install -qq cppcheck sloccount sparse bc libsdl-dev gcc-arm-linux-gnueabi gcc-arm-linux-gnueabihf
+ # install latest device tree compiler
+ - git clone --depth=1 https://git.kernel.org/pub/scm/utils/dtc/dtc.git /tmp/dtc
+ - make -j4 -C /tmp/dtc
+ # prepare buildman environment
+ - export BUILDMAN_ROOT="root:"
+ - export BUILDMAN_MIPS="mips:"
+ - export BUILDMAN_PPC="ppc:"
+ - echo -e "[toolchain]\\n${BUILDMAN_ROOT} /\n" > ~/.buildman
+ - echo -e "${BUILDMAN_MIPS} /opt/eldk-5.4/mips/sysroots/i686-eldk-linux/usr/bin/mips32-linux/" >> ~/.buildman
+ - echo -e "${BUILDMAN_PPC} /opt/eldk-5.4/powerpc/sysroots/i686-eldk-linux/usr/bin/powerpc-linux/" >> ~/.buildman
+ - export BUILDMAN_ALIAS="x86:"
+ - echo -e "[toolchain-alias]\\n${BUILDMAN_ALIAS}  i386" >> ~/.buildman
+ - cat ~/.buildman
+
+env:
+  global:
+    - PATH=/tmp/dtc:$PATH
+    - BUILD_DIR=build
+    - CROSS_COMPILE=""
+    - HOSTCC="cc"
+    - HOSTCXX="c++"
+    - TEST_CONFIG_CMD=""
+
+before_script:
+  # install toolchains based on INSTALL_TOOLCHAIN} variable
+  - if [[ "${INSTALL_TOOLCHAIN}" == *ppc* ]]; then wget ftp://ftp.denx.de/pub/eldk/5.4/targets/powerpc/eldk-eglibc-i686-powerpc-toolchain-gmae-5.4.sh ; fi
+  - if [[ "${INSTALL_TOOLCHAIN}" == *ppc* ]]; then sh eldk-eglibc-i686-powerpc-toolchain-gmae-5.4.sh -y ; fi
+  - if [[ "${INSTALL_TOOLCHAIN}" == *mips* ]]; then wget ftp://ftp.denx.de/pub/eldk/5.4/targets/mips/eldk-eglibc-i686-mips-toolchain-gmae-5.4.sh ; fi
+  - if [[ "${INSTALL_TOOLCHAIN}" == *mips* ]]; then sh eldk-eglibc-i686-mips-toolchain-gmae-5.4.sh -y ; fi
+
+script:
+ # the execution sequence for each test
+ - echo ${TEST_CONFIG_CMD}
+ - ${TEST_CONFIG_CMD}
+ - echo ${TEST_CMD}
+ - ${TEST_CMD}
+
+matrix:
+  include:
+  # we need to build by vendor due to 50min time limit for builds
+  # each env setting here is a dedicated build
+    - 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_CONFIG_CMD="make sandbox_defconfig"
+          TEST_CMD="make -j4"
+          HOSTCC  = "gcc"
+          HOSTCXX  = "g++"
+    - env:
+        - TEST_CONFIG_CMD="make sandbox_defconfig"
+          TEST_CMD="make -j4"
+          HOSTCC  = "clang"
+          HOSTCXX  = "clang++"
+    - env:
+        - TEST_CMD="./MAKEALL -a mips"
+          INSTALL_TOOLCHAIN="mips"
+          CROSS_COMPILE="/opt/eldk-5.4/mips/sysroots/i686-eldk-linux/usr/bin/mips32-linux/mips-linux-"
+    - env:
+        - TEST_CMD="tools/buildman/buildman --list-error-boards atmel"
+    - env:
+        - TEST_CMD="tools/buildman/buildman --list-error-boards denx"
+    - env:
+        - TEST_CMD="tools/buildman/buildman --list-error-boards freescale arm"
+    - env:
+        - TEST_CMD="tools/buildman/buildman --list-error-boards siemens"
+    - env:
+        - TEST_CMD="tools/buildman/buildman --list-error-boards ti"
+    - env:
+        - TEST_CMD="tools/buildman/buildman mips"
+          INSTALL_TOOLCHAIN="mips"
+    - env:
+        - TEST_CMD="tools/buildman/buildman mpc5xx"
+          INSTALL_TOOLCHAIN="ppc"
+    - env:
+        - TEST_CMD="tools/buildman/buildman mpc8xx"
+          INSTALL_TOOLCHAIN="ppc"
+    - env:
+        - TEST_CMD="tools/buildman/buildman mpc5xxx"
+          INSTALL_TOOLCHAIN="ppc"
+    - env:
+        - TEST_CMD="tools/buildman/buildman mpc512x"
+          INSTALL_TOOLCHAIN="ppc"
+    - env:
+        - TEST_CMD="tools/buildman/buildman mpc824x"
+          INSTALL_TOOLCHAIN="ppc"
+    - env:
+        - TEST_CMD="tools/buildman/buildman mpc8260"
+          INSTALL_TOOLCHAIN="ppc"
+    - env:
+        - TEST_CMD="tools/buildman/buildman mpc83xx"
+          INSTALL_TOOLCHAIN="ppc"
+    - env:
+        - TEST_CMD="tools/buildman/buildman mpc85xx"
+          INSTALL_TOOLCHAIN="ppc"
+    - env:
+        - TEST_CMD="tools/buildman/buildman mpc86xx"
+          INSTALL_TOOLCHAIN="ppc"
+
+    - env:
+        - TEST_CMD="tools/buildman/buildman --list-error-boards sandbox x86"
+
+    # QA jobs for code analytics
+    # static code analysis with cppcheck (we can add --enable=all later)
+    - env:
+        - TEST_CMD="cppcheck --force --quiet --inline-suppr ."
+    # search for TODO within source tree
+    - env:
+        - TEST_CMD="grep -r TODO ."
+    # search for FIXME within source tree
+    - env:
+        - TEST_CMD="grep -r FIXME ."
+    # search for HACK within source tree and ignore HACKKIT board
+    - env:
+        - TEST_CMD="grep -r HACK . | grep -v HACKKIT"
+      script:
+        - grep -r HACK . | grep -v HACKKIT
+    # some statistics about the code base
+    - env:
+        - TEST_CMD="sloccount ."
+
+notifications:
+  email: false
+
+# TODO make it perfect ;-r
-- 
1.7.10.4

  parent reply	other threads:[~2014-11-19 14:26 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-05 13:38 [U-Boot] [PATCH] .travis.yml: build u-boot on travis-ci Roger Meier
2014-11-05 15:10 ` Meier, Roger
2014-11-05 15:51   ` Tom Rini
2014-11-05 17:16     ` Meier, Roger
2014-11-05 16:57 ` Wolfgang Denk
2014-11-05 17:25 ` Daniel Schwierzeck
2014-11-14 13:58 ` [U-Boot] [PATCH v2] " Roger Meier
2014-11-16 11:05   ` Andreas Färber
2014-11-18 10:19     ` Meier, Roger
2014-11-19  6:07   ` [U-Boot] [PATCH v3] " Roger Meier
2014-11-19  6:31     ` Wolfgang Denk
2014-11-19  6:40     ` Wolfgang Denk
2014-11-19 14:26 ` Roger Meier [this message]
2015-01-15 14:57   ` [U-Boot] [U-Boot,v4] " Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1416407178-26676-1-git-send-email-r.meier@siemens.com \
    --to=r.meier@siemens.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.