Skip to content

Commit b6d876d

Browse files
committed
Update
1 parent 83b7140 commit b6d876d

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

.github/nightly.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,20 @@ function printMutex(string $result): void {
66
flock(STDOUT, LOCK_UN);
77
}
88

9-
function e(string $cmd): string {
9+
function e(string $cmd, string $extra = ''): string {
1010
exec("bash -c ".escapeshellarg("$cmd 2>&1"), $result, $code);
1111
$result = implode("\n", $result);
1212
if ($code) {
13-
printMutex("An error occurred while executing $cmd (status $code): $result");
13+
printMutex("An error occurred while executing $cmd (status $code, extra info $extra): $result");
1414
die(1);
1515
}
1616
return $result;
1717
}
1818

19+
$parallel = (int) ($argv[1] ?? 0);
20+
$parallel = $parallel ?: ((int)`nproc`);
21+
$parallel = $parallel ?: 8;
22+
1923
$repos = [];
2024

2125
$repos["phpunit"] = [
@@ -84,7 +88,6 @@ function (): void {
8488
$c = file_get_contents("src/Symfony/Component/VarDumper/Tests/Caster/FFICasterTest.php");
8589
$c = str_replace("*/\n public function testCastNonTrailingCharPointer()", "* @group skip\n */\n public function testCastNonTrailingCharPointer()", $c);
8690
file_put_contents("src/Symfony/Component/VarDumper/Tests/Caster/FFICasterTest.php", $c);
87-
$c = file_get_contents("src/Symfony/Component/VarDumper/Tests/Caster/FFICasterTest.php"); $c = str_replace("*/\n public function testCastNonTrailingCharPointer()", "* @group skip\n */\n public function testCastNonTrailingCharPointer()", $c); file_put_contents("src/Symfony/Component/VarDumper/Tests/Caster/FFICasterTest.php", $c);
8891
},
8992
function (): iterable {
9093
$it = new RecursiveDirectoryIterator("src/Symfony");
@@ -120,7 +123,7 @@ function (): iterable {
120123
e("git clone $repo $branch --depth 1 $dir");
121124
chdir($dir);
122125
$rev = e("git rev-parse HEAD");
123-
e("composer i --ignore-platform-reqs");
126+
e("composer i --ignore-platform-reqs", $dir);
124127
if ($prepare) {
125128
$prepare();
126129
}

0 commit comments

Comments
 (0)