StartProcess did not stop the build on failures
This commit is contained in:
Родитель
ef480400a4
Коммит
09a36f3082
|
@ -85,7 +85,7 @@ Task ("externals-genapi")
|
|||
// generate the PCL
|
||||
FilePath input = "binding/SkiaSharp.Generic/bin/Release/SkiaSharp.dll";
|
||||
var libPath = "/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/4.5/,.";
|
||||
StartProcess (GenApiToolPath, new ProcessSettings {
|
||||
RunProcess (GenApiToolPath, new ProcessSettings {
|
||||
Arguments = string.Format("-libPath:{2} -out \"{0}\" \"{1}\"", input.GetFilename () + ".cs", input.GetFilename (), libPath),
|
||||
WorkingDirectory = input.GetDirectory ().FullPath,
|
||||
});
|
||||
|
@ -350,7 +350,7 @@ Task ("externals-android")
|
|||
var ANDROID_NDK_HOME = EnvironmentVariable ("ANDROID_NDK_HOME") ?? EnvironmentVariable ("HOME") + "/Library/Developer/Xamarin/android-ndk";
|
||||
|
||||
var buildArch = new Action<string, string> ((arch, folder) => {
|
||||
StartProcess (SKIA_PATH.CombineWithFilePath ("platform_tools/android/bin/android_ninja").FullPath, new ProcessSettings {
|
||||
RunProcess (SKIA_PATH.CombineWithFilePath ("platform_tools/android/bin/android_ninja").FullPath, new ProcessSettings {
|
||||
Arguments = "-d " + arch + " skia_lib pdf sfntly icuuc svg xml",
|
||||
WorkingDirectory = SKIA_PATH.FullPath,
|
||||
});
|
||||
|
@ -375,7 +375,7 @@ Task ("externals-android")
|
|||
buildArch ("arm64", "arm64-v8a");
|
||||
|
||||
var ndkbuild = MakeAbsolute (Directory (ANDROID_NDK_HOME)).CombineWithFilePath ("ndk-build").FullPath;
|
||||
StartProcess (ndkbuild, new ProcessSettings {
|
||||
RunProcess (ndkbuild, new ProcessSettings {
|
||||
Arguments = "",
|
||||
WorkingDirectory = ROOT_PATH.Combine ("native-builds/libSkiaSharp_android").FullPath,
|
||||
});
|
||||
|
|
|
@ -31,16 +31,20 @@ var PackageNuGet = new Action<FilePath, DirectoryPath> ((nuspecPath, outputPath)
|
|||
});
|
||||
});
|
||||
|
||||
var RunProcess = new Action<FilePath, ProcessSettings> ((process, settings) =>
|
||||
{
|
||||
var result = StartProcess (process, settings);
|
||||
if (result != 0) {
|
||||
throw new Exception ("Process '" + process + "' failed with error: " + result);
|
||||
}
|
||||
});
|
||||
|
||||
var RunTests = new Action<FilePath, bool> ((testAssembly, is64) =>
|
||||
{
|
||||
var dir = testAssembly.GetDirectory ();
|
||||
var result = StartProcess (is64 ? TestConsoleToolPath_x64 : TestConsoleToolPath_x86, new ProcessSettings {
|
||||
RunProcess (is64 ? TestConsoleToolPath_x64 : TestConsoleToolPath_x86, new ProcessSettings {
|
||||
Arguments = string.Format ("\"{0}\"", testAssembly),
|
||||
});
|
||||
|
||||
if (result != 0) {
|
||||
throw new Exception ("Test runner failed with error: " + result);
|
||||
}
|
||||
});
|
||||
|
||||
var RunMdocUpdate = new Action<FilePath[], DirectoryPath, DirectoryPath[]> ((assemblies, docsRoot, refs) =>
|
||||
|
@ -50,14 +54,14 @@ var RunMdocUpdate = new Action<FilePath[], DirectoryPath, DirectoryPath[]> ((ass
|
|||
refArgs = string.Join (" ", refs.Select (r => string.Format ("--lib=\"{0}\"", r)));
|
||||
}
|
||||
var assemblyArgs = string.Join (" ", assemblies.Select (a => string.Format ("\"{0}\"", a)));
|
||||
StartProcess (MDocPath, new ProcessSettings {
|
||||
RunProcess (MDocPath, new ProcessSettings {
|
||||
Arguments = string.Format ("update --preserve --out=\"{0}\" {1} {2}", docsRoot, refArgs, assemblyArgs),
|
||||
});
|
||||
});
|
||||
|
||||
var RunMdocMSXml = new Action<DirectoryPath, DirectoryPath> ((docsRoot, outputDir) =>
|
||||
{
|
||||
StartProcess (MDocPath, new ProcessSettings {
|
||||
RunProcess (MDocPath, new ProcessSettings {
|
||||
Arguments = string.Format ("export-msxdoc \"{0}\"", MakeAbsolute (docsRoot)),
|
||||
WorkingDirectory = MakeAbsolute (outputDir).ToString ()
|
||||
});
|
||||
|
@ -65,7 +69,7 @@ var RunMdocMSXml = new Action<DirectoryPath, DirectoryPath> ((docsRoot, outputDi
|
|||
|
||||
var RunMdocAssemble = new Action<DirectoryPath, FilePath> ((docsRoot, output) =>
|
||||
{
|
||||
StartProcess (MDocPath, new ProcessSettings {
|
||||
RunProcess (MDocPath, new ProcessSettings {
|
||||
Arguments = string.Format ("assemble --out=\"{0}\" \"{1}\"", output, docsRoot),
|
||||
});
|
||||
});
|
||||
|
|
|
@ -8,13 +8,10 @@ var RunGyp = new Action<string, string> ((defines, generators) =>
|
|||
Information ("\tGYP_GENERATORS = " + EnvironmentVariable ("GYP_GENERATORS"));
|
||||
Information ("\tGYP_DEFINES = " + EnvironmentVariable ("GYP_DEFINES"));
|
||||
|
||||
var result = StartProcess ("python", new ProcessSettings {
|
||||
RunProcess ("python", new ProcessSettings {
|
||||
Arguments = SKIA_PATH.CombineWithFilePath("bin/sync-and-gyp").FullPath,
|
||||
WorkingDirectory = SKIA_PATH.FullPath,
|
||||
});
|
||||
if (result != 0) {
|
||||
throw new Exception ("sync-and-gyp failed with error: " + result);
|
||||
}
|
||||
});
|
||||
|
||||
var RunInstallNameTool = new Action<DirectoryPath, string, string, FilePath> ((directory, oldName, newName, library) =>
|
||||
|
@ -23,7 +20,7 @@ var RunInstallNameTool = new Action<DirectoryPath, string, string, FilePath> ((d
|
|||
throw new InvalidOperationException ("install_name_tool is only available on Unix.");
|
||||
}
|
||||
|
||||
StartProcess ("install_name_tool", new ProcessSettings {
|
||||
RunProcess ("install_name_tool", new ProcessSettings {
|
||||
Arguments = string.Format("-change {0} {1} \"{2}\"", oldName, newName, library),
|
||||
WorkingDirectory = directory,
|
||||
});
|
||||
|
@ -41,7 +38,7 @@ var RunLipo = new Action<DirectoryPath, FilePath, FilePath[]> ((directory, outpu
|
|||
}
|
||||
|
||||
var inputString = string.Join(" ", inputs.Select (i => string.Format ("\"{0}\"", i)));
|
||||
StartProcess ("lipo", new ProcessSettings {
|
||||
RunProcess ("lipo", new ProcessSettings {
|
||||
Arguments = string.Format("-create -output \"{0}\" {1}", output, inputString),
|
||||
WorkingDirectory = directory,
|
||||
});
|
||||
|
|
Загрузка…
Ссылка в новой задаче