diff options
author | Xenhat Hex | 2022-07-23 17:00:31 -0400 |
---|---|---|
committer | Xenhat Hex | 2022-07-23 17:00:31 -0400 |
commit | 3edd42e2b3a05a799e06976073b64281fbec599d (patch) | |
tree | dea738f34ae464454e06ae1b453d48b8f0683a32 | |
parent | f512421ed0a29838cc0e1ac0f1ddeebfc11cffd3 (diff) | |
download | aur-3edd42e2b3a05a799e06976073b64281fbec599d.tar.gz |
hopefully make the build script less error-prone
-rwxr-xr-x | build_linux64.bash | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/build_linux64.bash b/build_linux64.bash index c79232616e00..15bb83c2e1d3 100755 --- a/build_linux64.bash +++ b/build_linux64.bash @@ -1,29 +1,28 @@ virtualenv ".venv" -p python3 source ".venv/bin/activate" pip install --upgrade certifi - if command -v autobuild; then - abver="$(autobuild --version)" - echo "Found ${abver}" - if [ "${abver}" = "autobuild 2.1.0" ]; then - echo "Reinstalling autobuild to work around some bugs" - pip3 uninstall --yes autobuild - pip3 install autobuild -i https://git.alchemyviewer.org/api/v4/projects/54/packages/pypi/simple --extra-index-url https://pypi.org/simple - fi + if command -v autobuild && \ + [ $(autobuild --version | cut -d ' ' -f 2 | tr -d '.') -gt 210 ] + then + echo "Found Autobuild" else - pip3 install autobuild -i https://git.alchemyviewer.org/api/v4/projects/54/packages/pypi/simple --extra-index-url https://pypi.org/simple + pip3 install autobuild -i https://git.alchemyviewer.org/api/v4/projects/54/packages/pypi/simple --extra-index-url https://pypi.org/simple fi # we have a lot of files, relax ulimit to help performance ulimit -n 20000 # shellcheck disable=SC2153 - autobuild configure -A 64 -c ReleaseOS -- -DLL_TESTS:BOOL=OFF -DDISABLE_FATAL_WARNINGS=ON -DUSE_LTO:BOOL="$(grep -cq '[^!]lto' <<< "${1}" && echo 'ON' || echo 'OFF')" -DVIEWER_CHANNEL="Alchemy Test" + # LTO is currently very broken for alchemy + #autobuild configure -A 64 -c ReleaseOS -- -DLL_TESTS:BOOL=OFF -DDISABLE_FATAL_WARNINGS=ON -DUSE_LTO:BOOL="$(grep -cq '[^!]lto' <<< "${1}" && echo 'ON' || echo 'OFF')" -DVIEWER_CHANNEL="Alchemy Test" + autobuild configure -A 64 -c ReleaseOS -- -DLL_TESTS:BOOL=OFF -DDISABLE_FATAL_WARNINGS=ON -DUSE_LTO:BOOL=OFF -DVIEWER_CHANNEL="Alchemy Test" cd "build-linux-64" || exit 1 jobcount=$(nproc) if [[ ${jobcount} -gt 1 ]]; then + #if false; then # The viewer requires an average of 4GB of memory per CPU core to sucessfully link mempercorekb=$((4 * 1048576)) requiredmemorykb=$(($(nproc) * mempercorekb)) availablememorykb=$(grep MemTotal /proc/meminfo | tr -s ' ' | cut -d ' ' -f 2) - freememkb="$(grep MemFree /proc/meminfo | tr -s ' ' | cut -d ' ' -f 2)" + #freememkb="$(grep MemFree /proc/meminfo | tr -s ' ' | cut -d ' ' -f 2)" if [[ ${requiredmemorykb} -gt ${availablememorykb} ]]; then jobs=0 until [[ $(((jobs + 1) * mempercorekb)) -gt ${availablememorykb} ]]; do @@ -31,6 +30,7 @@ done #((jobs--)) jobcount=${jobs} + #fi elif [[ ${jobcount} -le 8 ]]; then jobcount=$((jobcount - 1)) else @@ -38,4 +38,4 @@ fi fi echo "Building with ${jobcount} jobs (adjusted)" - time ninja -l"$(nproc)" -j${jobcount} +time ninja -j${jobcount} |