mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-05 07:29:40 +00:00
Rebuilt how AI Studio knows what a model can do (#960)
Build and Release / Sync Flatpak repo (push) Blocked by required conditions
Build and Release / Verify (push) Waiting to run
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-apple-darwin, osx-arm64, macos-latest, aarch64-apple-darwin, dmg,app,updater, dmg) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-pc-windows-msvc.exe, win-arm64, windows-latest, aarch64-pc-windows-msvc, nsis,updater, nsis) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-unknown-linux-gnu, linux-arm64, ubuntu-22.04-arm, aarch64-unknown-linux-gnu, appimage,updater, appimage) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-apple-darwin, osx-x64, macos-latest, x86_64-apple-darwin, dmg,app,updater, dmg) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-pc-windows-msvc.exe, win-x64, windows-latest, x86_64-pc-windows-msvc, nsis,updater, nsis) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-unknown-linux-gnu, linux-x64, ubuntu-22.04, x86_64-unknown-linux-gnu, appimage,updater, appimage) (push) Blocked by required conditions
Build and Release / Prepare & create release (push) Blocked by required conditions
Build and Release / Publish release (push) Blocked by required conditions
Build and Release / Determine run mode (push) Waiting to run
Build and Release / Collect Flatpak artifacts (push) Blocked by required conditions
Build and Release / Sync Flatpak repo (push) Blocked by required conditions
Build and Release / Verify (push) Waiting to run
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-apple-darwin, osx-arm64, macos-latest, aarch64-apple-darwin, dmg,app,updater, dmg) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-pc-windows-msvc.exe, win-arm64, windows-latest, aarch64-pc-windows-msvc, nsis,updater, nsis) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-unknown-linux-gnu, linux-arm64, ubuntu-22.04-arm, aarch64-unknown-linux-gnu, appimage,updater, appimage) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-apple-darwin, osx-x64, macos-latest, x86_64-apple-darwin, dmg,app,updater, dmg) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-pc-windows-msvc.exe, win-x64, windows-latest, x86_64-pc-windows-msvc, nsis,updater, nsis) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-unknown-linux-gnu, linux-x64, ubuntu-22.04, x86_64-unknown-linux-gnu, appimage,updater, appimage) (push) Blocked by required conditions
Build and Release / Prepare & create release (push) Blocked by required conditions
Build and Release / Publish release (push) Blocked by required conditions
Build and Release / Determine run mode (push) Waiting to run
Build and Release / Collect Flatpak artifacts (push) Blocked by required conditions
This commit is contained in:
1 parent
d21e09dd1e
commit
d85b4e71b6
287 files changed
+18341
-3677
No files matched your search
@@ -0,0 +1,62 @@
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace Build.Tools;
|
||||
|
||||
/// <summary>
|
||||
/// Runs one external tool and lets it write straight to the terminal.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The output is deliberately not captured. A gate which swallows the output of a failing test run
|
||||
/// and then prints "failed" leaves the person who has to fix it with nothing to go on, while the
|
||||
/// tools it runs already say everything worth saying -- which test, which line, which lint.
|
||||
/// </remarks>
|
||||
public static class CommandRunner
|
||||
{
|
||||
/// <summary>
|
||||
/// What a tool which could not be started at all reports.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Anything but zero counts as a failure, so the exact number matters only in that it is not
|
||||
/// one a tool would plausibly return itself.
|
||||
/// </remarks>
|
||||
public const int COULD_NOT_START = 127;
|
||||
|
||||
/// <summary>
|
||||
/// Runs a tool and waits for it.
|
||||
/// </summary>
|
||||
/// <param name="workingDirectory">Where the tool should run.</param>
|
||||
/// <param name="fileName">The tool, as it is called on the PATH.</param>
|
||||
/// <param name="arguments">What to pass it.</param>
|
||||
/// <returns>The exit code of the tool, or COULD_NOT_START when it never ran.</returns>
|
||||
public static async Task<int> RunAsync(string workingDirectory, string fileName, string arguments)
|
||||
{
|
||||
Console.WriteLine($"- Running '{fileName} {arguments}' in '{workingDirectory}' ...");
|
||||
var startInfo = new ProcessStartInfo
|
||||
{
|
||||
FileName = fileName,
|
||||
Arguments = arguments,
|
||||
WorkingDirectory = workingDirectory,
|
||||
UseShellExecute = false,
|
||||
};
|
||||
|
||||
try
|
||||
{
|
||||
using var process = Process.Start(startInfo);
|
||||
if (process is null)
|
||||
{
|
||||
Console.WriteLine($"- Error: '{fileName}' did not start, and the system did not say why.");
|
||||
return COULD_NOT_START;
|
||||
}
|
||||
|
||||
await process.WaitForExitAsync();
|
||||
return process.ExitCode;
|
||||
}
|
||||
catch (Win32Exception exception)
|
||||
{
|
||||
Console.WriteLine($"- Error: '{fileName}' could not be started: {exception.Message}");
|
||||
Console.WriteLine($" Is '{fileName}' installed and on the PATH?");
|
||||
return COULD_NOT_START;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -34,6 +34,28 @@ public static class Environment
|
||||
return Path.GetFullPath(directory);
|
||||
}
|
||||
|
||||
public static string GetTestsDirectory()
|
||||
{
|
||||
var currentDirectory = Directory.GetCurrentDirectory();
|
||||
var directory = Path.Combine(currentDirectory, "..", "Tests");
|
||||
return Path.GetFullPath(directory);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The root of the git repository, which is what a path in a report is written relative to.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// GitHub resolves the file of an annotation against the checkout, not against wherever a tool
|
||||
/// happened to run. An absolute path of somebody's machine would therefore land the annotation
|
||||
/// nowhere, without saying so.
|
||||
/// </remarks>
|
||||
public static string GetRepositoryDirectory()
|
||||
{
|
||||
var currentDirectory = Directory.GetCurrentDirectory();
|
||||
var directory = Path.Combine(currentDirectory, "..", "..");
|
||||
return Path.GetFullPath(directory);
|
||||
}
|
||||
|
||||
public static string GetRustRuntimeDirectory()
|
||||
{
|
||||
var currentDirectory = Directory.GetCurrentDirectory();
|
||||
|
||||
Reference in new issue
Block a user