From 175895a2e9ed3f17307f1f128dba37c619de6aa4 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Tue, 23 Sep 2014 12:22:42 -0400 Subject: add build_docs step and experimental use of autobuild graph subcommand --- build.sh | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'build.sh') diff --git a/build.sh b/build.sh index f908139979..9cb46669cd 100755 --- a/build.sh +++ b/build.sh @@ -1,6 +1,7 @@ #!/bin/sh -# This is a the master build script - it is intended to be run by parabuild +# 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. @@ -12,8 +13,6 @@ # * 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 -# * The basic convention is that the build name can be mapped onto a mercurial URL, -# which is also used as the "branch" name. check_for() { @@ -172,11 +171,17 @@ build() # This is called from the branch independent script upon completion of all platform builds. build_docs() { - begin_section Docs + begin_section "Building Documentation" + begin_section "Stub documentation.txt" # Stub code to generate docs echo Hello world > documentation.txt upload_item docs documentation.txt text/plain - end_section Docs + end_section "Stub documentation.txt" + begin_section "Dependency Graph" + depends_graph="$build_dir/dependancies.png" + "$AUTOBUILD" graph --output "$depends_graph" && record_event "autobuild graph succeeded" || record_event "autobuild graph failed" + end_section "Dependency Graph" + end_section "Building Documentation" } @@ -375,7 +380,6 @@ then fi fi - # check status and upload results to S3 if $succeeded then -- cgit v1.2.3 From 0218803b232296121016e0ee37b3577d1725b9d8 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Tue, 23 Sep 2014 13:43:55 -0400 Subject: invoke build_docs locally, since the master build script does not --- build.sh | 2 ++ 1 file changed, 2 insertions(+) (limited to 'build.sh') diff --git a/build.sh b/build.sh index 9cb46669cd..c6efa39194 100755 --- a/build.sh +++ b/build.sh @@ -281,6 +281,8 @@ do 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 ] -- cgit v1.2.3 From 5b43bf4fe6d08409cbedf633dca8b6c8d54b3237 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Tue, 23 Sep 2014 16:51:42 -0400 Subject: log results of autobuild graph (and put the env display in a collapsable section) --- build.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'build.sh') diff --git a/build.sh b/build.sh index c6efa39194..4568361617 100755 --- a/build.sh +++ b/build.sh @@ -179,7 +179,14 @@ build_docs() end_section "Stub documentation.txt" begin_section "Dependency Graph" depends_graph="$build_dir/dependancies.png" - "$AUTOBUILD" graph --output "$depends_graph" && record_event "autobuild graph succeeded" || record_event "autobuild graph failed" + echo "$AUTOBUILD" graph --output "$depends_graph" + if "$AUTOBUILD" graph --output "$depends_graph" >> "$build_log" 2>&1 + then + record_event "autobuild graph succeeded" + uplaod_item docs "$depends_graph" image/png + else + record_event "autobuild graph failed" + fi end_section "Dependency Graph" end_section "Building Documentation" } @@ -231,7 +238,9 @@ fi eval "$("$AUTOBUILD" source_environment)" # dump environment variables for debugging +begin_section "Environment" env|sort +end_section "Environment" # Now run the build succeeded=true -- cgit v1.2.3 From 2ea24ecc3b400358f6b8f25fd28b62a3856021c2 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Wed, 24 Sep 2014 11:24:22 -0400 Subject: use dependency graph generation from buildscripts build.sh --- build.sh | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'build.sh') diff --git a/build.sh b/build.sh index 4568361617..7ca95002fa 100755 --- a/build.sh +++ b/build.sh @@ -177,17 +177,7 @@ build_docs() echo Hello world > documentation.txt upload_item docs documentation.txt text/plain end_section "Stub documentation.txt" - begin_section "Dependency Graph" - depends_graph="$build_dir/dependancies.png" - echo "$AUTOBUILD" graph --output "$depends_graph" - if "$AUTOBUILD" graph --output "$depends_graph" >> "$build_log" 2>&1 - then - record_event "autobuild graph succeeded" - uplaod_item docs "$depends_graph" image/png - else - record_event "autobuild graph failed" - fi - end_section "Dependency Graph" + record_dependencies_graph # defined in build.sh end_section "Building Documentation" } -- cgit v1.2.3 From 2ed557e16b87b355f97534ffbccecc29bd91ca85 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Fri, 24 Oct 2014 06:27:20 -0400 Subject: upload autobuild metadata after viewer build --- build.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'build.sh') diff --git a/build.sh b/build.sh index 7ca95002fa..64181828aa 100755 --- a/build.sh +++ b/build.sh @@ -172,11 +172,14 @@ build() build_docs() { begin_section "Building Documentation" - begin_section "Stub documentation.txt" - # Stub code to generate docs - echo Hello world > documentation.txt - upload_item docs documentation.txt text/plain - end_section "Stub documentation.txt" + begin_section "Autobuild metadata" + 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" record_dependencies_graph # defined in build.sh end_section "Building Documentation" } -- cgit v1.2.3 From 9bc7165e23fa72fa3d8ece2da0b54dfe128a4ce9 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Fri, 24 Oct 2014 14:49:15 -0400 Subject: convert llphysicsextensions tpv package build to use new autobuild package --results-file option --- build.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'build.sh') diff --git a/build.sh b/build.sh index 64181828aa..11455bff00 100755 --- a/build.sh +++ b/build.sh @@ -124,9 +124,15 @@ package_llphysicsextensions_tpv() # capture the package file name for use in upload later... PKGTMP=`mktemp -t pgktpv.XXXXXX` trap "rm $PKGTMP* 2>/dev/null" 0 - "$AUTOBUILD" package --verbose --config-file $llpetpvcfg > $PKGTMP + "$AUTOBUILD" package --verbose --config-file $llpetpvcfg --results-file "$(native_path $PKGTMP)" tpv_status=$? - sed -n -e 's/^wrote *//p' $PKGTMP > $build_dir/llphysicsextensions_package + if [ -r "${PKGTMP}" ] + then + cat "${PKGTMP}" >> "$build_log" + eval $(cat "${PKGTMP}") # sets autobuild_package_{name,filename,md5} + autobuild_package_filename="$(shell_path "${autobuild_package_filename}")" + echo "${autobuild_package_filename}" > $build_dir/llphysicsextensions_package + fi else echo "Do not provide llphysicsextensions_tpv for $variant" llphysicsextensions_package="" -- cgit v1.2.3 From 2a3b58b0c408a348458a4616b0842edd4b5916a0 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 4 Dec 2014 21:50:02 -0500 Subject: Place Windows build artifacts in build-vc120 rather than build-vc100. --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'build.sh') diff --git a/build.sh b/build.sh index 11455bff00..4620a52c22 100755 --- a/build.sh +++ b/build.sh @@ -32,7 +32,7 @@ build_dir_Linux() build_dir_CYGWIN() { - echo build-vc100 + echo build-vc120 } viewer_channel_suffix() -- cgit v1.2.3 From cdfd470f2e8a03b976d8562c8c7f597c2f0233c0 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Tue, 23 Dec 2014 12:19:44 -0500 Subject: temporarily disable graph generation on linux --- build.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'build.sh') diff --git a/build.sh b/build.sh index 4620a52c22..690e9c0ec3 100755 --- a/build.sh +++ b/build.sh @@ -186,7 +186,12 @@ build_docs() record_event "no metadata at '$build_dir/autobuild-package.xml'" fi end_section "Autobuild metadata" - record_dependencies_graph # defined in build.sh + 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" } -- cgit v1.2.3 From 355d00685137aa0c42fdd93853096ac718a474b2 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 8 Jan 2015 16:48:29 -0500 Subject: Rationalize use of AUTOBUILD environment variable across languages. Ensure that AUTOBUILD is always in native path syntax on every platform. Remove local build.sh logic to infer AUTOBUILD: either the generic build.sh has set it properly, or scream for help. Since cygwin bash scripts need a cygwin-syntax path to autobuild, convert to a local 'autobuild' variable using shell_path. Remove kludges in other languages involving cygdrive twiddling. --- build.sh | 36 +++++++++++------------------------- 1 file changed, 11 insertions(+), 25 deletions(-) (limited to 'build.sh') diff --git a/build.sh b/build.sh index 690e9c0ec3..9e1ebf2149 100755 --- a/build.sh +++ b/build.sh @@ -101,7 +101,7 @@ pre_build() check_for "Confirm dictionaries are installed before 'autobuild configure'" ${build_dir}/packages/dictionaries - "$AUTOBUILD" configure -c $variant -- \ + "$autobuild" configure -c $variant -- \ -DPACKAGE:BOOL=ON \ -DRELEASE_CRASH_REPORTING:BOOL=ON \ -DVIEWER_CHANNEL:STRING="\"$viewer_channel\"" \ @@ -119,12 +119,12 @@ package_llphysicsextensions_tpv() if [ "$variant" = "Release" ] then llpetpvcfg=$build_dir/packages/llphysicsextensions/autobuild-tpv.xml - "$AUTOBUILD" build --verbose --config-file $llpetpvcfg -c Tpv + "$autobuild" build --verbose --config-file $llpetpvcfg -c Tpv # capture the package file name for use in upload later... PKGTMP=`mktemp -t pgktpv.XXXXXX` trap "rm $PKGTMP* 2>/dev/null" 0 - "$AUTOBUILD" package --verbose --config-file $llpetpvcfg --results-file "$(native_path $PKGTMP)" + "$autobuild" package --verbose --config-file $llpetpvcfg --results-file "$(native_path $PKGTMP)" tpv_status=$? if [ -r "${PKGTMP}" ] then @@ -148,7 +148,7 @@ build() then begin_section "Viewer$variant" - "$AUTOBUILD" build --no-configure -c $variant + "$autobuild" build --no-configure -c $variant build_ok=$? end_section "Viewer$variant" @@ -216,30 +216,16 @@ fi # Check to see if we're skipping the platform eval '$build_'"$arch" || pass -if [ -z "$AUTOBUILD" ] +# set "$autobuild" to cygwin path form for use locally in this script +autobuild="$(shell_path "$AUTOBUILD")" +if [ ! -x "$autobuild" ] then - export autobuild_dir="$here/../../../autobuild/bin/" - if [ -d "$autobuild_dir" ] - then - export AUTOBUILD="$autobuild_dir"autobuild - if [ -x "$AUTOBUILD" ] - then - # *HACK - bash doesn't know how to pass real pathnames to native windows python - case "$arch" in - CYGWIN) AUTOBUILD=$(cygpath -u $AUTOBUILD.cmd) ;; - esac - else - record_failure "Not executable: $AUTOBUILD" - exit 1 - fi - else - record_failure "Not found: $autobuild_dir" - exit 1 - fi + record_failure "AUTOBUILD not executable: '$autobuild'" + exit 1 fi -# load autbuild provided shell functions and variables -eval "$("$AUTOBUILD" source_environment)" +# load autobuild provided shell functions and variables +eval "$("$autobuild" source_environment)" # dump environment variables for debugging begin_section "Environment" -- cgit v1.2.3 From 9b11ed284358910c6ee7fa4d088f81677bc92fbc Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 22 Jan 2015 14:43:08 -0500 Subject: Ensure AUTOBUILD is in native_path form for non-cygwin tools. Until we can propagate the corresponding buildscripts changes, we must explicitly put AUTOBUILD in proper form. For now, assume that AUTOBUILD has not yet been normalized. --- build.sh | 2 ++ 1 file changed, 2 insertions(+) (limited to 'build.sh') diff --git a/build.sh b/build.sh index 9e1ebf2149..b66d1a0705 100755 --- a/build.sh +++ b/build.sh @@ -216,6 +216,8 @@ fi # Check to see if we're skipping the platform eval '$build_'"$arch" || pass +# ensure AUTOBUILD is in native path form for child processes +AUTOBUILD="$(native_path "$AUTOBUILD")" # set "$autobuild" to cygwin path form for use locally in this script autobuild="$(shell_path "$AUTOBUILD")" if [ ! -x "$autobuild" ] -- cgit v1.2.3