Added build.sh and BuildParams
parent
958cec6559
commit
a646ad1343
|
|
@ -0,0 +1,241 @@
|
|||
# BuildParams
|
||||
#
|
||||
# Please refer to:
|
||||
# https://wiki.lindenlab.com/wiki/Parabuild_with_Mercurial#How_Build_Parameters_Work
|
||||
|
||||
# Global setting for now...
|
||||
Darwin.symbolfiles = "newview/Release/secondlife-symbols-darwin.tar.bz2"
|
||||
CYGWIN.symbolfiles = "newview/Release/secondlife-symbols-windows.tar.bz2"
|
||||
Linux.symbolfiles = "newview/secondlife-symbols-linux.tar.bz2"
|
||||
|
||||
|
||||
#### P r o d u c t i o n B u i l d s ####
|
||||
|
||||
# ========================================
|
||||
# Viewer Hotfix Old
|
||||
# ========================================
|
||||
|
||||
# Report changes since...
|
||||
viewer-hotfix-old.show_changes_since = 2-1-release
|
||||
|
||||
# Build Settings
|
||||
viewer-hotfix-old.build_viewer = true
|
||||
viewer-hotfix-old.build_server = false
|
||||
viewer-hotfix-old.build_server_tests = false
|
||||
viewer-hotfix-old.build_Linux = true
|
||||
viewer-hotfix-old.build_hg_bundle = true
|
||||
viewer-hotfix-old.build_docs = true
|
||||
#viewer-hotfix-old.build_Linux_Debug = false
|
||||
#viewer-hotfix-old.build_Linux_RelWithDebInfo = false
|
||||
#
|
||||
# Default channels etc - set build_viewer_update_version_manager to true when needed.
|
||||
viewer-hotfix-old.viewer_channel = "Second Life Release"
|
||||
viewer-hotfix-old.login_channel = "Second Life Release"
|
||||
viewer-hotfix-old.viewer_grid = agni
|
||||
viewer-hotfix-old.build_viewer_update_version_manager = false
|
||||
|
||||
# ========================================
|
||||
# Viewer Hotfix Previous
|
||||
# ========================================
|
||||
|
||||
# Report changes since...
|
||||
viewer-hotfix-previous.show_changes_since = 2-1-release
|
||||
|
||||
# Build Settings
|
||||
viewer-hotfix-previous.build_viewer = true
|
||||
viewer-hotfix-previous.build_server = false
|
||||
viewer-hotfix-previous.build_server_tests = false
|
||||
viewer-hotfix-previous.build_Linux = true
|
||||
viewer-hotfix-previous.build_hg_bundle = true
|
||||
viewer-hotfix-previous.build_docs = true
|
||||
#viewer-hotfix-previous.build_Linux_Debug = false
|
||||
#viewer-hotfix-previous.build_Linux_RelWithDebInfo = false
|
||||
#
|
||||
# Default channels etc - set build_viewer_update_version_manager to true when needed.
|
||||
viewer-hotfix-previous.viewer_channel = "Second Life Release"
|
||||
viewer-hotfix-previous.login_channel = "Second Life Release"
|
||||
viewer-hotfix-previous.viewer_grid = agni
|
||||
viewer-hotfix-previous.build_viewer_update_version_manager = false
|
||||
|
||||
# ========================================
|
||||
# Viewer Hotfix
|
||||
# ========================================
|
||||
|
||||
# Report changes since...
|
||||
viewer-hotfix.show_changes_since = 2-1-release
|
||||
|
||||
# Build Settings
|
||||
viewer-hotfix.build_viewer = true
|
||||
viewer-hotfix.build_server = false
|
||||
viewer-hotfix.build_server_tests = false
|
||||
viewer-hotfix.build_Linux = true
|
||||
viewer-hotfix.build_hg_bundle = true
|
||||
viewer-hotfix.build_docs = true
|
||||
#viewer-hotfix.build_Linux_Debug = false
|
||||
#viewer-hotfix.build_Linux_RelWithDebInfo = false
|
||||
#
|
||||
# Default channels etc - set build_viewer_update_version_manager to true when needed.
|
||||
viewer-hotfix.viewer_channel = "Second Life Release"
|
||||
viewer-hotfix.login_channel = "Second Life Release"
|
||||
viewer-hotfix.viewer_grid = agni
|
||||
viewer-hotfix.build_viewer_update_version_manager = false
|
||||
|
||||
# ========================================
|
||||
# Viewer Release
|
||||
# ========================================
|
||||
|
||||
# Report changes since...
|
||||
viewer-release.show_changes_since = 2-1-release
|
||||
|
||||
# Build Settings
|
||||
viewer-release.build_viewer = true
|
||||
viewer-release.build_server = false
|
||||
viewer-release.build_server_tests = false
|
||||
viewer-release.build_Linux = true
|
||||
viewer-release.build_hg_bundle = true
|
||||
viewer-release.build_docs = true
|
||||
#viewer-release.build_Linux_Debug = false
|
||||
#viewer-release.build_Linux_RelWithDebInfo = false
|
||||
#
|
||||
# Default channels etc - set build_viewer_update_version_manager to true when needed.
|
||||
viewer-release.viewer_channel = "Second Life Beta Viewer"
|
||||
viewer-release.login_channel = "Second Life Beta Viewer"
|
||||
viewer-release.viewer_grid = agni
|
||||
viewer-release.build_viewer_update_version_manager = false
|
||||
|
||||
# ========================================
|
||||
# Viewer Public
|
||||
# ========================================
|
||||
|
||||
# Report changes since...
|
||||
viewer-public.show_changes_since = 2-1-release
|
||||
|
||||
# Build Settings
|
||||
viewer-public.build_viewer = true
|
||||
viewer-public.build_server = false
|
||||
viewer-public.build_server_tests = false
|
||||
viewer-public.build_Linux = true
|
||||
viewer-public.build_hg_bundle = true
|
||||
viewer-public.build_docs = true
|
||||
#viewer-public.build_Linux_Debug = false
|
||||
#viewer-public.build_Linux_RelWithDebInfo = false
|
||||
#
|
||||
# Default channels etc - set build_viewer_update_version_manager to true when needed.
|
||||
viewer-public.viewer_channel = "Second Life Public Alpha"
|
||||
viewer-public.login_channel = "Second Life Public Alpha"
|
||||
viewer-public.viewer_grid = agni
|
||||
viewer-public.build_viewer_update_version_manager = false
|
||||
viewer-public_coverity.build_coverity = true
|
||||
viewer-public_coverity.coverity_product = viewer
|
||||
|
||||
|
||||
|
||||
#### D e v e l o p m e n t B u i l d s ####
|
||||
|
||||
|
||||
# ========================================
|
||||
# Viewer Development
|
||||
# ========================================
|
||||
|
||||
# Report changes since...
|
||||
viewer-development.show_changes_since = 2-1-release
|
||||
|
||||
# Build Settings
|
||||
viewer-development.build_viewer = true
|
||||
viewer-development.build_server = false
|
||||
viewer-development.build_server_tests = false
|
||||
viewer-development.build_Linux = true
|
||||
viewer-development.build_hg_bundle = true
|
||||
viewer-development.build_docs = true
|
||||
# viewer-development.viewer_channel = "Second Life Beta Viewer"
|
||||
# viewer-development.login_channel = "Second Life Beta Viewer"
|
||||
viewer-development.viewer_grid = agni
|
||||
viewer-development.build_viewer_update_version_manager = false
|
||||
|
||||
# ========================================
|
||||
# Viewer Development Test
|
||||
# ========================================
|
||||
|
||||
# Report changes since...
|
||||
viewer-development-test.show_changes_since = 2-1-release
|
||||
|
||||
# Build Settings
|
||||
viewer-development-test.build_viewer = true
|
||||
viewer-development-test.build_server = false
|
||||
viewer-development-test.build_server_tests = false
|
||||
viewer-development-test.build_Linux = true
|
||||
viewer-development-test.build_hg_bundle = true
|
||||
viewer-development-test.build_docs = true
|
||||
# viewer-development-test.viewer_channel = "Second Life Beta Viewer"
|
||||
# viewer-development-test.login_channel = "Second Life Beta Viewer"
|
||||
viewer-development-test.viewer_grid = agni
|
||||
viewer-development-test.build_viewer_update_version_manager = false
|
||||
|
||||
# =======================================
|
||||
# brad
|
||||
# ========================================
|
||||
|
||||
debug-halting.email = cg@lindenlab.com
|
||||
debug-halting.build_server = false
|
||||
debug-halting.build_server_tests = false
|
||||
debug-halting.build_Darwin = false
|
||||
debug-halting.build_Linux = false
|
||||
debug-halting.build_CYGWIN_Debug = false
|
||||
debug-halting.build_CYGWIN_RelWithDebInfo = false
|
||||
|
||||
# ========================================
|
||||
# brad
|
||||
# ========================================
|
||||
|
||||
brad-parabuild.email = brad@lindenlab.com
|
||||
brad-parabuild.build_server = false
|
||||
brad-parabuild.build_server_tests = false
|
||||
|
||||
# ========================================
|
||||
# moss
|
||||
# ========================================
|
||||
|
||||
mossbuild1.email = moss@lindenlab.com
|
||||
mossbuild1.build_server = false
|
||||
mossbuild1.build_server_tests = false
|
||||
|
||||
mossbuild2.email = moss@lindenlab.com
|
||||
mossbuild2.build_server = false
|
||||
mossbuild2.build_server_tests = false
|
||||
|
||||
# ========================================
|
||||
# gooey
|
||||
# ========================================
|
||||
|
||||
#gooey.email = james@lindenlab.com
|
||||
gooey.build_Debug = false
|
||||
gooey.build_RelWithDebInfo = false
|
||||
gooey.build_server = false
|
||||
gooey.build_server_tests = false
|
||||
gooey.viewer_channel = "Second Life Alpha"
|
||||
gooey.login_channel = "Second Life Alpha"
|
||||
gooey.viewer_grid = agni
|
||||
gooey.build_viewer_update_version_manager = false
|
||||
|
||||
# ========================================
|
||||
# palange
|
||||
# ========================================
|
||||
|
||||
palange_viewer-2-0.email = palange@lindenlab.com
|
||||
palange_viewer-2-0.build_server = false
|
||||
palange_viewer-2-0.build_server_tests = false
|
||||
palange_viewer-2-0.build_CYGWIN_Debug = false
|
||||
|
||||
# ========================================
|
||||
# media
|
||||
# ========================================
|
||||
|
||||
media.email = skolb@lindenlab.com
|
||||
media.build_server = false
|
||||
media.build_server_tests = false
|
||||
media.viewer_channel = "Second Life Alpha"
|
||||
media.login_channel = "Second Life Alpha"
|
||||
media.viewer_grid = agni
|
||||
media.build_viewer_update_version_manager = false
|
||||
|
||||
# eof
|
||||
|
|
@ -0,0 +1,295 @@
|
|||
#!/bin/sh
|
||||
|
||||
# This is a the master build script - it is intended to be run by parabuild
|
||||
# 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.
|
||||
#
|
||||
# PLEASE NOTE:
|
||||
#
|
||||
# * This script is interpreted on three platforms, including windows and cygwin
|
||||
# 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
|
||||
# * The basic convention is that the build name can be mapped onto a mercurial URL,
|
||||
# which is also used as the "branch" name.
|
||||
|
||||
build_dir_Darwin()
|
||||
{
|
||||
echo build-darwin-i386
|
||||
}
|
||||
|
||||
build_dir_Linux()
|
||||
{
|
||||
echo viewer-linux-i686-$(echo $1 | tr A-Z a-z)
|
||||
}
|
||||
|
||||
build_dir_CYGWIN()
|
||||
{
|
||||
echo build-vc80
|
||||
}
|
||||
|
||||
installer_Darwin()
|
||||
{
|
||||
ls -1td "$(build_dir_Darwin Release)/newview/"*.dmg 2>/dev/null | sed 1q
|
||||
}
|
||||
|
||||
installer_Linux()
|
||||
{
|
||||
ls -1td "$(build_dir_Linux Release)/newview/"*.tar.bz2 2>/dev/null | sed 1q
|
||||
}
|
||||
|
||||
installer_CYGWIN()
|
||||
{
|
||||
d=$(build_dir_CYGWIN Release)
|
||||
p=$(sed 's:.*=::' "$d/newview/Release/touched.bat")
|
||||
echo "$d/newview/Release/$p"
|
||||
}
|
||||
|
||||
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 \
|
||||
-DVIEWER_CHANNEL:STRING="$viewer_channel" \
|
||||
-DVIEWER_LOGIN_CHANNEL:STRING="$login_channel" \
|
||||
-DLOCALIZESETUP:BOOL=ON \
|
||||
-DPACKAGE: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
|
||||
then
|
||||
echo true >"$build_dir"/build_ok
|
||||
else
|
||||
echo false >"$build_dir"/build_ok
|
||||
fi
|
||||
end_section "Viewer$variant"
|
||||
fi
|
||||
}
|
||||
|
||||
# This is called from the branch independent script upon completion of all platform builds.
|
||||
build_docs()
|
||||
{
|
||||
begin_section Docs
|
||||
# Stub code to generate docs
|
||||
echo Hello world > documentation.txt
|
||||
upload_item docs documentation.txt text/plain
|
||||
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
|
||||
top=`hg root`
|
||||
if [ -x "$top/../buildscripts/hg/bin/build.sh" ]
|
||||
then
|
||||
exec "$top/../buildscripts/hg/bin/build.sh" "$top"
|
||||
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.lindenlab.com/parabuild/buildscripts
|
||||
EOF
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Check to see if we're skipping the platform
|
||||
eval '$build_'"$arch" || pass
|
||||
|
||||
# Run the version number update script
|
||||
# File no longer exists in code-sep branch, so let's make sure it exists in order to use it.
|
||||
if test -f scripts/update_version_files.py ; then
|
||||
begin_section UpdateVer
|
||||
scripts/update_version_files.py \
|
||||
--channel="$viewer_channel" \
|
||||
--server_channel="$server_channel" \
|
||||
--revision=$revision \
|
||||
--verbose \
|
||||
|| fail update_version_files.py
|
||||
end_section UpdateVer
|
||||
fi
|
||||
|
||||
# Now retrieve the version for use in the version manager
|
||||
# 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]*$//'`
|
||||
|
||||
# Now run the build
|
||||
cd indra
|
||||
succeeded=true
|
||||
build_processes=
|
||||
for variant in $variants
|
||||
do
|
||||
eval '$build_'"$variant" || continue
|
||||
eval '$build_'"$arch"_"$variant" || continue
|
||||
|
||||
begin_section "Do$variant"
|
||||
build_dir=`build_dir_$arch $variant`
|
||||
build_dir_stubs="$build_dir/win_setup/$variant"
|
||||
rm -rf "$build_dir"
|
||||
mkdir -p "$build_dir"
|
||||
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
|
||||
elif $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\
|
||||
--cxx\
|
||||
--security\
|
||||
--concurrency\
|
||||
--dir "$coverity_tmpdir"\
|
||||
>> "$build_log" 2>&1\
|
||||
&&\
|
||||
end_section CovAnalyze\
|
||||
&&\
|
||||
begin_section CovCommit\
|
||||
&&\
|
||||
"$coverity_dir"/bin/cov-commit-defects\
|
||||
--product "$coverity_product"\
|
||||
--dir "$coverity_tmpdir"\
|
||||
--remote "$coverity_server"\
|
||||
--strip-path "$coverity_root"\
|
||||
--target "$branch/$arch"\
|
||||
--version "$revision"\
|
||||
--description "$repo: $variant $revision"\
|
||||
--user admin --password admin\
|
||||
>> "$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
|
||||
else
|
||||
begin_section "Build$variant"
|
||||
build "$variant" "$build_dir" >> "$build_log" 2>&1
|
||||
if `cat "$build_dir/build_ok"`
|
||||
then
|
||||
echo so far so good.
|
||||
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
|
||||
|
||||
# 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"
|
||||
cat "$build_dir/build.log" >> "$build_log"
|
||||
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
|
||||
|
||||
# check status and upload results to S3
|
||||
if $succeeded
|
||||
then
|
||||
if $build_viewer
|
||||
then
|
||||
begin_section Upload
|
||||
# Upload installer - note that ONLY THE FIRST ITEM uploaded as "installer"
|
||||
# will appear in the version manager.
|
||||
package=$(installer_$arch)
|
||||
if [ x"$package" = x ] || test -d "$package"
|
||||
then
|
||||
# Coverity doesn't package, so it's ok, anything else is fail
|
||||
succeeded=$build_coverity
|
||||
else
|
||||
upload_item installer "$package" binary/octet-stream
|
||||
|
||||
# Upload crash reporter files.
|
||||
for symbolfile in $symbolfiles
|
||||
do
|
||||
upload_item symbolfile "$build_dir/$symbolfile" binary/octet-stream
|
||||
done
|
||||
|
||||
# Upload stub installers
|
||||
upload_stub_installers "$build_dir_stubs"
|
||||
fi
|
||||
end_section Upload
|
||||
else
|
||||
echo skipping viewer
|
||||
fi
|
||||
else
|
||||
echo skipping upload of build results due to failed build.
|
||||
fi
|
||||
|
||||
# The branch independent build.sh script invoking this script will finish processing
|
||||
$succeeded || exit 1
|
||||
Loading…
Reference in New Issue