update travis build, make with 4 thread
This commit is contained in:
parent
a55875522c
commit
49ad6fe0ac
|
@ -4,10 +4,8 @@ import sys
|
||||||
import subprocess
|
import subprocess
|
||||||
import time
|
import time
|
||||||
|
|
||||||
PARALLEL = "-j 4"
|
|
||||||
travis = False
|
travis = False
|
||||||
if "TRAVIS" in os.environ and os.environ["TRAVIS"] == "true":
|
if "TRAVIS" in os.environ and os.environ["TRAVIS"] == "true":
|
||||||
PARALLEL="-j 2"
|
|
||||||
travis = True
|
travis = True
|
||||||
|
|
||||||
success_count = 0
|
success_count = 0
|
||||||
|
@ -19,7 +17,7 @@ all_boards = ["metro_m0_express", "metro_m4_express", "pca10056", "feather_nrf52
|
||||||
|
|
||||||
def build_example(example, board):
|
def build_example(example, board):
|
||||||
subprocess.run("make -C examples/device/{} BOARD={} clean".format(example, board), shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
subprocess.run("make -C examples/device/{} BOARD={} clean".format(example, board), shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||||
return subprocess.run("make {} -C examples/device/{} BOARD={} all".format(PARALLEL, example, board), shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
return subprocess.run("make -j 4 -C examples/device/{} BOARD={} all".format(example, board), shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||||
|
|
||||||
total_time = time.monotonic()
|
total_time = time.monotonic()
|
||||||
|
|
||||||
|
@ -52,6 +50,6 @@ for example in all_device_example:
|
||||||
|
|
||||||
|
|
||||||
total_time = time.monotonic() - total_time
|
total_time = time.monotonic() - total_time
|
||||||
|
|
||||||
print("Total build time took {:.2f}s".format(total_time))
|
print("Total build time took {:.2f}s".format(total_time))
|
||||||
|
|
||||||
sys.exit(exit_status)
|
sys.exit(exit_status)
|
||||||
|
|
Loading…
Reference in New Issue