Add darwin support

This commit is contained in:
Graham Christensen 2017-10-29 17:14:06 -04:00
parent 0c7b2f252e
commit 1aa4ba0eec
No known key found for this signature in database
GPG key ID: ACA1C1D120C83D5C
3 changed files with 6 additions and 3 deletions

View file

@ -29,6 +29,9 @@ require_once __DIR__ . '/vendor/autoload.php';
use PhpAmqpLib\Connection\AMQPSSLConnection;
use PhpAmqpLib\Message\AMQPMessage;
define("NIX_SYSTEM", "x86_64-linux");
define("WORKING_DIR", "/home/grahamc/.nix-test");
function rabbitmq_conn() {
$connection = new AMQPSSLConnection(
'events.nix.gsc.io', 5671,

View file

@ -11,7 +11,7 @@ $channel->basic_qos(null, 1, true);
list($queueName, , ) = $channel->queue_declare('build-results',
false, true, false, false);
list($queueName, , ) = $channel->queue_declare('build-inputs-x86_64-linux',
list($queueName, , ) = $channel->queue_declare('build-inputs-' . NIX_SYSTEM,
false, true, false, false);
$channel->queue_bind($queueName, 'build-jobs');
@ -21,7 +21,7 @@ function runner($msg) {
$body = json_decode($msg->body);
$in = $body->payload;
$co = new GHE\Checkout("/home/grahamc/.nix-test", "builder");
$co = new GHE\Checkout(WORKING_DIR, "builder");
$pname = $co->checkOutRef($in->repository->full_name,
$in->repository->clone_url,
$in->issue->number,

View file

@ -81,7 +81,7 @@ function runner($msg) {
$against_name = "origin/" . $in->pull_request->base->ref;
echo "Building against $against_name\n";
$co = new GHE\Checkout("/home/grahamc/.nix-test", "mr-est");
$co = new GHE\Checkout(WORKING_DIR, "mr-est");
$pname = $co->checkOutRef($in->repository->full_name,
$in->repository->clone_url,
$in->number,