Synced buildbot from trunk to branch.
--HG-- branch : sourcemod-1.0.x extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/branches/sourcemod-1.0.x%402515
This commit is contained in:
parent
cc0f68f94e
commit
fbc29dce23
@ -45,6 +45,7 @@ if ($^O eq "linux")
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
print CONF "BuilderPath = " . $ENV{'MSVC8'} . "\n";
|
print CONF "BuilderPath = " . $ENV{'MSVC8'} . "\n";
|
||||||
|
print CONF "PDBLog = $root\\OUTPUT\\pdblog.txt\n";
|
||||||
}
|
}
|
||||||
close(CONF);
|
close(CONF);
|
||||||
|
|
||||||
|
@ -8,14 +8,12 @@ package Build;
|
|||||||
our $SVN = "/usr/bin/svn";
|
our $SVN = "/usr/bin/svn";
|
||||||
our $SVN_USER = 'dvander';
|
our $SVN_USER = 'dvander';
|
||||||
our $SVN_ARGS = '';
|
our $SVN_ARGS = '';
|
||||||
our $SVN_VERSION = "/usr/bin/svnversion";
|
|
||||||
|
|
||||||
sub Revision
|
sub Revision
|
||||||
{
|
{
|
||||||
my ($str)=(@_);
|
my ($str)=(@_);
|
||||||
my $dir = $SVN_VERSION;
|
|
||||||
|
|
||||||
my $data = Command($dir . ' -c ' . $str);
|
my $data = Command('svnversion -c ' . $str);
|
||||||
if ($data =~ /(\d+):(\d+)/)
|
if ($data =~ /(\d+):(\d+)/)
|
||||||
{
|
{
|
||||||
return $2;
|
return $2;
|
||||||
@ -26,6 +24,17 @@ sub Revision
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub ProductVersion
|
||||||
|
{
|
||||||
|
my ($file) = (@_);
|
||||||
|
my ($version);
|
||||||
|
open(FILE, $file) or die "Could not open $file: $!\n";
|
||||||
|
$version = <FILE>;
|
||||||
|
close(FILE);
|
||||||
|
chomp $version;
|
||||||
|
return $version;
|
||||||
|
}
|
||||||
|
|
||||||
sub Delete
|
sub Delete
|
||||||
{
|
{
|
||||||
my ($str)=(@_);
|
my ($str)=(@_);
|
||||||
@ -114,3 +123,4 @@ sub SVN_Add
|
|||||||
chdir($dir);
|
chdir($dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return 1;
|
@ -42,7 +42,7 @@ c['slavePortnum'] = 0000
|
|||||||
# put here: there are several in buildbot/changes/*.py to choose from.
|
# put here: there are several in buildbot/changes/*.py to choose from.
|
||||||
|
|
||||||
from buildbot.changes.pb import PBChangeSource
|
from buildbot.changes.pb import PBChangeSource
|
||||||
c['change_source'] = PBChangeSource(prefix = '/am/sourcemod/')
|
c['change_source'] = PBChangeSource()
|
||||||
|
|
||||||
# For example, if you had CVSToys installed on your repository, and your
|
# For example, if you had CVSToys installed on your repository, and your
|
||||||
# CVSROOT/freshcfg file had an entry like this:
|
# CVSROOT/freshcfg file had an entry like this:
|
||||||
@ -114,8 +114,11 @@ from buildbot.steps.transfer import FileDownload
|
|||||||
from buildbot.steps.source import SVN
|
from buildbot.steps.source import SVN
|
||||||
from buildbot.process.properties import WithProperties
|
from buildbot.process.properties import WithProperties
|
||||||
from buildbot.steps.python_twisted import Trial
|
from buildbot.steps.python_twisted import Trial
|
||||||
|
from buildbot import locks
|
||||||
|
|
||||||
def create_factory(sep):
|
pdb_lock = locks.MasterLock("symbolstore")
|
||||||
|
|
||||||
|
def create_factory(sep, os):
|
||||||
f1 = factory.BuildFactory()
|
f1 = factory.BuildFactory()
|
||||||
f1.addStep(SVN(baseURL = "svn://svn.alliedmods.net/am/sourcemod/",
|
f1.addStep(SVN(baseURL = "svn://svn.alliedmods.net/am/sourcemod/",
|
||||||
mode = "copy"
|
mode = "copy"
|
||||||
@ -144,10 +147,19 @@ def create_factory(sep):
|
|||||||
description = "packaging",
|
description = "packaging",
|
||||||
descriptionDone = "uploaded"
|
descriptionDone = "uploaded"
|
||||||
))
|
))
|
||||||
|
if os == "win32":
|
||||||
|
f1.addStep(ShellCommand(
|
||||||
|
haltOnFailure = 1,
|
||||||
|
locks = [pdb_lock],
|
||||||
|
name = "symstore",
|
||||||
|
command = ["tools" + sep + "buildbot" + sep + "symstore.pl"],
|
||||||
|
description = "symstore",
|
||||||
|
descriptionDone = "symstore"
|
||||||
|
))
|
||||||
return f1
|
return f1
|
||||||
|
|
||||||
facWin = create_factory("\\")
|
facWin = create_factory("\\", "win32")
|
||||||
facLinux = create_factory("/")
|
facLinux = create_factory("/", "linux")
|
||||||
|
|
||||||
buildLinuxStable = {
|
buildLinuxStable = {
|
||||||
'name': 'linux-stable',
|
'name': 'linux-stable',
|
||||||
|
@ -31,8 +31,7 @@ chdir(Build::PathFormat('../../OUTPUT/base'));
|
|||||||
|
|
||||||
my ($version);
|
my ($version);
|
||||||
|
|
||||||
$version = `cat ../../product.version`;
|
$version = Build::ProductVersion(Build::PathFormat('../../product.version'));
|
||||||
chomp $version;
|
|
||||||
$version .= '.' . Build::Revision('../..');
|
$version .= '.' . Build::Revision('../..');
|
||||||
|
|
||||||
my ($filename);
|
my ($filename);
|
||||||
|
44
tools/buildbot/symstore.pl
Normal file
44
tools/buildbot/symstore.pl
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
#!/usr/bin/perl
|
||||||
|
|
||||||
|
use File::Basename;
|
||||||
|
|
||||||
|
my ($myself, $path) = fileparse($0);
|
||||||
|
chdir($path);
|
||||||
|
|
||||||
|
require 'helpers.pm';
|
||||||
|
|
||||||
|
chdir('..');
|
||||||
|
chdir('..');
|
||||||
|
|
||||||
|
our $SSH = 'ssh -i ../../smpvkey';
|
||||||
|
|
||||||
|
open(PDBLOG, 'OUTPUT/pdblog.txt') or die "Could not open pdblog.txt: $!\n";
|
||||||
|
|
||||||
|
#Sync us up with the main symbol store
|
||||||
|
rsync('sourcemod@alliedmods.net:~/public_html/symbols/', '..\\..\\symstore');
|
||||||
|
|
||||||
|
#Get version info
|
||||||
|
my ($version);
|
||||||
|
$version = Build::ProductVersion(Build::PathFormat('product.version'));
|
||||||
|
$version .= '.' . Build::Revision('.');
|
||||||
|
|
||||||
|
my ($line);
|
||||||
|
while (<PDBLOG>)
|
||||||
|
{
|
||||||
|
$line = $_;
|
||||||
|
$line =~ s/\.pdb/\*/;
|
||||||
|
chomp $line;
|
||||||
|
Build::Command("symstore add /r /f \"$line\" /s ..\\..\\symstore /t \"SourceMod\" /v \"$version\" /c \"buildbot\"");
|
||||||
|
}
|
||||||
|
|
||||||
|
close(PDBLOG);
|
||||||
|
|
||||||
|
#Now that we're done, rsync back.
|
||||||
|
rsync('../../symstore/', 'sourcemod@alliedmods.net:~/public_html/symbols');
|
||||||
|
|
||||||
|
sub rsync
|
||||||
|
{
|
||||||
|
my ($from, $to) = (@_);
|
||||||
|
|
||||||
|
Build::Command('rsync -av --delete -e="' . $SSH . '" ' . $from . ' ' . $to);
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user