summaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
authorRye <rye@alchemyviewer.org>2025-12-16 18:42:21 -0500
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2025-12-17 12:28:34 +0200
commit3ff35b8c2b530bc7d4e6fbdeb688506b27af2d66 (patch)
treeea65c127998fed5566f3d6f253897010488151ba /build.sh
parent7e40addc3afb9a667f350a487c31ee431ee5fb64 (diff)
Split Viewer and Test builds into separate jobs in GHA to reduce potential for disk space exhaustion
Signed-off-by: Rye <rye@alchemyviewer.org>
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh25
1 files changed, 19 insertions, 6 deletions
diff --git a/build.sh b/build.sh
index 31604663f1..72dc2b96e8 100755
--- a/build.sh
+++ b/build.sh
@@ -150,6 +150,7 @@ pre_build()
RELEASE_CRASH_REPORTING=OFF
HAVOK=OFF
+ TESTING=OFF
SIGNING=()
if [[ "$variant" != *OS ]]
then
@@ -171,6 +172,11 @@ pre_build()
RELEASE_CRASH_REPORTING=OFF
fi
+ if $build_tests
+ then
+ TESTING=ON
+ fi
+
if [ "${RELEASE_CRASH_REPORTING:-}" != "OFF" ]
then
case "$arch" in
@@ -195,7 +201,7 @@ pre_build()
"$autobuild" configure --quiet -c $variant \
${eval_autobuild_configure_parameters:---} \
- -DLL_TESTS:BOOL=ON \
+ -DLL_TESTS:BOOL="$TESTING" \
-DPACKAGE:BOOL=ON \
-DHAVOK:BOOL="$HAVOK" \
-DRELEASE_CRASH_REPORTING:BOOL="$RELEASE_CRASH_REPORTING" \
@@ -246,7 +252,18 @@ package_llphysicsextensions_tpv()
build()
{
local variant="$1"
- if $build_viewer
+ if $build_tests
+ then
+ begin_section "autobuild $variant tests"
+ # honor autobuild_build_parameters same as sling-buildscripts
+ export CTEST_OUTPUT_ON_FAILURE=1 # Output log on test failure
+ eval_autobuild_build_parameters=$(eval $(echo echo $autobuild_build_parameters))
+ "$autobuild" build --no-configure -c $variant \
+ $eval_autobuild_build_parameters -- --target BUILD_AND_RUN_TESTS \
+ || fatal "failed building $variant tests"
+ echo true >"$build_dir"/build_ok
+ end_section "autobuild $variant tests"
+ elif $build_viewer
then
begin_section "autobuild $variant"
# honor autobuild_build_parameters same as sling-buildscripts
@@ -254,10 +271,6 @@ build()
"$autobuild" build --no-configure -c $variant \
$eval_autobuild_build_parameters \
|| fatal "failed building $variant"
-
- ctest -C Release --test-dir "${build_dir}" --output-on-failure -j $(nproc --all) \
- || fatal "failed testing $variant"
-
echo true >"$build_dir"/build_ok
end_section "autobuild $variant"