summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorXenHat2023-04-03 01:18:09 -0400
committerXenHat2023-04-03 01:18:09 -0400
commite5985929da06308c57d5a7ae522196fcceccc613 (patch)
tree66a71ac19c6eea1ef3d4c6e20905c2f9876e0d5c
parent20f99a3e4665333b87ffd18c01638e9c0dd35a8f (diff)
downloadaur-e5985929da06308c57d5a7ae522196fcceccc613.tar.gz
enable tests
-rw-r--r--.SRCINFO2
-rwxr-xr-xPKGBUILD2
-rwxr-xr-xcompile.bash49
3 files changed, 26 insertions, 27 deletions
diff --git a/.SRCINFO b/.SRCINFO
index fa35d18a17bc..641f2bf17a55 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -47,6 +47,6 @@ pkgbase = alchemy-next-viewer-git
source = alchemy-next-viewer-git::git+https://git.alchemyviewer.org/alchemy/alchemy-next.git#branch=main
source = compile.bash
sha256sums = SKIP
- sha256sums = fabb4942155677ec3dab6fa2e655b9c626ef8c67c279f422b16827ce733bc4ea
+ sha256sums = e3dee22e9331a70f182b1cd1a2177228cf7ef73eea1e4aef09ad36733d309c6c
pkgname = alchemy-next-viewer-git
diff --git a/PKGBUILD b/PKGBUILD
index 8b681f95ee42..57e1153ee6e2 100755
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -31,7 +31,7 @@ install=alchemy.install
source=("${pkgname}"::'git+https://git.alchemyviewer.org/alchemy/alchemy-next.git#branch='"${AL_BRANCH_OVERRIDE:-main}"
'compile.bash')
sha256sums=('SKIP'
- 'fabb4942155677ec3dab6fa2e655b9c626ef8c67c279f422b16827ce733bc4ea')
+ 'e3dee22e9331a70f182b1cd1a2177228cf7ef73eea1e4aef09ad36733d309c6c')
pkgver() {
cd "${pkgname}" || exit 1
diff --git a/compile.bash b/compile.bash
index a2efaab80d5d..128109463224 100755
--- a/compile.bash
+++ b/compile.bash
@@ -16,7 +16,7 @@ prepare() {
if [[ -n "$USE_VENV" ]]; then
venv
fi
-
+
echo "Installing autobuild..."
pip3 install --upgrade certifi --quiet
pip3 install --upgrade llbase --quiet
@@ -44,40 +44,40 @@ build() {
gigperlinkprocess=4
mempercorekb=$((gigperlinkprocess * 1048576))
requiredmemorykb=$(($(nproc) * mempercorekb))
- free_output="$(free --kilo --total | tail -n+2| tr -s ' ')"
- physical_output=$(grep "Mem:" <<< "$free_output")
+ free_output="$(free --kilo --total | tail -n+2 | tr -s ' ')"
+ physical_output=$(grep "Mem:" <<<"$free_output")
#total_output=$(grep Total: <<< "$free_output")
- usedmemorykbphysical=$(cut -d ' ' -f 3 <<< "$physical_output")
- totalmemorykbphysical=$(cut -d ' ' -f 2 <<< "$physical_output")
- swap_output=$(grep Swap: <<< "$free_output")
+ usedmemorykbphysical=$(cut -d ' ' -f 3 <<<"$physical_output")
+ totalmemorykbphysical=$(cut -d ' ' -f 2 <<<"$physical_output")
+ swap_output=$(grep Swap: <<<"$free_output")
# Determine available swap space
availableswapkb=0
if [[ -n "$swap_output" ]]; then
- availableswapkb=$(cut -d ' ' -f 4 <<< "$swap_output")
+ availableswapkb=$(cut -d ' ' -f 4 <<<"$swap_output")
fi
- availablememorykbphysical=$(cut -d ' ' -f 7 <<< "$free_output")
+ availablememorykbphysical=$(cut -d ' ' -f 7 <<<"$free_output")
echo "Total memory: $totalmemorykbphysical (includes swap)"
echo "Available memory: $availablememorykbphysical"
echo "Required memory: $requiredmemorykb"
- echo "Available physical memory on this system: $((availablememorykbphysical/1024/1024)) GB"
- echo "Estimated required memory to build with all cores: $((requiredmemorykb/1024/1024)) GB"
+ echo "Available physical memory on this system: $((availablememorykbphysical / 1024 / 1024)) GB"
+ echo "Estimated required memory to build with all cores: $((requiredmemorykb / 1024 / 1024)) GB"
if [[ ${requiredmemorykb} -gt ${availablememorykbphysical} ]]; then
echo "Warning: Not enough available physical memory to build with all cores"
if [[ ${usedmemorykbphysical} -lt ${availableswapkb} ]]; then
# use all physical ram as swap will do its job
echo "There is enough free swap to store the currently used memory"
- jobs=$(((totalmemorykbphysical/1024/1024)/gigperlinkprocess))
+ jobs=$(((totalmemorykbphysical / 1024 / 1024) / gigperlinkprocess))
else
# Not enough swap to hold ram contents, calculate manually
- echo "Allocating build jobs according to available physical memory ("$((availablememorykbphysical/1024/1024))"/"$((requiredmemorykb/1024/1024))"GB)..."
+ echo "Allocating build jobs according to available physical memory ("$((availablememorykbphysical / 1024 / 1024))"/"$((requiredmemorykb / 1024 / 1024))"GB)..."
# FIXME: Goes one iteration beyond what it should
while [[ $((jobs * mempercorekb)) -lt ${availablememorykbphysical} ]]; do
- jobs=$((jobs+1))
- echo -e "${jobs} jobs would consume $(((jobs * mempercorekb)/1024/1024))GB"
+ jobs=$((jobs + 1))
+ echo -e "${jobs} jobs would consume $(((jobs * mempercorekb) / 1024 / 1024))GB"
done
# Back off one job count. Not sure why I have to do this but
# the loop is doing one extra iteration.
- jobs=$((jobs-1))
+ jobs=$((jobs - 1))
fi
build_jobs=${jobs}
echo "Computed job count: ${build_jobs}"
@@ -87,7 +87,7 @@ build() {
export AUTOBUILD_CPU_COUNT=$build_jobs
AL_ARCH_FLAGS=${AL_ARCH_FLAGS:-'-march=native -mtune=native -w'}
AL_CMAKE_CONFIG=(
- -DLL_TESTS:BOOL=OFF
+ -DLL_TESTS:BOOL=ON
-DDISABLE_FATAL_WARNINGS=ON
-DUSE_LTO:BOOL=OFF
-DVIEWER_CHANNEL="Alchemy Test"
@@ -95,26 +95,25 @@ build() {
-DCMAKE_CXX_FLAGS="$AL_ARCH_FLAGS"
-DCMAKE_C_COMPILER="${CC:-gcc}"
-DCMAKE_CXX_COMPILER="${CXX:-g++}"
- )
+ )
# I could not find the documentation on how to handle BUILDENV/OPTION in
# makepkg.conf. If you are reading this and know where it is,
# please send it my way.
# if [[ -n "$AL_NO_CCACHE" ]] || ! command -v ccache 2 > /dev/null 2>&1; then
- # echo "ccache disabled"
- # AL_CMAKE_CONFIG+=(-UCMAKE_CXX_COMPILER_LAUNCHER)
+ # echo "ccache disabled"
+ # AL_CMAKE_CONFIG+=(-UCMAKE_CXX_COMPILER_LAUNCHER)
# else
- # echo "ccache available and enabled"
- # export CCACHE_SLOPPINESS="file_macro,locale,time_macros"
- # export CCACHE_NOHASHDIR="true"
- # AL_CMAKE_CONFIG+=(-DCMAKE_CXX_COMPILER_LAUNCHER=ccache)
+ # echo "ccache available and enabled"
+ # export CCACHE_SLOPPINESS="file_macro,locale,time_macros"
+ # export CCACHE_NOHASHDIR="true"
+ # AL_CMAKE_CONFIG+=(-DCMAKE_CXX_COMPILER_LAUNCHER=ccache)
# fi
$prefix_cmd autobuild configure -A 64 -c ReleaseOS -- "${AL_CMAKE_CONFIG[@]}"
echo "Building with ${AUTOBUILD_CPU_COUNT} jobs (adjusted)"
$prefix_cmd autobuild build -A64 -c ReleaseOS --no-configure
}
-cleanbuild()
-{
+cleanbuild() {
rm -rf build-linux-64
git pull --prune
build