cargo/ci/dump-environment.sh
2022-12-15 19:35:24 -08:00

22 lines
391 B
Bash
Executable file

#!/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 "CPU info:"
if [[ "${OSTYPE}" = "darwin"* ]]; then
system_profiler SPHardwareDataType || true
sysctl hw || true
else
cat /proc/cpuinfo || true
cat /proc/meminfo || true
fi