mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-01-12 21:34:33 +00:00
CI: display number of cores, physical memory, and partition size (#2353)
This commit is contained in:
parent
7fd777cfa9
commit
3b5a56fd32
12
.github/workflows/ci.yml
vendored
12
.github/workflows/ci.yml
vendored
@ -91,12 +91,24 @@ jobs:
|
|||||||
case '${{ runner.os }}' in
|
case '${{ runner.os }}' in
|
||||||
'Linux')
|
'Linux')
|
||||||
ncpu=$(nproc)
|
ncpu=$(nproc)
|
||||||
|
echo "Number of cores: ${ncpu}"
|
||||||
|
echo "$(grep MemTotal /proc/meminfo)"
|
||||||
|
echo -e "Partition sizes:\n$(df -k -h .)"
|
||||||
;;
|
;;
|
||||||
'macOS')
|
'macOS')
|
||||||
ncpu=$(sysctl -n hw.ncpu)
|
ncpu=$(sysctl -n hw.ncpu)
|
||||||
|
hwmemsize=$(sysctl -n hw.memsize)
|
||||||
|
ramsize=$(expr $hwmemsize / $((1024**3)))
|
||||||
|
echo "Number of cores: ${ncpu}"
|
||||||
|
echo "Physical memory: ${ramsize} GB"
|
||||||
|
echo -e "Partition sizes:\n$(df -k -h .)"
|
||||||
;;
|
;;
|
||||||
'Windows')
|
'Windows')
|
||||||
ncpu=${NUMBER_OF_PROCESSORS}
|
ncpu=${NUMBER_OF_PROCESSORS}
|
||||||
|
CD=${PWD:1:1}
|
||||||
|
echo "Number of cores: ${NUMBER_OF_PROCESSORS}"
|
||||||
|
echo "Physical memory: $(wmic ComputerSystem get TotalPhysicalMemory)"
|
||||||
|
echo -e "Partition sizes:\n$(wmic logicaldisk get name,size,freespace | grep -e "${CD^}" -e "FreeSpace")"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
[[ -z "$ncpu" || $ncpu -le 0 ]] && ncpu=1
|
[[ -z "$ncpu" || $ncpu -le 0 ]] && ncpu=1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user