Add option to disable cache
This commit is contained in:
parent
1421dc1184
commit
1fa24a55ec
1 changed files with 6 additions and 0 deletions
|
@ -19,11 +19,13 @@ import yaml
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
script_branch = os.getenv("scripts_branch", "master")
|
script_branch = os.getenv("scripts_branch", "master")
|
||||||
queue_prefix = os.getenv("ph_queue_prefix", "")
|
queue_prefix = os.getenv("ph_queue_prefix", "")
|
||||||
|
no_cache = os.getenv('ph_no_cache', '') != ''
|
||||||
steps = []
|
steps = []
|
||||||
linux_buld_step = {
|
linux_buld_step = {
|
||||||
'label': ':linux: build and test linux',
|
'label': ':linux: build and test linux',
|
||||||
'key': 'linux',
|
'key': 'linux',
|
||||||
'commands': [
|
'commands': [
|
||||||
|
'ccache --clear' if no_cache else '',
|
||||||
'mkdir -p artifacts',
|
'mkdir -p artifacts',
|
||||||
'dpkg -l >> artifacts/packages.txt',
|
'dpkg -l >> artifacts/packages.txt',
|
||||||
'export SRC=${BUILDKITE_BUILD_PATH}/llvm-premerge-checks',
|
'export SRC=${BUILDKITE_BUILD_PATH}/llvm-premerge-checks',
|
||||||
|
@ -36,10 +38,14 @@ if __name__ == '__main__':
|
||||||
'agents': {'queue': f'{queue_prefix}linux'},
|
'agents': {'queue': f'{queue_prefix}linux'},
|
||||||
'timeout_in_minutes': 120,
|
'timeout_in_minutes': 120,
|
||||||
}
|
}
|
||||||
|
clear_sccache = 'powershell -command "sccache --stop-server; ' \
|
||||||
|
'Remove-Item -Recurse -Force -ErrorAction Ignore $env:SCCACHE_DIR; ' \
|
||||||
|
'sccache --start-server"'
|
||||||
windows_buld_step = {
|
windows_buld_step = {
|
||||||
'label': ':windows: build and test windows',
|
'label': ':windows: build and test windows',
|
||||||
'key': 'windows',
|
'key': 'windows',
|
||||||
'commands': [
|
'commands': [
|
||||||
|
clear_sccache if no_cache else '',
|
||||||
'sccache --zero-stats',
|
'sccache --zero-stats',
|
||||||
'set SRC=%BUILDKITE_BUILD_PATH%/llvm-premerge-checks',
|
'set SRC=%BUILDKITE_BUILD_PATH%/llvm-premerge-checks',
|
||||||
'rm -rf %SRC%',
|
'rm -rf %SRC%',
|
||||||
|
|
Loading…
Reference in a new issue