Added build script for travis (build_travis.py)

pull/106/head
Bogdan Marinescu 2013-11-08 17:52:10 +02:00
parent e69956aba2
commit bd89e121e5
2 changed files with 36 additions and 1 deletions

View File

@ -2,4 +2,4 @@
install: "sudo $TRAVIS_BUILD_DIR/travis/install_dependencies.sh > /dev/null"
python:
- "2.7"
script: "python workspace_tools/build.py -r -e -U -u -d -b -t GCC_ARM"
script: "python workspace_tools/build_travis.py"

View File

@ -0,0 +1,35 @@
# Travis-CI build script
import os
import sys
################################################################################
# Configure builds here
# "libs" can contain "dsp", "rtos", "eth", "usb_host", "usb", "ublox"
build_list = (
{ "target": "LPC1768", "toolchains": "GCC_ARM", "libs": ["dsp", "rtos", "eth", "usb_host", "usb", "ublox"] },
{ "target": "KL25Z", "toolchains": "GCC_ARM", "libs": ["dsp", "rtos", "usb"] },
{ "target": "LPC4088", "toolchains": "GCC_ARM", "libs": ["dsp", "rtos", "usb"] },
)
################################################################################
# Driver
def run_builds(dry_run):
for build in build_list:
toolchain_list = build["toolchains"]
if type(toolchain_list) != type([]): toolchain_list = [toolchain_list]
for toolchain in toolchain_list:
cmdline = "python workspace_tools/build.py -m %s -t %s -c " % (build["target"], toolchain)
libs = build.get("libs", [])
if libs:
cmdline = cmdline + " ".join(["--" + l for l in libs])
if dry_run:
print(cmdline)
else:
if os.system(cmdline) != 0:
sys.exit(1)
if __name__ == "__main__":
run_builds("-s" in sys.argv)