1
0
Fork 0

Specify timeout for every step

This commit is contained in:
Mikhail Goncharov 2020-06-29 12:17:03 +02:00
parent af7204418f
commit ffa1882445
3 changed files with 23 additions and 17 deletions

View file

@ -38,7 +38,8 @@ if __name__ == '__main__':
'${SRC}/scripts/premerge_checks.py --check-clang-format --check-clang-tidy', '${SRC}/scripts/premerge_checks.py --check-clang-format --check-clang-tidy',
], ],
'artifact_paths': ['artifacts/**/*', '*_result.json'], 'artifact_paths': ['artifacts/**/*', '*_result.json'],
'agents': {'queue': f'{queue_prefix}linux'} 'agents': {'queue': f'{queue_prefix}linux'},
'timeout_in_minutes': 120,
} }
windows_buld_step = { windows_buld_step = {
'label': ':windows: build and test windows', 'label': ':windows: build and test windows',
@ -60,7 +61,8 @@ if __name__ == '__main__':
'}', '}',
], ],
'artifact_paths': ['artifacts/**/*', '*_result.json'], 'artifact_paths': ['artifacts/**/*', '*_result.json'],
'agents': {'queue': f'{queue_prefix}windows'} 'agents': {'queue': f'{queue_prefix}windows'},
'timeout_in_minutes': 120,
} }
steps.append(linux_buld_step) steps.append(linux_buld_step)
steps.append(windows_buld_step) steps.append(windows_buld_step)
@ -77,7 +79,8 @@ if __name__ == '__main__':
], ],
'allow_dependency_failure': True, 'allow_dependency_failure': True,
'artifact_paths': ['artifacts/**/*'], 'artifact_paths': ['artifacts/**/*'],
'agents': {'queue': f'{queue_prefix}linux'} 'agents': {'queue': f'{queue_prefix}linux'},
'timeout_in_minutes': 10,
} }
steps.append(report_step) steps.append(report_step)
print(yaml.dump({'steps': steps})) print(yaml.dump({'steps': steps}))

View file

@ -33,7 +33,8 @@ if __name__ == '__main__':
'--projects="clang;clang-tools-extra;libc;libcxx;libcxxabi;lld;libunwind;mlir;flang"', '--projects="clang;clang-tools-extra;libc;libcxx;libcxxabi;lld;libunwind;mlir;flang"',
], ],
'artifact_paths': ['artifacts/**/*', '*_result.json'], 'artifact_paths': ['artifacts/**/*', '*_result.json'],
'agents': {'queue': f'{queue_prefix}linux'} 'agents': {'queue': f'{queue_prefix}linux'},
'timeout_in_minutes': 120,
} }
windows_buld_step = { windows_buld_step = {
'label': ':windows: build and test windows', 'label': ':windows: build and test windows',
@ -55,7 +56,8 @@ if __name__ == '__main__':
'}', '}',
], ],
'artifact_paths': ['artifacts/**/*', '*_result.json'], 'artifact_paths': ['artifacts/**/*', '*_result.json'],
'agents': {'queue': f'{queue_prefix}windows'} 'agents': {'queue': f'{queue_prefix}windows'},
'timeout_in_minutes': 120,
} }
steps.append(linux_buld_step) steps.append(linux_buld_step)
steps.append(windows_buld_step) steps.append(windows_buld_step)

View file

@ -21,20 +21,21 @@ if __name__ == '__main__':
diff_id = os.getenv("ph_buildable_diff") diff_id = os.getenv("ph_buildable_diff")
steps = [] steps = []
create_branch_step = { create_branch_step = {
'label': 'create branch', 'label': 'create branch',
'key': 'create-branch', 'key': 'create-branch',
'commands': ['scripts/buildkite/apply_patch.sh'], 'commands': ['scripts/buildkite/apply_patch.sh'],
'agents': {'queue': f'{queue_prefix}linux'} 'agents': {'queue': f'{queue_prefix}linux'},
'timeout_in_minutes': 20,
} }
build_linux_step = { build_linux_step = {
'trigger': 'premerge-checks', 'trigger': 'premerge-checks',
'label': ':rocket: build and test', 'label': ':rocket: build and test',
'async': False, 'async': False,
'depends_on': 'create-branch', 'depends_on': 'create-branch',
'build': { 'build': {
'branch': f'phab-diff-{diff_id}', 'branch': f'phab-diff-{diff_id}',
'env': {'scripts_branch': '${BUILDKITE_BRANCH}'}, 'env': {'scripts_branch': '${BUILDKITE_BRANCH}'},
}, },
} }
for e in os.environ: for e in os.environ:
if e.startswith('ph_'): if e.startswith('ph_'):