From e0048ee45603c6cca724b2d84d1f9260effafe8b Mon Sep 17 00:00:00 2001 From: Rogerz Zhang Date: Sun, 20 Jan 2013 21:51:20 +0800 Subject: [PATCH 1/4] Add detail build result --- .travis.yml | 5 +- tools/auto-ci.py | 129 ++++++++++++++++++++++++----------------------- 2 files changed, 70 insertions(+), 64 deletions(-) diff --git a/.travis.yml b/.travis.yml index 13685ae1c8..c25c0bf47f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,11 +2,12 @@ language: c install: - mkdir ~/toolchain - - curl -s https://sourcery.mentor.com/public/gnu_toolchain/arm-none-eabi/arm-2011.03-42-arm-none-eabi-i686-pc-linux-gnu.tar.bz2 | tar xjf - -C ~/toolchain + - "[ $RTT_CPU = 'arm' ] && curl -s https://sourcery.mentor.com/public/gnu_toolchain/arm-none-eabi/arm-2011.03-42-arm-none-eabi-i686-pc-linux-gnu.tar.bz2 | tar xjf - -C ~/toolchain" before_script: - export RTT_EXEC_PATH=~/toolchain/arm-2011.03/bin - export RTT_ROOT=`pwd` + - export RTT_CC='gcc' - cd tools script: @@ -16,4 +17,4 @@ notifications: email: false env: - - RTT_CC='gcc' + - RTT_CPU='arm' diff --git a/tools/auto-ci.py b/tools/auto-ci.py index 47dd9e552b..67834544d8 100644 --- a/tools/auto-ci.py +++ b/tools/auto-ci.py @@ -1,69 +1,74 @@ import os import sys +bsp_to_cpu = { + 'bf533': 'unknown', + 'dev3210': 'unknown', + 'jz47xx': 'unknown', + 'ls1bdev': 'unknown', + 'm16c62p': 'unknown', + 'microblaze': 'unknown', + 'mini4020': 'unknown', + 'nuc140': 'unknown', + 'nios_ii': 'unknown', + 'pic32ethernet': 'unknown', + 'upd70f3454': 'unknown', + 'wh44b0': 'unknown', + 'xplorer4330': 'unknown', + 'avr32uc3b0': 'avr', + 'taihu': 'ppc', + 'simulator': 'x86', + 'x86': 'x86', + 'at91sam9260': 'arm', + 'efm32': 'arm', + 'lm3s8962': 'arm', + 'lm3s9b9x': 'arm', + 'lm4f232': 'arm', + 'lpc1114': 'arm', + 'lpc122x': 'arm', + 'lpc176x': 'arm', + 'lpc178x': 'arm', + 'lpc2148': 'arm', + 'lpc2478': 'arm', + 'mb9bf500r': 'arm', + 'mb9bf506r': 'arm', + 'mini2440': 'arm', + 'sam7s': 'arm', + 'sam7x': 'arm', + 'stm32f0x': 'arm', + 'stm32f107': 'arm', + 'stm32f10x': 'arm', + 'stm32f20x': 'arm', + 'stm32f40x': 'arm', +} + +results = { + 'success': [], + 'fail': [], + 'ignore': [] +} + +fail = False + BSP_ROOT = '../bsp' -unsupported = """ -bf533 -dev3210 -jz47xx -ls1bdev -m16c62p -microblaze -mini4020 -nuc140 -nios_ii -pic32ethernet -upd70f3454 -wh44b0 -xplorer4330 -""" - -failed = """ -stm32f0x -""" - -avr = """ -avr32uc3b0 -""" - -ppc = """ -taihu -""" - -x86 = """ -simulator -x86 -""" - -arm = """ -at91sam9260 -efm32 -lm3s8962 -lm3s9b9x -lm4f232 -lpc1114 -lpc122x -lpc176x -lpc178x -lpc2148 -lpc2478 -mb9bf500r -mb9bf506r -mini2440 -sam7s -sam7x -stm32f107 -stm32f10x -stm32f20x -stm32f40x -""".split() - -for item in arm: - project_dir = os.path.join(BSP_ROOT, item) - if os.path.isfile(os.path.join(project_dir, 'SConstruct')): +for bsp,cpu in bsp_to_cpu.iteritems(): + project_dir = os.path.join(BSP_ROOT, bsp) + if os.getenv('RTT_CPU') == cpu and os.path.isfile(os.path.join(project_dir, 'SConstruct')): if os.system('scons --directory=' + project_dir) != 0: - print 'build failed!!' - sys.exit(1) + results['fail'].append(bsp) + fail = True + else: + results['success'].append(bsp) + else: + results['ignore'].append(bsp) -sys.exit(0) +for result,bsp_list in results.iteritems(): + print "## {0}: {1}\n".format(result, len(bsp_list)) + for bsp in bsp_list: + print "* " + bsp + +if fail: + sys.exit(1) +else: + sys.exit(0) From 97a822f5552b04c80849dc2bfd24db902c8eae68 Mon Sep 17 00:00:00 2001 From: Rogerz Zhang Date: Sat, 2 Feb 2013 18:14:36 +0800 Subject: [PATCH 2/4] Use build matrix --- .travis.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index c25c0bf47f..5452d8a819 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,19 +2,19 @@ language: c install: - mkdir ~/toolchain - - "[ $RTT_CPU = 'arm' ] && curl -s https://sourcery.mentor.com/public/gnu_toolchain/arm-none-eabi/arm-2011.03-42-arm-none-eabi-i686-pc-linux-gnu.tar.bz2 | tar xjf - -C ~/toolchain" + - "[ $RTT_TOOL_CHAIN = 'sourcery-arm' ] && curl -s https://sourcery.mentor.com/public/gnu_toolchain/arm-none-eabi/arm-2011.03-42-arm-none-eabi-i686-pc-linux-gnu.tar.bz2 | tar xjf - -C ~/toolchain && export RTT_EXEC_PATH=~/toolchain/arm-2011.03/bin || true" before_script: - - export RTT_EXEC_PATH=~/toolchain/arm-2011.03/bin - export RTT_ROOT=`pwd` - export RTT_CC='gcc' - - cd tools + - cd bsp/$RTT_BSP script: - - python auto-ci.py + - scons notifications: email: false env: - - RTT_CPU='arm' + - RTT_BSP='at91sam9260' RTT_TOOL_CHAIN='sourcery-arm' + - RTT_BSP='efm32' RTT_TOOL_CHAIN='sourcery-arm' From ebd6bfeae9008d221aff4d88f7e5060dfeaaf089 Mon Sep 17 00:00:00 2001 From: Rogerz Zhang Date: Sat, 2 Feb 2013 19:12:23 +0800 Subject: [PATCH 3/4] add all arm bsp to build matrix --- .travis.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/.travis.yml b/.travis.yml index 5452d8a819..8b3cf8fa49 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,4 +17,40 @@ notifications: env: - RTT_BSP='at91sam9260' RTT_TOOL_CHAIN='sourcery-arm' +# - RTT_BSP='avr32uc3b0' +# - RTT_BSP='bf533' +# - RTT_BSP='dev3210' - RTT_BSP='efm32' RTT_TOOL_CHAIN='sourcery-arm' +# - RTT_BSP='jz47xx' + - RTT_BSP='lm3s8962' RTT_TOOL_CHAIN='sourcery-arm' + - RTT_BSP='lm3s9b9x' RTT_TOOL_CHAIN='sourcery-arm' + - RTT_BSP='lm4f232' RTT_TOOL_CHAIN='sourcery-arm' + - RTT_BSP='lpc1114' RTT_TOOL_CHAIN='sourcery-arm' + - RTT_BSP='lpc122x' RTT_TOOL_CHAIN='sourcery-arm' + - RTT_BSP='lpc176x' RTT_TOOL_CHAIN='sourcery-arm' + - RTT_BSP='lpc178x' RTT_TOOL_CHAIN='sourcery-arm' + - RTT_BSP='lpc2148' RTT_TOOL_CHAIN='sourcery-arm' + - RTT_BSP='lpc2478' RTT_TOOL_CHAIN='sourcery-arm' +# - RTT_BSP='ls1bdev' +# - RTT_BSP='m16c62p' + - RTT_BSP='mb9bf500r' RTT_TOOL_CHAIN='sourcery-arm' + - RTT_BSP='mb9bf506r' RTT_TOOL_CHAIN='sourcery-arm' +# - RTT_BSP='microblaze' + - RTT_BSP='mini2440' RTT_TOOL_CHAIN='sourcery-arm' +# - RTT_BSP='mini4020' +# - RTT_BSP='nios_ii' +# - RTT_BSP='nuc140' +# - RTT_BSP='pic32ethernet' + - RTT_BSP='sam7s' RTT_TOOL_CHAIN='sourcery-arm' + - RTT_BSP='sam7x' RTT_TOOL_CHAIN='sourcery-arm' +# - RTT_BSP='simulator' + - RTT_BSP='stm32f0x' RTT_TOOL_CHAIN='sourcery-arm' + - RTT_BSP='stm32f107' RTT_TOOL_CHAIN='sourcery-arm' + - RTT_BSP='stm32f10x' RTT_TOOL_CHAIN='sourcery-arm' + - RTT_BSP='stm32f20x' RTT_TOOL_CHAIN='sourcery-arm' + - RTT_BSP='stm32f40x' RTT_TOOL_CHAIN='sourcery-arm' +# - RTT_BSP='taihu' +# - RTT_BSP='upd70f3454' +# - RTT_BSP='wh44b0' +# - RTT_BSP='x86' +# - RTT_BSP='xplorer4330' From 78126e92261b9f44280164ad76a750a7ec1cba07 Mon Sep 17 00:00:00 2001 From: Rogerz Zhang Date: Sat, 2 Feb 2013 19:20:16 +0800 Subject: [PATCH 4/4] Remove unsupported BSP --- .travis.yml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8b3cf8fa49..caa95cecfc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,10 +7,9 @@ install: before_script: - export RTT_ROOT=`pwd` - export RTT_CC='gcc' - - cd bsp/$RTT_BSP script: - - scons + - scons -C bsp/$RTT_BSP notifications: email: false @@ -25,8 +24,8 @@ env: - RTT_BSP='lm3s8962' RTT_TOOL_CHAIN='sourcery-arm' - RTT_BSP='lm3s9b9x' RTT_TOOL_CHAIN='sourcery-arm' - RTT_BSP='lm4f232' RTT_TOOL_CHAIN='sourcery-arm' - - RTT_BSP='lpc1114' RTT_TOOL_CHAIN='sourcery-arm' - - RTT_BSP='lpc122x' RTT_TOOL_CHAIN='sourcery-arm' +# - RTT_BSP='lpc1114' # no scons +# - RTT_BSP='lpc122x' # no scons - RTT_BSP='lpc176x' RTT_TOOL_CHAIN='sourcery-arm' - RTT_BSP='lpc178x' RTT_TOOL_CHAIN='sourcery-arm' - RTT_BSP='lpc2148' RTT_TOOL_CHAIN='sourcery-arm' @@ -37,13 +36,13 @@ env: - RTT_BSP='mb9bf506r' RTT_TOOL_CHAIN='sourcery-arm' # - RTT_BSP='microblaze' - RTT_BSP='mini2440' RTT_TOOL_CHAIN='sourcery-arm' -# - RTT_BSP='mini4020' +# - RTT_BSP='mini4020' # no scons # - RTT_BSP='nios_ii' # - RTT_BSP='nuc140' # - RTT_BSP='pic32ethernet' - - RTT_BSP='sam7s' RTT_TOOL_CHAIN='sourcery-arm' - - RTT_BSP='sam7x' RTT_TOOL_CHAIN='sourcery-arm' -# - RTT_BSP='simulator' +# - RTT_BSP='sam7s' # no scons + - RTT_BSP='sam7x' RTT_TOOL_CHAIN='sourcery-arm' +# - RTT_BSP='simulator' # x86 - RTT_BSP='stm32f0x' RTT_TOOL_CHAIN='sourcery-arm' - RTT_BSP='stm32f107' RTT_TOOL_CHAIN='sourcery-arm' - RTT_BSP='stm32f10x' RTT_TOOL_CHAIN='sourcery-arm' @@ -52,5 +51,5 @@ env: # - RTT_BSP='taihu' # - RTT_BSP='upd70f3454' # - RTT_BSP='wh44b0' -# - RTT_BSP='x86' +# - RTT_BSP='x86' # x86 # - RTT_BSP='xplorer4330'