1
0
Fork 0

Show stats on linux / windows

This commit is contained in:
Mikhail Goncharov 2020-07-08 12:20:31 +02:00
parent f125728908
commit 3f52fb7969
3 changed files with 10 additions and 5 deletions

View file

@ -20,6 +20,7 @@ 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", "")
diff_id = os.getenv("ph_buildable_diff", "") diff_id = os.getenv("ph_buildable_diff", "")
steps = [] steps = []
linux_buld_step = { linux_buld_step = {
'label': ':linux: build and test linux', 'label': ':linux: build and test linux',

View file

@ -27,13 +27,17 @@ if __name__ == '__main__':
'key': 'linux', 'key': 'linux',
'commands': [ 'commands': [
'ccache --clear' if no_cache else '', 'ccache --clear' if no_cache else '',
'ccache --zero-stats',
'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',
'rm -rf ${SRC}', 'rm -rf ${SRC}',
'git clone --depth 1 --branch ${scripts_branch} https://github.com/google/llvm-premerge-checks.git ${SRC}', 'git clone --depth 1 --branch ${scripts_branch} https://github.com/google/llvm-premerge-checks.git ${SRC}',
'${SRC}/scripts/premerge_checks.py ' f'${{SRC}}/scripts/premerge_checks.py --projects="{projects}"',
f'--projects="{projects}"', 'EXIT_STATUS=\\$?',
'echo "--- ccache stats"',
'ccache --show-stats',
'exit \\$EXIT_STATUS',
], ],
'artifact_paths': ['artifacts/**/*', '*_result.json'], 'artifact_paths': ['artifacts/**/*', '*_result.json'],
'agents': {'queue': f'{queue_prefix}linux'}, 'agents': {'queue': f'{queue_prefix}linux'},
@ -51,9 +55,9 @@ if __name__ == '__main__':
'set SRC=%BUILDKITE_BUILD_PATH%/llvm-premerge-checks', 'set SRC=%BUILDKITE_BUILD_PATH%/llvm-premerge-checks',
'rm -rf %SRC%', 'rm -rf %SRC%',
'git clone --depth 1 --branch %scripts_branch% https://github.com/google/llvm-premerge-checks.git %SRC%', 'git clone --depth 1 --branch %scripts_branch% https://github.com/google/llvm-premerge-checks.git %SRC%',
'powershell -command "%SRC%/scripts/premerge_checks.py ' f'powershell -command "%SRC%/scripts/premerge_checks.py --projects=\'{projects}\'; '
f'--projects=\'{projects}\'; '
'\\$exit=\\$?;' '\\$exit=\\$?;'
'echo \'--- sccache stats\';'
'sccache --show-stats;' 'sccache --show-stats;'
'if (\\$exit) {' 'if (\\$exit) {'
' echo success;' ' echo success;'

View file

@ -27,7 +27,7 @@ $IMAGE="gcr.io/llvm-premerge-checks/${NAME}:${version}"
Write-Output "Authenticating docker..." Write-Output "Authenticating docker..."
Write-Output "y`n" | gcloud auth configure-docker Write-Output "y`n" | gcloud auth configure-docker
Write-Output "Pulling new image..." Write-Output "Pulling new image '${IMAGE}'..."
docker pull ${IMAGE} docker pull ${IMAGE}
Write-Output "Stopping old container..." Write-Output "Stopping old container..."
docker stop ${NAME} docker stop ${NAME}