From 1b6a29af871927b72388b98fb2c45a5d7b34132d Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Mon, 19 Sep 2011 15:09:44 -0400 Subject: attempt to build on teamcity --- build.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'build.sh') diff --git a/build.sh b/build.sh index c7c89fe3c2..c949d00166 100755 --- a/build.sh +++ b/build.sh @@ -90,9 +90,12 @@ build() build_docs() { begin_section Docs - # Stub code to generate docs - echo Hello world > documentation.txt - upload_item docs documentation.txt text/plain + if "$AUTOBUILD" build -c Doxygen + then + echo true >"$build_dir"/build_ok + else + echo false >"$build_dir"/build_ok + fi end_section Docs } -- cgit v1.2.3 From 3c0ecd357f4b4f01e709a6f7b774b85f0ff24540 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Thu, 21 May 2015 13:14:27 -0400 Subject: Remove support for parallel variant builds (never worked otherh than on linux, and maybe not there) --- build.sh | 46 +++++++--------------------------------------- 1 file changed, 7 insertions(+), 39 deletions(-) (limited to 'build.sh') diff --git a/build.sh b/build.sh index b66d1a0705..f3267e93b7 100755 --- a/build.sh +++ b/build.sh @@ -134,7 +134,7 @@ package_llphysicsextensions_tpv() echo "${autobuild_package_filename}" > $build_dir/llphysicsextensions_package fi else - echo "Do not provide llphysicsextensions_tpv for $variant" + record_event "Do not provide llphysicsextensions_tpv for $variant" llphysicsextensions_package="" fi end_section "PhysicsExtensions_TPV" @@ -155,7 +155,9 @@ build() # Run build extensions if [ $build_ok -eq 0 -a -d ${build_dir}/packages/build-extensions ]; then for extension in ${build_dir}/packages/build-extensions/*.sh; do + begin_section "Extension $extension" . $extension + end_section "Extension $extension" if [ $build_ok -ne 0 ]; then break fi @@ -259,57 +261,21 @@ do if pre_build "$variant" "$build_dir" >> "$build_log" 2>&1 then - if $build_link_parallel - then - begin_section BuildParallel - ( build "$variant" "$build_dir" > "$build_dir/build.log" 2>&1 ) & - build_processes="$build_processes $!" - end_section BuildParallel - else begin_section "Build$variant" build "$variant" "$build_dir" 2>&1 | tee -a "$build_log" | sed -n 's/^ *\(##teamcity.*\)/\1/p' if `cat "$build_dir/build_ok"` then - echo so far so good. + echo "so far so good" >> "$build_log" else record_failure "Build of \"$variant\" failed." fi end_section "Build$variant" - fi - else - record_failure "Build Prep for \"$variant\" failed." fi end_section "Do$variant" done build_docs -# If we are building variants in parallel, wait, then collect results. -# This requires that the build dirs are variant specific -if $build_link_parallel && [ x"$build_processes" != x ] -then - begin_section WaitParallel - wait $build_processes - for variant in $variants - do - eval '$build_'"$variant" || continue - eval '$build_'"$arch"_"$variant" || continue - - begin_section "Build$variant" - build_dir=`build_dir_$arch $variant` - build_dir_stubs="$build_dir/win_setup/$variant" - tee -a $build_log < "$build_dir/build.log" | sed -n 's/^ *\(##teamcity.*\)/\1/p' - if `cat "$build_dir/build_ok"` - then - echo so far so good. - else - record_failure "Parallel build of \"$variant\" failed." - fi - end_section "Build$variant" - done - end_section WaitParallel -fi - # build debian package if [ "$arch" == "Linux" ] then @@ -376,7 +342,7 @@ then end_section "Upload Debian Repository" else - echo skipping debian build + echo debian build not enabled fi else echo skipping debian build due to failed build. @@ -446,7 +412,9 @@ then # Run upload extensions if [ -d ${build_dir}/packages/upload-extensions ]; then for extension in ${build_dir}/packages/upload-extensions/*.sh; do + begin_section "Upload Extenstion $extension" . $extension + end_section "Upload Extenstion $extension" done fi -- cgit v1.2.3 From 1c526c8df88bd2174749ffc6e784fab5527c0f43 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Wed, 27 May 2015 18:06:16 -0400 Subject: debugging addition for autobuild-package.xml --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'build.sh') diff --git a/build.sh b/build.sh index f3267e93b7..93f60ce201 100755 --- a/build.sh +++ b/build.sh @@ -180,7 +180,7 @@ build() build_docs() { begin_section "Building Documentation" - begin_section "Autobuild metadata" + begin_section "Autobuild metadata $(pwd)" if [ -r "$build_dir/autobuild-package.xml" ] then upload_item docs "$build_dir/autobuild-package.xml" text/xml -- cgit v1.2.3 From 919bea5645d0ec66e8d21a1b859671d11f7bb4a1 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Fri, 29 May 2015 13:32:52 -0400 Subject: rearrange upload of autobuild metadata in hopes of making it reliable --- build.sh | 43 +++++++++++++++++++++---------------------- 1 file changed, 21 insertions(+), 22 deletions(-) (limited to 'build.sh') diff --git a/build.sh b/build.sh index 93f60ce201..45b11d4221 100755 --- a/build.sh +++ b/build.sh @@ -177,25 +177,6 @@ build() } # This is called from the branch independent script upon completion of all platform builds. -build_docs() -{ - begin_section "Building Documentation" - begin_section "Autobuild metadata $(pwd)" - if [ -r "$build_dir/autobuild-package.xml" ] - then - upload_item docs "$build_dir/autobuild-package.xml" text/xml - else - record_event "no metadata at '$build_dir/autobuild-package.xml'" - fi - end_section "Autobuild metadata" - if [ "$arch" != "Linux" ] - then - record_dependencies_graph # defined in build.sh - else - echo "TBD - skipping linux graph (probable python version dependency)" 1>&2 - fi - end_section "Building Documentation" -} # Check to see if we were invoked from the wrapper, if not, re-exec ourselves from there @@ -265,17 +246,35 @@ do build "$variant" "$build_dir" 2>&1 | tee -a "$build_log" | sed -n 's/^ *\(##teamcity.*\)/\1/p' if `cat "$build_dir/build_ok"` then - echo "so far so good" >> "$build_log" + if [ "$variant" == "Release" ] + then + if [ -r "$build_dir/autobuild-package.xml" ] + then + begin_section "Autobuild metadata" + record_event "Upload autobuild metadata" + upload_item docs "$build_dir/autobuild-package.xml" text/xml + if [ "$arch" != "Linux" ] + then + record_dependencies_graph # defined in buildscripts/hg/bin/build.sh + else + record_event "no dependency graph for linux (probable python version dependency)" 1>&2 + fi + end_section "Autobuild metadata" + else + record_event "no autobuild metadata at '$build_dir/autobuild-package.xml'" + fi + else + record_event "do not record autobuild metadata for $variant" + fi else record_failure "Build of \"$variant\" failed." fi + end_section "Build$variant" fi end_section "Do$variant" done -build_docs - # build debian package if [ "$arch" == "Linux" ] then -- cgit v1.2.3 From 67d496c7359dcde6e1c85dec26a5a92c747c2501 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Sat, 30 May 2015 15:02:20 -0400 Subject: skip remaining variants once one variant build fails (fail early and often) --- build.sh | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'build.sh') diff --git a/build.sh b/build.sh index 45b11d4221..66ba3d86f3 100755 --- a/build.sh +++ b/build.sh @@ -273,6 +273,11 @@ do end_section "Build$variant" fi end_section "Do$variant" + if ! $succeeded + then + record_event "remaining variants skipped due to $variant failure" + break + fi done # build debian package -- cgit v1.2.3 From b50a26c4cd83c38601bc2281095b0f767a6bfb87 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Mon, 1 Jun 2015 09:32:19 -0400 Subject: Correct/update invocation documentation, clarify TC progress messaging --- build.sh | 45 ++++++++++++++++++--------------------------- 1 file changed, 18 insertions(+), 27 deletions(-) (limited to 'build.sh') diff --git a/build.sh b/build.sh index 66ba3d86f3..f1a392f61f 100755 --- a/build.sh +++ b/build.sh @@ -1,10 +1,13 @@ #!/bin/sh -# This is a the master build script - it is intended to be run by the Linden -# Lab build farm -# It is called by a wrapper script in the shared repository which sets up -# the environment from the various BuildParams files and does all the build -# result post-processing. +# This is the custom build script for the viewer +# +# It must be run by the Linden Lab build farm shared buildscript because +# it relies on the environment that sets up, functions it provides, and +# the build result post-processing it does. +# +# The shared buildscript build.sh invokes this because it is named 'build.sh', +# which is the default custom build script name in buildscripts/hg/BuildParams # # PLEASE NOTE: # @@ -12,7 +15,6 @@ # Cygwin can be tricky.... # * The special style in which python is invoked is intentional to permit # use of a native python install on windows - which requires paths in DOS form -# * This script relies heavily on parameters defined in BuildParams check_for() { @@ -94,13 +96,11 @@ installer_CYGWIN() pre_build() { local variant="$1" - begin_section "Pre$variant" + begin_section "Configure $variant" [ -n "$master_message_template_checkout" ] \ && [ -r "$master_message_template_checkout/message_template.msg" ] \ && template_verifier_master_url="-DTEMPLATE_VERIFIER_MASTER_URL=file://$master_message_template_checkout/message_template.msg" - check_for "Confirm dictionaries are installed before 'autobuild configure'" ${build_dir}/packages/dictionaries - "$autobuild" configure -c $variant -- \ -DPACKAGE:BOOL=ON \ -DRELEASE_CRASH_REPORTING:BOOL=ON \ @@ -109,7 +109,7 @@ pre_build() -DLL_TESTS:BOOL="$run_tests" \ -DTEMPLATE_VERIFIER_OPTIONS:STRING="$template_verifier_options" $template_verifier_master_url - end_section "Pre$variant" + end_section "Configure $variant" } package_llphysicsextensions_tpv() @@ -146,11 +146,8 @@ build() local variant="$1" if $build_viewer then - begin_section "Viewer$variant" - "$autobuild" build --no-configure -c $variant build_ok=$? - end_section "Viewer$variant" # Run build extensions if [ $build_ok -eq 0 -a -d ${build_dir}/packages/build-extensions ]; then @@ -176,9 +173,6 @@ build() fi } -# This is called from the branch independent script upon completion of all platform builds. - - # Check to see if we were invoked from the wrapper, if not, re-exec ourselves from there if [ "x$arch" = x ] then @@ -190,7 +184,7 @@ then cat <> "$build_log" 2>&1 then - begin_section "Build$variant" + begin_section "Build $variant" build "$variant" "$build_dir" 2>&1 | tee -a "$build_log" | sed -n 's/^ *\(##teamcity.*\)/\1/p' if `cat "$build_dir/build_ok"` then @@ -251,7 +244,6 @@ do if [ -r "$build_dir/autobuild-package.xml" ] then begin_section "Autobuild metadata" - record_event "Upload autobuild metadata" upload_item docs "$build_dir/autobuild-package.xml" text/xml if [ "$arch" != "Linux" ] then @@ -267,12 +259,11 @@ do record_event "do not record autobuild metadata for $variant" fi else - record_failure "Build of \"$variant\" failed." + record_failure "Build of \"$variant\" failed." fi - - end_section "Build$variant" + end_section "Build $variant" fi - end_section "Do$variant" + end_section "$variant" if ! $succeeded then record_event "remaining variants skipped due to $variant failure" -- cgit v1.2.3 From b3352767ce7e1749ba927784471ff1edf960dd7f Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Mon, 29 Jun 2015 18:12:22 -0400 Subject: Replace hg.secondlife.com with bitbucket.org/lindenlab/viewer-release Incorporate viewer channel and version into doxygen output Use the autobuild configuration as a variant to build doxygen docs. Upload doxygen docs as a tarball if generated. --- build.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'build.sh') diff --git a/build.sh b/build.sh index 95b32ba429..c10380c043 100755 --- a/build.sh +++ b/build.sh @@ -173,12 +173,6 @@ build() fi } - if "$AUTOBUILD" build -c Doxygen - then - echo true >"$build_dir"/build_ok - else - echo false >"$build_dir"/build_ok - fi # Check to see if we were invoked from the wrapper, if not, re-exec ourselves from there if [ "x$arch" = x ] then @@ -423,6 +417,11 @@ then upload_stub_installers "$build_dir_stubs" fi end_section Upload Installer + elif [ "$last_built_variant" = "Doxygen" ] + then + cd "$build_dir/doxygen/html" + tar cjf viewer-doxygen.tar.bz2 . + upload_item docs viewer-doxygen.tar.bz2 binary/octet-stream else echo skipping upload of installer fi -- cgit v1.2.3 From dc5960d3930efa482b7de205fc9b8d08785da4c8 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Tue, 30 Jun 2015 13:14:58 -0400 Subject: relocate upload of Doxygen results --- build.sh | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'build.sh') diff --git a/build.sh b/build.sh index c10380c043..ed75b20c59 100755 --- a/build.sh +++ b/build.sh @@ -239,7 +239,7 @@ do build "$variant" "$build_dir" 2>&1 | tee -a "$build_log" | sed -n 's/^ *\(##teamcity.*\)/\1/p' if `cat "$build_dir/build_ok"` then - if [ "$variant" == "Release" ] + if [ "$variant" == "Release" -o "$variant" == "Doxygen" ] then if [ -r "$build_dir/autobuild-package.xml" ] then @@ -249,7 +249,7 @@ do then record_dependencies_graph # defined in buildscripts/hg/bin/build.sh else - record_event "no dependency graph for linux (probable python version dependency)" 1>&2 + record_event "TBD - no dependency graph for linux (probable python version dependency)" 1>&2 fi end_section "Autobuild metadata" else @@ -399,6 +399,17 @@ then echo "No llphysicsextensions_package" fi ;; + Doxygen) + if [ -r "$build_dir/doxygen_warnings.log" ] + then + record_event "Doxygen warnings generated; see doxygen_warnings.log" + upload_item log "$build_dir/doxygen_warnings.log" binary/octet-stream + fi + if [ -d "$build_dir/doxygen/html" ] + then + (cd "$build_dir/doxygen/html"; tar cjf "$build_dir/viewer-doxygen.tar.bz2" .) + upload_item docs viewer-doxygen.tar.bz2 binary/octet-stream + fi *) echo "Skipping mapfile for $last_built_variant" ;; @@ -417,11 +428,6 @@ then upload_stub_installers "$build_dir_stubs" fi end_section Upload Installer - elif [ "$last_built_variant" = "Doxygen" ] - then - cd "$build_dir/doxygen/html" - tar cjf viewer-doxygen.tar.bz2 . - upload_item docs viewer-doxygen.tar.bz2 binary/octet-stream else echo skipping upload of installer fi -- cgit v1.2.3