diff options
| author | Pietro Albini <pietro@pietroalbini.org> | 2019-10-04 18:31:31 +0200 |
|---|---|---|
| committer | Pietro Albini <pietro@pietroalbini.org> | 2019-10-25 16:03:04 +0200 |
| commit | c1fb42add5a7859b1b8e258d3c03fd5a29129c40 (patch) | |
| tree | 8b7c9e24559c0c51ae17363be3330c1e1f1d93e9 | |
| parent | 4f568f8a8134526aec633bc3a8435ae1340f2828 (diff) | |
| download | rust-c1fb42add5a7859b1b8e258d3c03fd5a29129c40.tar.gz rust-c1fb42add5a7859b1b8e258d3c03fd5a29129c40.zip | |
ci: extract dumping the environment into a script
| -rw-r--r-- | src/ci/azure-pipelines/steps/run.yml | 12 | ||||
| -rwxr-xr-x | src/ci/scripts/dump-environment.sh | 19 |
2 files changed, 21 insertions, 10 deletions
diff --git a/src/ci/azure-pipelines/steps/run.yml b/src/ci/azure-pipelines/steps/run.yml index be4e7e02ab0..86399e5828f 100644 --- a/src/ci/azure-pipelines/steps/run.yml +++ b/src/ci/azure-pipelines/steps/run.yml @@ -48,16 +48,8 @@ steps: - bash: python src/ci/cpu-usage-over-time.py &> cpu-usage.csv & displayName: "Collect CPU-usage statistics in the background" -- bash: printenv | sort - displayName: Show environment variables - -- bash: | - set -e - df -h - du . | sort -nr | head -n100 - displayName: Show disk usage - # FIXME: this hasn't been tested, but maybe it works on Windows? Should test! - condition: and(succeeded(), ne(variables['Agent.OS'], 'Windows_NT')) +- bash: src/ci/scripts/dump-environment.sh + displayName: Show the current environment - template: install-sccache.yml - template: install-clang.yml diff --git a/src/ci/scripts/dump-environment.sh b/src/ci/scripts/dump-environment.sh new file mode 100755 index 00000000000..c6774b52ab9 --- /dev/null +++ b/src/ci/scripts/dump-environment.sh @@ -0,0 +1,19 @@ +#!/bin/bash +# This script dumps information about the build environment to stdout. + +set -euo pipefail +IFS=$'\n\t' + +echo "environment variables:" +printenv | sort +echo + +echo "disk usage:" +df -h +echo + +echo "biggest files in the working dir:" +set +o pipefail +du . | sort -nr | head -n100 +set -o pipefail +echo |
