summary refs log tree commit diff
path: root/src/ci/scripts/dump-environment.sh
blob: 812690181e9bd5ecbd4770e946077d1859f46706 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash
# This script dumps information about the build environment to stdout.

source "$(cd "$(dirname "$0")" && pwd)/../shared.sh"

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

if isMacOS
then
    # Debugging information that might be helpful for diagnosing macOS
    # performance issues.
    # SIP
    csrutil status
    # Gatekeeper
    spctl --status
    # Authorization policy
    DevToolsSecurity -status
    # Spotlight status
    mdutil -avs
fi