summaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh130
1 files changed, 33 insertions, 97 deletions
diff --git a/build.sh b/build.sh
index 1c28f5a255..a612a5c5cd 100755
--- a/build.sh
+++ b/build.sh
@@ -22,7 +22,7 @@ build_dir_Darwin()
build_dir_Linux()
{
- echo viewer-linux-i686-$(echo $1 | tr A-Z a-z)
+ echo build-linux-i686
}
build_dir_CYGWIN()
@@ -50,47 +50,18 @@ installer_CYGWIN()
pre_build()
{
local variant="$1"
- local build_dir="$2"
begin_section "Pre$variant"
- #export PATH="/cygdrive/c/Program Files/Microsoft Visual Studio 8/Common7/IDE/:$PATH"
- python develop.py \
- --incredibuild \
- --unattended \
- -t $variant \
- -G "$cmake_generator" \
- configure \
- -DGRID:STRING="$viewer_grid" \
- -DVIEWER_CHANNEL:STRING="$viewer_channel" \
- -DVIEWER_LOGIN_CHANNEL:STRING="$login_channel" \
- -DINSTALL_PROPRIETARY:BOOL=ON \
- -DRELEASE_CRASH_REPORTING:BOOL=ON \
- -DLOCALIZESETUP:BOOL=ON \
- -DPACKAGE:BOOL=ON \
- -DCMAKE_VERBOSE_MAKEFILE:BOOL=TRUE \
- -DLL_TESTS:BOOL="$run_tests"
+ "$AUTOBUILD" configure -c $variant -- -DPACKAGE:BOOL=ON -DRELEASE_CRASH_REPORTING:BOOL=ON
end_section "Pre$variant"
}
build()
{
local variant="$1"
- local build_dir="$2"
if $build_viewer
then
begin_section "Viewer$variant"
- if python develop.py \
- --incredibuild \
- --unattended \
- -t $variant \
- -G "$cmake_generator" \
- build package
-# && \
-# python develop.py \
-# --incredibuild \
-# --unattended \
-# -t $variant \
-# -G "$cmake_generator" \
-# build package
+ if "$AUTOBUILD" build -c $variant
then
echo true >"$build_dir"/build_ok
else
@@ -110,6 +81,7 @@ build_docs()
end_section Docs
}
+
# Check to see if we were invoked from the wrapper, if not, re-exec ourselves from there
if [ "x$arch" = x ]
then
@@ -117,15 +89,11 @@ then
if [ -x "$top/../buildscripts/hg/bin/build.sh" ]
then
exec "$top/../buildscripts/hg/bin/build.sh" "$top"
- elif [ -r "$top/README" ]
- then
- cat "$top/README"
- exit 1
else
cat <<EOF
This script, if called in a development environment, requires that the branch
independent build script repository be checked out next to this repository.
-This repository is located at http://hg.secondlife.com/buildscripts
+This repository is located at http://hg.lindenlab.com/parabuild/buildscripts
EOF
exit 1
fi
@@ -151,8 +119,32 @@ fi
# First three parts only, $revision will be appended automatically.
build_viewer_update_version_manager_version=`scripts/get_version.py --viewer-version | sed 's/\.[0-9]*$//'`
+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
+
+# load autbuild provided shell functions and variables
+eval "$("$AUTOBUILD" source_environment)"
+
+# Install packages.
+"$AUTOBUILD" install --skip-license-check
+
# Now run the build
-cd indra
succeeded=true
build_processes=
last_built_variant=
@@ -171,57 +163,7 @@ do
mkdir -p "$build_dir"
if pre_build "$variant" "$build_dir" >> "$build_log" 2>&1
then
- if $build_coverity
- then
- mkdir -p "$build_dir/cvbuild"
- coverity_config=`cygpath --windows "$coverity_dir/config/coverity_config.xml"`
- coverity_tmpdir=`cygpath --windows "$build_dir/cvbuild"`
- coverity_root=`cygpath --windows "$top/latest"`
- case "$variant" in
- Release)
- begin_section Coverity
- begin_section CovBuild
- "$coverity_dir"/bin/cov-build\
- --verbose 4 \
- --config "$coverity_config"\
- --dir "$coverity_tmpdir"\
- python develop.py -t $variant -G "$cmake_generator" build "$coverity_product"\
- >> "$build_log" 2>&1\
- &&\
- end_section CovBuild\
- &&\
- begin_section CovAnalyze\
- &&\
- "$coverity_dir"/bin/cov-analyze\
- --security\
- --concurrency\
- --dir "$coverity_tmpdir"\
- >> "$build_log" 2>&1\
- &&\
- end_section CovAnalyze\
- &&\
- begin_section CovCommit\
- &&\
- "$coverity_dir"/bin/cov-commit-defects\
- --stream "$coverity_product"\
- --dir "$coverity_tmpdir"\
- --host "$coverity_server"\
- --strip-path "$coverity_root"\
- --target "$branch/$arch"\
- --version "$revision"\
- --description "$repo: $variant $revision"\
- --user admin --password coverity\
- >> "$build_log" 2>&1\
- || record_failure "Coverity Build Failed"
- # since any step could have failed, rely on the enclosing block to close any pending sub-blocks
- end_section Coverity
- ;;
- esac
- if test -r "$build_dir"/cvbuild/build-log.txt
- then
- upload_item log "$build_dir"/cvbuild/build-log.txt text/plain
- fi
- elif $build_link_parallel
+ if $build_link_parallel
then
begin_section BuildParallel
( build "$variant" "$build_dir" > "$build_dir/build.log" 2>&1 ) &
@@ -229,10 +171,7 @@ do
end_section BuildParallel
else
begin_section "Build$variant"
- build "$variant" "$build_dir" >> "$build_log" 2>&1
- begin_section Tests
- grep --line-buffered "^##teamcity" "$build_log"
- end_section Tests
+ build "$variant" "$build_dir" 2>&1 | tee -a "$build_log" | grep --line-buffered "^##teamcity"
if `cat "$build_dir/build_ok"`
then
echo so far so good.
@@ -261,15 +200,13 @@ then
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" | grep --line-buffered "^##teamcity"
if `cat "$build_dir/build_ok"`
then
echo so far so good.
else
record_failure "Parallel build of \"$variant\" failed."
fi
- begin_section Tests
- tee -a $build_log < "$build_dir/build.log" | grep --line-buffered "^##teamcity"
- end_section Tests
end_section "Build$variant"
done
end_section WaitParallel
@@ -290,7 +227,6 @@ then
succeeded=$build_coverity
else
upload_item installer "$package" binary/octet-stream
- upload_item quicklink "$package" binary/octet-stream
# Upload crash reporter files.
case "$last_built_variant" in