##// END OF EJS Templates
jobs.ini: add qt5
jobs.ini: add qt5

File last commit:

r1203:5bd91523463d
r2061:7afc2ad4264e
Show More
build.pl
96 lines | 2.1 KiB | text/plain | PerlLexer
Jani Honkonen
First draft of new (universal) build script(s) for bamboo
r1132 use File::Basename;
use feature "switch";
Jani Honkonen
Move scripts to tools folder
r1203 use lib 'tools';
Jani Honkonen
Add a script for running tests
r1134 use Jobs;
Jani Honkonen
First draft of new (universal) build script(s) for bamboo
r1132
# read command line params
my $jobname = shift;
Jani Honkonen
Add a script for running tests
r1134 # get script directory
my $scriptdir = File::Basename::dirname($0);
Jani Honkonen
build.pl: remove prefix from from job name
r1133
Jani Honkonen
First draft of new (universal) build script(s) for bamboo
r1132 # read ini file
my $inifile = $scriptdir . "/jobs.ini";
Jani Honkonen
Add a script for running tests
r1134 my %job = Jobs::get($inifile, $jobname);
Jani Honkonen
First draft of new (universal) build script(s) for bamboo
r1132
# examine the platform
Jani Honkonen
Add a script for running tests
r1134 given ($job{'Platform'}) {
Jani Honkonen
Adding mac support for Bamboo build script
r1140
Jani Honkonen
First draft of new (universal) build script(s) for bamboo
r1132 when ("Win7") {
Jani Honkonen
build.pl: path fix for windows builds
r1143
$scriptdir =~ s/\//\\/g; # replace / -> \
Jani Honkonen
Adding mac support for Bamboo build script
r1140
Jani Honkonen
First draft of new (universal) build script(s) for bamboo
r1132 # construct a build command
Jani Honkonen
Add a script for running tests
r1134 if ($job{'ToolChain'} eq "mingw") {
Jani Honkonen
Adding mac support for Bamboo build script
r1140 run($scriptdir . "\\build_win_mingw.bat", $job{'QtDir'}, $job{'Config'}, $job{'MinGWDir'});
Jani Honkonen
First draft of new (universal) build script(s) for bamboo
r1132 }
Jani Honkonen
Adding mac support for Bamboo build script
r1140 elsif ($job{'ToolChain'} eq "vs2005") {
run($scriptdir . "\\build_win_vs2005.bat", $job{'QtDir'}, $job{'Config'});
Jani Honkonen
First draft of new (universal) build script(s) for bamboo
r1132 }
Jani Honkonen
Adding mac support for Bamboo build script
r1140 elsif ($job{'ToolChain'} eq "vs2008") {
run($scriptdir . "\\build_win_vs2008.bat", $job{'QtDir'}, $job{'Config'});
Jani Honkonen
First draft of new (universal) build script(s) for bamboo
r1132 }
Jani Honkonen
Adding mac support for Bamboo build script
r1140 elsif ($job{'ToolChain'} eq "vs2010") {
run($scriptdir . "\\build_win_vs2010.bat", $job{'QtDir'}, $job{'Config'});
}
Jani Honkonen
Add vs2010 64bit support for Bamboo builds
r1156 elsif ($job{'ToolChain'} eq "vs2010-64bit") {
run($scriptdir . "\\build_win_vs2010_64bit.bat", $job{'QtDir'}, $job{'Config'});
}
Jani Honkonen
Adding mac support for Bamboo build script
r1140 else {
die "Unknown toolchain!";
Jani Honkonen
First draft of new (universal) build script(s) for bamboo
r1132 }
}
Jani Honkonen
Adding mac support for Bamboo build script
r1140
when ("Mac") {
# setup build environment
$ENV{'QTDIR'} = $job{'QtDir'};
$ENV{'PATH'} = $job{'QtDir'} . "/bin:" . $ENV{'PATH'};
# run qmake
my $cmd;
if ($job{'ToolChain'} eq "clang") {
run("qmake -r -spec unsupported/macx-clang CONFIG+=" . $job{'Config'});
}
elsif ($job{'ToolChain'} eq "gcc") {
run("qmake -r CONFIG+=" . $job{'Config'});
}
else {
die "Unknown toolchain!";
}
# run make
run("make");
}
Jani Honkonen
build.pl: adding linux stuff
r1153 when ("Linux") {
# setup build environment
$ENV{'QTDIR'} = $job{'QtDir'};
$ENV{'PATH'} = $job{'QtDir'} . "/bin:" . $ENV{'PATH'};
# run qmake
my $cmd;
if ($job{'ToolChain'} eq "gcc") {
run("qmake -r CONFIG+=" . $job{'Config'});
}
else {
die "Unknown toolchain!";
}
# run make
Jani Honkonen
Add vs2010 64bit support for Bamboo builds
r1156 run("make -j 4");
Jani Honkonen
build.pl: adding linux stuff
r1153 }
Jani Honkonen
First draft of new (universal) build script(s) for bamboo
r1132 default {
Jani Honkonen
Add a script for running tests
r1134 die "Unknown platform " . $job{'Platform'};
Jani Honkonen
First draft of new (universal) build script(s) for bamboo
r1132 }
Jani Honkonen
Adding mac support for Bamboo build script
r1140 }
sub run {
my $cmd;
foreach (@_) {
$cmd .= "$_ ";
}
print "running : $cmd\n";
system(@_) == 0 or die "system \"$cmd\" failed: $?";
Jani Honkonen
First draft of new (universal) build script(s) for bamboo
r1132 }