first crack at getting TC build to work, cross your fingers...

meow-7.2.2
Andrew A. de Laix 2011-01-14 15:39:37 -08:00
parent e4392e6ae9
commit b82c6af32a
1 changed files with 31 additions and 96 deletions

127
build.sh
View File

@ -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-$(echo $1 | tr A-Z a-z)
}
build_dir_CYGWIN()
@ -50,46 +50,19 @@ 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
"$AUTOBUILD" install --skip-license-check
"$AUTOBUILD" configure -c $variant
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
@ -109,6 +82,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
@ -116,15 +90,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
@ -150,8 +120,29 @@ 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)"
# Now run the build
cd indra
succeeded=true
build_processes=
last_built_variant=
@ -170,57 +161,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 ) &
@ -228,10 +169,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.
@ -260,15 +198,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
@ -289,7 +225,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