uboot/.travis.yml
<<
>>
Prefs
   1# Copyright Roger Meier <r.meier@siemens.com>
   2# SPDX-License-Identifier:      GPL-2.0+
   3
   4# build U-Boot on Travis CI - https://travis-ci.org/
   5
   6sudo: true
   7
   8language: c
   9
  10addons:
  11  apt:
  12    packages:
  13    - cppcheck
  14    - sloccount
  15    - sparse
  16    - bc
  17    - build-essential
  18    - libsdl1.2-dev
  19    - python
  20    - python-virtualenv
  21
  22cache:
  23 - apt
  24
  25install:
  26 # install latest device tree compiler
  27 - git clone --depth=1 https://git.kernel.org/pub/scm/utils/dtc/dtc.git /tmp/dtc
  28 - make -j4 -C /tmp/dtc
  29 # prepare buildman environment
  30 - export BUILDMAN_ROOT="root:"
  31 - export BUILDMAN_PPC="ppc:"
  32 - export BUILDMAN_ARM="arm:"
  33 - export BUILDMAN_SANDBOX="sandbox:"
  34 - echo -e "[toolchain]\n${BUILDMAN_ROOT} /\n" > ~/.buildman
  35 - echo -e "${BUILDMAN_PPC} /opt/eldk-5.4/powerpc/sysroots/i686-eldk-linux/usr/bin/powerpc-linux/\n" >> ~/.buildman
  36 - echo -e "${BUILDMAN_ARM} /opt/eldk-5.4/armv5te/sysroots/i686-eldk-linux/usr/bin/armv5te-linux-gnueabi/\n" >> ~/.buildman
  37 - echo -e "${BUILDMAN_SANDBOX} /usr/bin/gcc\n" >> ~/.buildman
  38 - export BUILDMAN_ALIAS="x86:"
  39 - export BUILDMAN_ALIAS_ARM="arm:"
  40 - echo -e "\n\n[toolchain-alias]\n${BUILDMAN_ALIAS} i386\n" >> ~/.buildman
  41 - echo -e "${BUILDMAN_ALIAS_ARM} armv5te\n" >> ~/.buildman
  42 - cat ~/.buildman
  43 - virtualenv /tmp/venv
  44 - . /tmp/venv/bin/activate
  45 - pip install pytest
  46
  47env:
  48  global:
  49    - PATH=/tmp/dtc:$PATH
  50    - BUILD_DIR=build
  51    - HOSTCC="cc"
  52    - HOSTCXX="c++"
  53
  54before_script:
  55  # install toolchains based on TOOLCHAIN} variable
  56  - if [[ "${TOOLCHAIN}" == *aarch64* ]]; then ./tools/buildman/buildman --fetch-arch aarch64 ; fi
  57  - if [[ "${TOOLCHAIN}" == *arm* ]]; then wget ftp://ftp.denx.de/pub/eldk/5.4/targets/armv5te/eldk-eglibc-i686-arm-toolchain-gmae-5.4.sh ; fi
  58  - if [[ "${TOOLCHAIN}" == *arm* ]]; then sh eldk-eglibc-i686-arm-toolchain-gmae-5.4.sh -y ; fi
  59  - if [[ "${TOOLCHAIN}" == *avr32* ]]; then ./tools/buildman/buildman --fetch-arch avr32 ; fi
  60  - if [[ "${TOOLCHAIN}" == *i386* ]]; then ./tools/buildman/buildman sandbox --fetch-arch i386 ; fi
  61  - if [[ "${TOOLCHAIN}" == *m68k* ]]; then ./tools/buildman/buildman --fetch-arch m68k ; fi
  62  - if [[ "${TOOLCHAIN}" == *mips* ]]; then ./tools/buildman/buildman --fetch-arch mips ; fi
  63  - if [[ "${TOOLCHAIN}" == *ppc* ]]; then wget ftp://ftp.denx.de/pub/eldk/5.4/targets/powerpc/eldk-eglibc-i686-powerpc-toolchain-gmae-5.4.sh ; fi
  64  - if [[ "${TOOLCHAIN}" == *ppc* ]]; then sh eldk-eglibc-i686-powerpc-toolchain-gmae-5.4.sh -y ; fi
  65
  66script:
  67 # the execution sequence for each test
  68 - if [[ "${TEST_CMD}" != "" ]]; then
  69     ${TEST_CMD};
  70   fi
  71 - if [[ "${BUILDMAN}" != "" ]]; then
  72     tools/buildman/buildman ${BUILDMAN};
  73   fi
  74
  75matrix:
  76  include:
  77  # we need to build by vendor due to 50min time limit for builds
  78  # each env setting here is a dedicated build
  79    - env:
  80        - BUILDMAN="arm1136"
  81          TOOLCHAIN="arm"
  82    - env:
  83        - BUILDMAN="arm1136"
  84          TOOLCHAIN="arm"
  85    - env:
  86        - BUILDMAN="arm1176"
  87          TOOLCHAIN="arm"
  88    - env:
  89        - BUILDMAN="arm720t"
  90          TOOLCHAIN="arm"
  91    - env:
  92        - BUILDMAN="arm920t"
  93          TOOLCHAIN="arm"
  94    - env:
  95        - BUILDMAN="atmel -x avr32"
  96          TOOLCHAIN="arm"
  97    - env:
  98        - BUILDMAN="avr32"
  99          TOOLCHAIN="avr32"
 100    - env:
 101        - BUILDMAN="davinci"
 102          TOOLCHAIN="arm"
 103    - env:
 104        - BUILDMAN="denx"
 105          TOOLCHAIN="arm"
 106    - env:
 107        - BUILDMAN="freescale -x powerpc,m68k,aarch64"
 108          TOOLCHAIN="arm"
 109    - env:
 110        - BUILDMAN="sandbox x86"
 111          TOOLCHAIN="i386"
 112    - env:
 113        - BUILDMAN="kirkwood"
 114          TOOLCHAIN="arm"
 115    - env:
 116        - BUILDMAN="m68k"
 117          TOOLCHAIN="m68k"
 118    - env:
 119        - BUILDMAN="mips"
 120          TOOLCHAIN="mips"
 121    - env:
 122        - BUILDMAN="mpc512x"
 123          TOOLCHAIN="ppc"
 124    - env:
 125        - BUILDMAN="mpc5xx"
 126          TOOLCHAIN="ppc"
 127    - env:
 128        - BUILDMAN="mpc5xxx"
 129          TOOLCHAIN="ppc"
 130    - env:
 131        - BUILDMAN="mpc8260"
 132          TOOLCHAIN="ppc"
 133    - env:
 134        - BUILDMAN="mpc83xx"
 135          TOOLCHAIN="ppc"
 136    - env:
 137        - BUILDMAN="mpc85xx -x freescale"
 138          TOOLCHAIN="ppc"
 139    - env:
 140        - BUILDMAN="mpc85xx -x t208xrdb -x t4qds -x t102* -x p1_p2_rdb_pc -x p1010rdb -x corenet_ds -x b4860qds -x sbc8548 -x bsc91*"
 141          TOOLCHAIN="ppc"
 142    - env:
 143        - BUILDMAN="t208xrdb t4qds t102*"
 144          TOOLCHAIN="ppc"
 145    - env:
 146        - BUILDMAN="p1_p2_rdb_pc p1010rdb"
 147          TOOLCHAIN="ppc"
 148    - env:
 149        - BUILDMAN="corenet_ds b4860qds sbc8548 bsc91*"
 150          TOOLCHAIN="ppc"
 151    - env:
 152        - BUILDMAN="mpc86xx"
 153          TOOLCHAIN="ppc"
 154    - env:
 155        - BUILDMAN="mpc8xx"
 156          TOOLCHAIN="ppc"
 157    - env:
 158        - BUILDMAN="siemens"
 159          TOOLCHAIN="arm"
 160    - env:
 161        - BUILDMAN="ti"
 162          TOOLCHAIN="arm"
 163    - env:
 164        - BUILDMAN="aarch64"
 165          TOOLCHAIN="aarch64"
 166
 167    # QA jobs for code analytics
 168    # static code analysis with cppcheck (we can add --enable=all later)
 169    - env:
 170        - TEST_CMD="cppcheck --force --quiet --inline-suppr ."
 171    # search for TODO within source tree
 172    - env:
 173        - TEST_CMD="grep -r TODO ."
 174    # search for FIXME within source tree
 175    - env:
 176        - TEST_CMD="grep -r FIXME ."
 177    # search for HACK within source tree and ignore HACKKIT board
 178    - env:
 179        - TEST_CMD="grep -r HACK . | grep -v HACKKIT"
 180      script:
 181        - grep -r HACK . | grep -v HACKKIT
 182    # some statistics about the code base
 183    - env:
 184        - TEST_CMD="sloccount ."
 185    # test/py
 186    - env:
 187        - TEST_CMD="./test/py/test.py --bd sandbox --build"
 188
 189# TODO make it perfect ;-r
 190