chore: Update alpha-build.sh script to handle xvfb-run not found and enable LTO only when not cross-compiling

This commit is contained in:
Mauro Balades
2024-07-20 02:00:37 +02:00
parent b04d6fc4f0
commit 093a9625a7

View File

@@ -1,20 +1,21 @@
set -x
export ZEN_RELEASE=1
if command -v apt-get &> /dev/null
if command -v apt &> /dev/null
then
sudo apt-get update
sudo apt-get install -y xvfb
sudo apt update
sudo apt install -y xvfb
fi
# Check if xfvb is installed
if ! command -v Xvfb &> /dev/null
then
echo "Xvfb could not be found, running without it"
pnpm build
else
Xvfb :2 -screen 0 1024x768x24 &
export LLVM_PROFDATA=$HOME/.mozbuild/clang/bin/llvm-profdata
export DISPLAY=:2
pnpm build
else
echo "Xvfb could not be found, running without it"
pnpm build
fi
pnpm build