committed by
GitHub
17 changed files with 14179 additions and 240 deletions
@ -0,0 +1,148 @@ |
|||
{ |
|||
"$schema": "http://json-schema.org/draft-04/schema#", |
|||
"title": "Build Schema", |
|||
"$ref": "#/definitions/build", |
|||
"definitions": { |
|||
"build": { |
|||
"type": "object", |
|||
"properties": { |
|||
"Configuration": { |
|||
"type": "string", |
|||
"description": "configuration" |
|||
}, |
|||
"Continue": { |
|||
"type": "boolean", |
|||
"description": "Indicates to continue a previously failed build attempt" |
|||
}, |
|||
"ForceNugetVersion": { |
|||
"type": "string", |
|||
"description": "force-nuget-version" |
|||
}, |
|||
"Help": { |
|||
"type": "boolean", |
|||
"description": "Shows the help text for this build assembly" |
|||
}, |
|||
"Host": { |
|||
"type": "string", |
|||
"description": "Host for execution. Default is 'automatic'", |
|||
"enum": [ |
|||
"AppVeyor", |
|||
"AzurePipelines", |
|||
"Bamboo", |
|||
"Bitbucket", |
|||
"Bitrise", |
|||
"GitHubActions", |
|||
"GitLab", |
|||
"Jenkins", |
|||
"Rider", |
|||
"SpaceAutomation", |
|||
"TeamCity", |
|||
"Terminal", |
|||
"TravisCI", |
|||
"VisualStudio", |
|||
"VSCode" |
|||
] |
|||
}, |
|||
"NoLogo": { |
|||
"type": "boolean", |
|||
"description": "Disables displaying the NUKE logo" |
|||
}, |
|||
"Partition": { |
|||
"type": "string", |
|||
"description": "Partition to use on CI" |
|||
}, |
|||
"Plan": { |
|||
"type": "boolean", |
|||
"description": "Shows the execution plan (HTML)" |
|||
}, |
|||
"Profile": { |
|||
"type": "array", |
|||
"description": "Defines the profiles to load", |
|||
"items": { |
|||
"type": "string" |
|||
} |
|||
}, |
|||
"Root": { |
|||
"type": "string", |
|||
"description": "Root directory during build execution" |
|||
}, |
|||
"Skip": { |
|||
"type": "array", |
|||
"description": "List of targets to be skipped. Empty list skips all dependencies", |
|||
"items": { |
|||
"type": "string", |
|||
"enum": [ |
|||
"CiAzureLinux", |
|||
"CiAzureOSX", |
|||
"CiAzureWindows", |
|||
"Clean", |
|||
"Compile", |
|||
"CompileHtmlPreviewer", |
|||
"CompileNative", |
|||
"CreateIntermediateNugetPackages", |
|||
"CreateNugetPackages", |
|||
"GenerateCppHeaders", |
|||
"Package", |
|||
"RunCoreLibsTests", |
|||
"RunDesignerTests", |
|||
"RunHtmlPreviewerTests", |
|||
"RunLeakTests", |
|||
"RunRenderTests", |
|||
"RunTests", |
|||
"ZipFiles" |
|||
] |
|||
} |
|||
}, |
|||
"SkipPreviewer": { |
|||
"type": "boolean", |
|||
"description": "skip-previewer" |
|||
}, |
|||
"SkipTests": { |
|||
"type": "boolean", |
|||
"description": "skip-tests" |
|||
}, |
|||
"Solution": { |
|||
"type": "string", |
|||
"description": "Path to a solution file that is automatically loaded. Default is Avalonia.sln" |
|||
}, |
|||
"Target": { |
|||
"type": "array", |
|||
"description": "List of targets to be invoked. Default is '{default_target}'", |
|||
"items": { |
|||
"type": "string", |
|||
"enum": [ |
|||
"CiAzureLinux", |
|||
"CiAzureOSX", |
|||
"CiAzureWindows", |
|||
"Clean", |
|||
"Compile", |
|||
"CompileHtmlPreviewer", |
|||
"CompileNative", |
|||
"CreateIntermediateNugetPackages", |
|||
"CreateNugetPackages", |
|||
"GenerateCppHeaders", |
|||
"Package", |
|||
"RunCoreLibsTests", |
|||
"RunDesignerTests", |
|||
"RunHtmlPreviewerTests", |
|||
"RunLeakTests", |
|||
"RunRenderTests", |
|||
"RunTests", |
|||
"ZipFiles" |
|||
] |
|||
} |
|||
}, |
|||
"Verbosity": { |
|||
"type": "string", |
|||
"description": "Logging verbosity during build execution. Default is 'Normal'", |
|||
"enum": [ |
|||
"Minimal", |
|||
"Normal", |
|||
"Quiet", |
|||
"Verbose" |
|||
] |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,4 @@ |
|||
{ |
|||
"$schema": "./build.schema.json", |
|||
"Solution": "" |
|||
} |
|||
@ -0,0 +1,7 @@ |
|||
:; set -eo pipefail |
|||
:; SCRIPT_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd) |
|||
:; ${SCRIPT_DIR}/build.sh "$@" |
|||
:; exit $? |
|||
|
|||
@ECHO OFF |
|||
powershell -ExecutionPolicy ByPass -NoProfile -File "%~dp0build.ps1" %* |
|||
@ -1,5 +1,5 @@ |
|||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|||
<ItemGroup> |
|||
<PackageReference Include="JetBrains.dotMemoryUnit" Version="3.0.20171219.105559" /> |
|||
<PackageReference Include="JetBrains.DotMemoryUnit" Version="3.2.20220510" /> |
|||
</ItemGroup> |
|||
</Project> |
|||
|
|||
@ -0,0 +1,55 @@ |
|||
using System.Globalization; |
|||
using Nuke.Common.Tools.DotNet; |
|||
|
|||
public class DotNetConfigHelper |
|||
{ |
|||
public DotNetBuildSettings Build; |
|||
public DotNetPackSettings Pack; |
|||
public DotNetTestSettings Test; |
|||
|
|||
public DotNetConfigHelper(DotNetBuildSettings s) |
|||
{ |
|||
Build = s; |
|||
} |
|||
|
|||
public DotNetConfigHelper(DotNetPackSettings s) |
|||
{ |
|||
Pack = s; |
|||
} |
|||
|
|||
public DotNetConfigHelper(DotNetTestSettings s) |
|||
{ |
|||
Test = s; |
|||
} |
|||
|
|||
public DotNetConfigHelper AddProperty(string key, bool value) => |
|||
AddProperty(key, value.ToString(CultureInfo.InvariantCulture).ToLowerInvariant()); |
|||
public DotNetConfigHelper AddProperty(string key, string value) |
|||
{ |
|||
Build = Build?.AddProperty(key, value); |
|||
Pack = Pack?.AddProperty(key, value); |
|||
Test = Test?.AddProperty(key, value); |
|||
|
|||
return this; |
|||
} |
|||
|
|||
public DotNetConfigHelper SetConfiguration(string configuration) |
|||
{ |
|||
Build = Build?.SetConfiguration(configuration); |
|||
Pack = Pack?.SetConfiguration(configuration); |
|||
Test = Test?.SetConfiguration(configuration); |
|||
return this; |
|||
} |
|||
|
|||
public DotNetConfigHelper SetVerbosity(DotNetVerbosity verbosity) |
|||
{ |
|||
Build = Build?.SetVerbosity(verbosity); |
|||
Pack = Pack?.SetVerbosity(verbosity); |
|||
Test = Test?.SetVerbosity(verbosity); |
|||
return this; |
|||
} |
|||
|
|||
public static implicit operator DotNetConfigHelper(DotNetBuildSettings s) => new DotNetConfigHelper(s); |
|||
public static implicit operator DotNetConfigHelper(DotNetPackSettings s) => new DotNetConfigHelper(s); |
|||
public static implicit operator DotNetConfigHelper(DotNetTestSettings s) => new DotNetConfigHelper(s); |
|||
} |
|||
@ -1,14 +0,0 @@ |
|||
using System.IO; |
|||
using MicroCom.CodeGenerator; |
|||
using Nuke.Common; |
|||
|
|||
partial class Build : NukeBuild |
|||
{ |
|||
Target GenerateCppHeaders => _ => _.Executes(() => |
|||
{ |
|||
var file = MicroComCodeGenerator.Parse( |
|||
File.ReadAllText(RootDirectory / "src" / "Avalonia.Native" / "avn.idl")); |
|||
File.WriteAllText(RootDirectory / "native" / "Avalonia.Native" / "inc" / "avalonia-native.h", |
|||
file.GenerateCppHeader()); |
|||
}); |
|||
} |
|||
File diff suppressed because it is too large
File diff suppressed because it is too large
Loading…
Reference in new issue