|
@@ -49,17 +49,28 @@ class Php {
|
|
|
}
|
|
|
|
|
|
runCommand("haxe", ["compile-php.hxml"].concat(prefix).concat(args));
|
|
|
- runCommand("php", [binDir + "/index.php"]);
|
|
|
+ runThroughPhpVersions(runCommand.bind("php", [binDir + "/index.php"]));
|
|
|
|
|
|
changeDirectory(sysDir);
|
|
|
if(isCi()) {
|
|
|
deleteDirectoryRecursively(binDir);
|
|
|
}
|
|
|
runCommand("haxe", ["compile-php.hxml"].concat(prefix));
|
|
|
- runCommand("php", ["bin/php/Main/index.php"]);
|
|
|
+ runThroughPhpVersions(runCommand.bind("php", ["bin/php/Main/index.php"]));
|
|
|
|
|
|
changeDirectory(miscPhpDir);
|
|
|
- runCommand("haxe", ["run.hxml"]);
|
|
|
+ runThroughPhpVersions(runCommand.bind("haxe", ["run.hxml"]));
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ static function runThroughPhpVersions(fn:()->Void) {
|
|
|
+ if(isCi() && systemName == "Linux") {
|
|
|
+ for(version in ['7.0', '7.1', '7.2', '7.3']) {
|
|
|
+ runCommand("phpenv", ["global", version]);
|
|
|
+ fn();
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ fn();
|
|
|
}
|
|
|
}
|
|
|
}
|