Split TravisCI build into one job per variant
This change allows TravisCI integration for forks on free accounts. Those would otherwise fail, due to a hard-coded and non-configurable 50 minute job limt imposed by TravisCI. This will also help avoid the 120 minute job limit that applies to non-free accounts, which the current builds are quickly approaching....
This commit is contained in:
1 parent
dc8b43f2b7
commit
0417d8e3e1
2 files changed
+25
-4
No files matched your search
+17
-2
@@ -65,8 +65,23 @@ def build_examples(variant):
|
||||
|
||||
build_time = time.monotonic()
|
||||
|
||||
for var in variants_dict:
|
||||
build_examples(var)
|
||||
ENV_VARIABLE_NAME = 'VARIANT'
|
||||
|
||||
# build only one variant if the environment variable is specified
|
||||
if (ENV_VARIABLE_NAME in os.environ):
|
||||
variant = os.environ.get(ENV_VARIABLE_NAME)
|
||||
# only use the environment variable if the variant exists in the dictionary
|
||||
if (variant in variants_dict):
|
||||
build_examples(variant)
|
||||
else:
|
||||
print('\033[31failed\033[0m - invalid variant name "{}"'.format(variant))
|
||||
fail_count += 1
|
||||
exit_status = -1
|
||||
|
||||
else: # no environment variable specified, so build all variants
|
||||
for var in variants_dict:
|
||||
build_examples(var)
|
||||
|
||||
|
||||
print(build_separator)
|
||||
build_time = time.monotonic() - build_time
|
||||
|
||||
Reference in new issue
Block a user