WizardKit/setup/macos/install-deps
2Shirt 8e0fdf641b
Retest temps with sysbench if Prime95 runs too hot
If the CPU reaches the failing temps during Prime95 then sysbench will be
run to emulate a less artificial workload.  The both the overall and sysbench
max temps are recorded and shown in the results.

Added new option to track an alternate max temp value in wk.hw.sensors.
This was needed so show two different max temps recorded during CPU testing.

Sysbench was added to the Linux package list and is compiled for macOS.
Without manually compiling the package it brings in way too many dependencies
to support SQL DB testing (which we don't need).
2021-06-17 03:16:34 -06:00

113 lines
2.9 KiB
Bash
Executable file

#!/usr/bin/env bash
#
set -o errexit
set -o errtrace
set -o nounset
set -o pipefail
# Prep
OS_VERSION="$(defaults read /System/Library/CoreServices/SystemVersion ProductVersion)"
cd "$(mktemp -d)"
# Inconsolata
echo "Installing Inconsolata..."
curl -Lo inconsolata.zip https://fonts.google.com/download?family=Inconsolata
unzip -d /Library/Fonts -j inconsolata.zip static/Inconsolata-Bold.ttf static/Inconsolata-Regular.ttf
# XQuartz
echo "Installing XQuartz..."
curl -Lo XQuartz.dmg https://github.com/XQuartz/XQuartz/releases/download/XQuartz-2.8.0/XQuartz-2.8.0.dmg
XQUARTZ_DEV="$(hdiutil attach -mountpoint /Volumes/XQuartz XQuartz.dmg -nobrowse | grep -Eo '(/dev/disk[0-9]+)\b')"
sudo installer -pkg /Volumes/XQuartz/Xquartz.pkg -target /
hdiutil detach "${XQUARTZ_DEV}"
# Gnuplot
echo "Installing Gnuplot..."
curl -Lo gnuplot.pkg https://ariadne.ms.northwestern.edu/Download/Gnuplot/gnuplot-5.4.1.pkg
sudo installer -pkg gnuplot.pkg -target /
# mprime
echo "Installing mprime..."
if [[ "${OS_VERSION:3:2}" -ge "15" ]]; then
curl -Lo prime95.tar.gz http://www.mersenne.org/ftp_root/gimps/p95v298b7.MacOSX.noGUI.tar.gz
else
curl -Lo prime95.tar.gz http://www.mersenne.org/ftp_root/gimps/p95v287.MacOSX.noGUI.tar.gz
fi
sudo tar -x -C /usr/local/bin -f prime95.tar.gz mprime
# smc
echo "Installing smc..."
curl -Lo smcfancontrol.zip https://www.eidac.de/smcfancontrol/smcfancontrol_2_6.zip
sudo unzip -d /usr/local/bin -j smcfancontrol.zip smcFanControl.app/Contents/Resources/smc
# Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
if [[ "${OS_VERSION:0:5}" == "10.11" ]]; then
# TODO: Maybe?
true
elif [[ "${OS_VERSION:0:5}" == "10.13" ]]; then
brew install --build-from-source \
automake \
lua \
openssl@1.1 \
gdbm \
mpdecimal \
utf8proc \
berkeley-db \
readline \
perl \
sqlite \
tcl-tk \
ruby
brew install --build-from-source \
bash \
e2fsprogs \
htop \
pipes-sh \
python \
smartmontools \
util-linux \
vim \
watch
brew install \
cmatrix \
colordiff \
ddrescue \
dropbear \
speedtest-cli \
tmux
elif [[ "${OS_VERSION:0:5}" == "10.15" ]]; then
brew install \
cmatrix \
colordiff \
ddrescue \
dropbear \
speedtest-cli \
tmux \
bash \
e2fsprogs \
htop \
pipes-sh \
python \
smartmontools \
util-linux \
vim \
watch
fi
# Python3 Packages
pip3 install docopt mysql-connector NumPy psutil pylint pytz requests
git clone https://github.com/yuyichao/gnuplot-py gnuplot-py
cd gnuplot-py
git checkout 2c2218dc67
python3 setup.py install
# Sysbench
git clone https://github.com/akopytov/sysbench sysbench
cd sysbench
./autogen.sh LDFLAGS=-L/usr/local/opt/openssl/lib --without-mysql
./configure LDFLAGS=-L/usr/local/opt/openssl/lib --without-mysql
make MACOSX_DEPLOYMENT_TARGET="${OS_VERSION:0:5}" -j
sudo mv -nv sysbench/src/sysbench /usr/local/bin/