mirror of https://github.com/ARMmbed/mbed-os.git
Added build script for travis (build_travis.py)
parent
e69956aba2
commit
bd89e121e5
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
Loading…
Reference in New Issue