diff options
author | MosesAdmin <moses-support-owner@mit.edu> | 2015-12-14 02:18:09 +0300 |
---|---|---|
committer | MosesAdmin <moses-support-owner@mit.edu> | 2015-12-14 02:18:09 +0300 |
commit | 8c7cbb095c1891d428f9b98f71d2a5ef1843ce24 (patch) | |
tree | d87dc5f24e4685f7a849ecc2df584601dd962b9a /cruise-control | |
parent | b825817f1d57c0f1f0b8c8b20c6def770851b612 (diff) | |
parent | dfcdb43c28b8582a51f1f5ef87af4c4cfe140a78 (diff) |
build with different configurations
Diffstat (limited to 'cruise-control')
-rw-r--r-- | cruise-control/config.ems | 4 | ||||
-rwxr-xr-x | cruise-control/create-binary.perl | 55 | ||||
-rwxr-xr-x | cruise-control/test_all_new_commits.sh | 3 | ||||
-rw-r--r-- | cruise-control/web/html_templates.php | 2 | ||||
-rw-r--r-- | cruise-control/web/log_wrapper.php | 12 |
5 files changed, 67 insertions, 9 deletions
diff --git a/cruise-control/config.ems b/cruise-control/config.ems index 58e8ad94c..97eb4bd30 100644 --- a/cruise-control/config.ems +++ b/cruise-control/config.ems @@ -139,7 +139,7 @@ order = 5 # kenlm, also set type to 8 #lm-binarizer = $moses-src-dir/kenlm/build_binary -#type = 8 +type = 8 ### script to create quantized language model format (irstlm) # (default: no quantization) @@ -159,6 +159,8 @@ order = 5 # #get-corpus-script = "" +type = 8 + ### raw corpus (untokenized) # raw-corpus = $toy-data/nc-5k.$output-extension diff --git a/cruise-control/create-binary.perl b/cruise-control/create-binary.perl new file mode 100755 index 000000000..b5b9009fc --- /dev/null +++ b/cruise-control/create-binary.perl @@ -0,0 +1,55 @@ +#!/usr/bin/env perl + +use strict; + +my $HOME = $ENV{"HOME"}; +my $HOSTNAME = "s0565741\@thor.inf.ed.ac.uk"; + +my $sriPath = $ARGV[0]; + +my $cmd; + +# what machine +my $machine = `uname`; +chomp($machine); + +# COMPILE +$cmd = "git checkout master && git pull"; +print STDERR "Executing: $cmd \n"; +system($cmd); + +$cmd = "make -f contrib/Makefiles/install-dependencies.gmake && ./compile.sh --without-tcmalloc"; +print STDERR "Executing: $cmd \n"; +system($cmd); + +#ZIP +if ($machine eq "Darwin") { + $machine = "mac"; +} + +$cmd = "mkdir -p mt-tools/moses && mv bin lib mt-tools/moses"; +print STDERR "Executing: $cmd \n"; +system($cmd); + +$cmd = "tar -zcvf $machine.tgz mt-tools"; +print STDERR "Executing: $cmd \n"; +system($cmd); + +# UPLOAD +my $date = `date "+%F"`; +chomp($date); + +my $targetDir = "/fs/thor1/hieu/binaries/$date/"; +print STDERR "Directory=$targetDir\n"; + +$cmd = "ssh $HOSTNAME mkdir -p $targetDir"; +print STDERR "Executing: $cmd \n"; +system($cmd); + +$cmd = "rsync -rv --delete $machine.tgz $HOSTNAME:$targetDir"; +print STDERR "Executing: $cmd \n"; +system($cmd); + +$cmd = "rm $machine.tgz"; +print STDERR "Executing: $cmd \n"; +system($cmd); diff --git a/cruise-control/test_all_new_commits.sh b/cruise-control/test_all_new_commits.sh index 0bc2c04a0..29c207091 100755 --- a/cruise-control/test_all_new_commits.sh +++ b/cruise-control/test_all_new_commits.sh @@ -117,9 +117,10 @@ function run_single_test () { cd .. # test build with different configurations + echo "## test build with different configurations" >> $longlog for configArgs in "${ALTERNATIVE_CONFIGURE_ARGS[@]}" do - echo $configArgs + ./bjam clean $configArgs >> $longlog 2>&1 || warn "bjam clean failed, suspicious" done echo "## ./bjam clean" >> $longlog diff --git a/cruise-control/web/html_templates.php b/cruise-control/web/html_templates.php index 83f6cc879..b7346914c 100644 --- a/cruise-control/web/html_templates.php +++ b/cruise-control/web/html_templates.php @@ -8,7 +8,7 @@ function show_header($title) <META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html;charset=utf-8\"> <title>$title</title> </head><body>"; -} +} function show_heading($text, $size = 1) { diff --git a/cruise-control/web/log_wrapper.php b/cruise-control/web/log_wrapper.php index af03db016..9fcf4db00 100644 --- a/cruise-control/web/log_wrapper.php +++ b/cruise-control/web/log_wrapper.php @@ -18,7 +18,7 @@ function get_all_branch_names() } class Branch -{ +{ public function __construct($name) { $this->name = $name; @@ -72,7 +72,7 @@ class Commit while (($line = fgets($log_hdl)) !== false) { if (preg_match('/tests passed/', $line)) { $this->passed_percent = substr($line, 0, strpos('%', $line)); - } + } else if (preg_match('/INVESTIGATE THESE FAILED TESTS/', $line)) { $this->failed_tests = substr($line, 39); } @@ -113,7 +113,7 @@ class Commit return file_exists(StaticData::logs_path . "/" . substr($this->name, 0, 1) . "/" . $this->name . ".OK"); } } - + public function get_status() { return $this->was_tested() @@ -157,12 +157,12 @@ class Commit public function get_log_file() { - return "show_commit.php?commit_id=$this->name&type=log"; + return "show_commit.php?commit_id=$this->name&type=log"; } public function get_info_file() { - return "show_commit.php?commit_id=$this->name&type=info"; + return "show_commit.php?commit_id=$this->name&type=info"; } private function open_log() @@ -182,7 +182,7 @@ class Commit private $message; private $author; private $timestamp; - + } ?> |