Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .nuke

This file was deleted.

132 changes: 132 additions & 0 deletions .nuke/build.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"definitions": {
"Host": {
"type": "string",
"enum": [
"AppVeyor",
"AzurePipelines",
"Bamboo",
"Bitbucket",
"Bitrise",
"GitHubActions",
"GitLab",
"Jenkins",
"Rider",
"SpaceAutomation",
"TeamCity",
"Terminal",
"TravisCI",
"VisualStudio",
"VSCode"
]
},
"ExecutableTarget": {
"type": "string",
"enum": [
"Build",
"Clean",
"Compile",
"DistBuild",
"Pack",
"Push",
"Restore",
"UploadArtifacts"
]
},
"Verbosity": {
"type": "string",
"description": "",
"enum": [
"Verbose",
"Normal",
"Minimal",
"Quiet"
]
},
"NukeBuild": {
"properties": {
"Continue": {
"type": "boolean",
"description": "Indicates to continue a previously failed build attempt"
},
"Help": {
"type": "boolean",
"description": "Shows the help text for this build assembly"
},
"Host": {
"description": "Host for execution. Default is 'automatic'",
"$ref": "#/definitions/Host"
},
"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": {
"$ref": "#/definitions/ExecutableTarget"
}
},
"Target": {
"type": "array",
"description": "List of targets to be invoked. Default is '{default_target}'",
"items": {
"$ref": "#/definitions/ExecutableTarget"
}
},
"Verbosity": {
"description": "Logging verbosity during build execution. Default is 'Normal'",
"$ref": "#/definitions/Verbosity"
}
}
}
},
"allOf": [
{
"properties": {
"Configuration": {
"type": "string",
"description": "Configuration to build - Default is 'Debug' (local) or 'Release' (server)",
"enum": [
"Debug",
"Release"
]
},
"FeedUri": {
"type": "string"
},
"NuGetApiKey": {
"type": "string"
},
"Solution": {
"type": "string",
"description": "Path to a solution file that is automatically loaded"
}
}
},
{
"$ref": "#/definitions/NukeBuild"
}
]
}
4 changes: 4 additions & 0 deletions .nuke/parameters.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"$schema": "build.schema.json",
"Solution": "AlphaVSS.sln"
}
96 changes: 43 additions & 53 deletions AlphaVSS.sln
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29505.145
# Visual Studio Version 18
VisualStudioVersion = 18.4.11612.150
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{2D2D5045-46A9-490F-A79D-78B261C35231}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
src\AlphaVSS.nuspec = src\AlphaVSS.nuspec
build\nuget\AlphaVSS.Native.NetCore.nuspec = build\nuget\AlphaVSS.Native.NetCore.nuspec
build\nuget\AlphaVSS.Native.NetFx.nuspec = build\nuget\AlphaVSS.Native.NetFx.nuspec
build\nuget\AlphaVSS.Native.NetFx.targets = build\nuget\AlphaVSS.Native.NetFx.targets
build\nuget\AlphaVSS.nuspec = build\nuget\AlphaVSS.nuspec
src\AlphaVSS.props = src\AlphaVSS.props
azure-pipelines.yml = azure-pipelines.yml
CHANGELOG.md = CHANGELOG.md
docs\docfx.json = docs\docfx.json
GitVersion.yml = GitVersion.yml
global.json = global.json
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AlphaVSS.Common", "src\AlphaVSS.Common\AlphaVSS.Common.csproj", "{2276E222-6841-4DA9-B5C9-549E9ADB33BE}"
Expand All @@ -22,60 +24,48 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AlphaVSS.Platform", "src\Al
{2276E222-6841-4DA9-B5C9-549E9ADB33BE} = {2276E222-6841-4DA9-B5C9-549E9ADB33BE}
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "_build", "build\_build.csproj", "{8FFBC249-EDAC-40EA-84A4-FCB66D579A1A}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "_build", "build\_build.csproj", "{4056BD12-5FA8-4D2E-274A-7E85E858A5FC}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
core31|x64 = core31|x64
core31|x86 = core31|x86
core31d|x64 = core31d|x64
core31d|x86 = core31d|x86
net45|x64 = net45|x64
net45|x86 = net45|x86
net45d|x64 = net45d|x64
net45d|x86 = net45d|x86
NET8|ARM64 = NET8|ARM64
NET8|x64 = NET8|x64
NET8|x86 = NET8|x86
net8d|ARM64 = net8d|ARM64
net8d|x64 = net8d|x64
net8d|x86 = net8d|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{2276E222-6841-4DA9-B5C9-549E9ADB33BE}.core31|x64.ActiveCfg = Release|Any CPU
{2276E222-6841-4DA9-B5C9-549E9ADB33BE}.core31|x64.Build.0 = Release|Any CPU
{2276E222-6841-4DA9-B5C9-549E9ADB33BE}.core31|x86.ActiveCfg = Release|Any CPU
{2276E222-6841-4DA9-B5C9-549E9ADB33BE}.core31|x86.Build.0 = Release|Any CPU
{2276E222-6841-4DA9-B5C9-549E9ADB33BE}.core31d|x64.ActiveCfg = Debug|Any CPU
{2276E222-6841-4DA9-B5C9-549E9ADB33BE}.core31d|x64.Build.0 = Debug|Any CPU
{2276E222-6841-4DA9-B5C9-549E9ADB33BE}.core31d|x86.ActiveCfg = Debug|Any CPU
{2276E222-6841-4DA9-B5C9-549E9ADB33BE}.core31d|x86.Build.0 = Debug|Any CPU
{2276E222-6841-4DA9-B5C9-549E9ADB33BE}.net45|x64.ActiveCfg = Release|Any CPU
{2276E222-6841-4DA9-B5C9-549E9ADB33BE}.net45|x64.Build.0 = Release|Any CPU
{2276E222-6841-4DA9-B5C9-549E9ADB33BE}.net45|x86.ActiveCfg = Release|Any CPU
{2276E222-6841-4DA9-B5C9-549E9ADB33BE}.net45|x86.Build.0 = Release|Any CPU
{2276E222-6841-4DA9-B5C9-549E9ADB33BE}.net45d|x64.ActiveCfg = Debug|Any CPU
{2276E222-6841-4DA9-B5C9-549E9ADB33BE}.net45d|x64.Build.0 = Debug|Any CPU
{2276E222-6841-4DA9-B5C9-549E9ADB33BE}.net45d|x86.ActiveCfg = Debug|Any CPU
{2276E222-6841-4DA9-B5C9-549E9ADB33BE}.net45d|x86.Build.0 = Debug|Any CPU
{3A977469-6361-469C-B180-5180CD9A15B4}.core31|x64.ActiveCfg = core31|x64
{3A977469-6361-469C-B180-5180CD9A15B4}.core31|x64.Build.0 = core31|x64
{3A977469-6361-469C-B180-5180CD9A15B4}.core31|x86.ActiveCfg = core31|Win32
{3A977469-6361-469C-B180-5180CD9A15B4}.core31|x86.Build.0 = core31|Win32
{3A977469-6361-469C-B180-5180CD9A15B4}.core31d|x64.ActiveCfg = core31d|x64
{3A977469-6361-469C-B180-5180CD9A15B4}.core31d|x64.Build.0 = core31d|x64
{3A977469-6361-469C-B180-5180CD9A15B4}.core31d|x86.ActiveCfg = core31d|Win32
{3A977469-6361-469C-B180-5180CD9A15B4}.core31d|x86.Build.0 = core31d|Win32
{3A977469-6361-469C-B180-5180CD9A15B4}.net45|x64.ActiveCfg = net45|x64
{3A977469-6361-469C-B180-5180CD9A15B4}.net45|x64.Build.0 = net45|x64
{3A977469-6361-469C-B180-5180CD9A15B4}.net45|x86.ActiveCfg = net45|Win32
{3A977469-6361-469C-B180-5180CD9A15B4}.net45|x86.Build.0 = net45|Win32
{3A977469-6361-469C-B180-5180CD9A15B4}.net45d|x64.ActiveCfg = net45d|x64
{3A977469-6361-469C-B180-5180CD9A15B4}.net45d|x64.Build.0 = net45d|x64
{3A977469-6361-469C-B180-5180CD9A15B4}.net45d|x86.ActiveCfg = net45d|Win32
{3A977469-6361-469C-B180-5180CD9A15B4}.net45d|x86.Build.0 = net45d|Win32
{8FFBC249-EDAC-40EA-84A4-FCB66D579A1A}.core31|x64.ActiveCfg = Debug|Any CPU
{8FFBC249-EDAC-40EA-84A4-FCB66D579A1A}.core31|x86.ActiveCfg = Debug|Any CPU
{8FFBC249-EDAC-40EA-84A4-FCB66D579A1A}.core31d|x64.ActiveCfg = Debug|Any CPU
{8FFBC249-EDAC-40EA-84A4-FCB66D579A1A}.core31d|x86.ActiveCfg = Debug|Any CPU
{8FFBC249-EDAC-40EA-84A4-FCB66D579A1A}.net45|x64.ActiveCfg = Debug|Any CPU
{8FFBC249-EDAC-40EA-84A4-FCB66D579A1A}.net45|x86.ActiveCfg = Debug|Any CPU
{8FFBC249-EDAC-40EA-84A4-FCB66D579A1A}.net45d|x64.ActiveCfg = Debug|Any CPU
{8FFBC249-EDAC-40EA-84A4-FCB66D579A1A}.net45d|x86.ActiveCfg = Debug|Any CPU
{2276E222-6841-4DA9-B5C9-549E9ADB33BE}.NET8|ARM64.ActiveCfg = Release|Any CPU
{2276E222-6841-4DA9-B5C9-549E9ADB33BE}.NET8|ARM64.Build.0 = Release|Any CPU
{2276E222-6841-4DA9-B5C9-549E9ADB33BE}.NET8|x64.ActiveCfg = Release|Any CPU
{2276E222-6841-4DA9-B5C9-549E9ADB33BE}.NET8|x64.Build.0 = Release|Any CPU
{2276E222-6841-4DA9-B5C9-549E9ADB33BE}.NET8|x86.ActiveCfg = Release|Any CPU
{2276E222-6841-4DA9-B5C9-549E9ADB33BE}.NET8|x86.Build.0 = Release|Any CPU
{2276E222-6841-4DA9-B5C9-549E9ADB33BE}.net8d|ARM64.ActiveCfg = Debug|Any CPU
{2276E222-6841-4DA9-B5C9-549E9ADB33BE}.net8d|ARM64.Build.0 = Debug|Any CPU
{2276E222-6841-4DA9-B5C9-549E9ADB33BE}.net8d|x64.ActiveCfg = Debug|Any CPU
{2276E222-6841-4DA9-B5C9-549E9ADB33BE}.net8d|x64.Build.0 = Debug|Any CPU
{2276E222-6841-4DA9-B5C9-549E9ADB33BE}.net8d|x86.ActiveCfg = Debug|Any CPU
{2276E222-6841-4DA9-B5C9-549E9ADB33BE}.net8d|x86.Build.0 = Debug|Any CPU
{3A977469-6361-469C-B180-5180CD9A15B4}.NET8|ARM64.ActiveCfg = net8|ARM64
{3A977469-6361-469C-B180-5180CD9A15B4}.NET8|ARM64.Build.0 = net8|ARM64
{3A977469-6361-469C-B180-5180CD9A15B4}.NET8|x64.ActiveCfg = net8|x64
{3A977469-6361-469C-B180-5180CD9A15B4}.NET8|x64.Build.0 = net8|x64
{3A977469-6361-469C-B180-5180CD9A15B4}.NET8|x86.ActiveCfg = net8|Win32
{3A977469-6361-469C-B180-5180CD9A15B4}.NET8|x86.Build.0 = net8|Win32
{3A977469-6361-469C-B180-5180CD9A15B4}.net8d|ARM64.ActiveCfg = net8d|ARM64
{3A977469-6361-469C-B180-5180CD9A15B4}.net8d|ARM64.Build.0 = net8d|ARM64
{3A977469-6361-469C-B180-5180CD9A15B4}.net8d|x64.ActiveCfg = net8d|x64
{3A977469-6361-469C-B180-5180CD9A15B4}.net8d|x64.Build.0 = net8d|x64
{3A977469-6361-469C-B180-5180CD9A15B4}.net8d|x86.ActiveCfg = net8d|Win32
{3A977469-6361-469C-B180-5180CD9A15B4}.net8d|x86.Build.0 = net8d|Win32
{4056BD12-5FA8-4D2E-274A-7E85E858A5FC}.NET8|ARM64.ActiveCfg = net8d|Any CPU
{4056BD12-5FA8-4D2E-274A-7E85E858A5FC}.NET8|x64.ActiveCfg = net8d|Any CPU
{4056BD12-5FA8-4D2E-274A-7E85E858A5FC}.NET8|x86.ActiveCfg = net8d|Any CPU
{4056BD12-5FA8-4D2E-274A-7E85E858A5FC}.net8d|ARM64.ActiveCfg = Release|Any CPU
{4056BD12-5FA8-4D2E-274A-7E85E858A5FC}.net8d|x64.ActiveCfg = net8d|Any CPU
{4056BD12-5FA8-4D2E-274A-7E85E858A5FC}.net8d|x86.ActiveCfg = net8d|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
32 changes: 0 additions & 32 deletions azure-pipelines.yml

This file was deleted.

7 changes: 7 additions & 0 deletions build.cmd
Original file line number Diff line number Diff line change
@@ -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" %*
52 changes: 29 additions & 23 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,22 @@ Param(

Write-Output "PowerShell $($PSVersionTable.PSEdition) version $($PSVersionTable.PSVersion)"

Set-StrictMode -Version 2.0; $ErrorActionPreference = "Stop"; $ConfirmPreference = "None"; trap { exit 1 }
Set-StrictMode -Version 2.0; $ErrorActionPreference = "Stop"; $ConfirmPreference = "None"; trap { Write-Error $_ -ErrorAction Continue; exit 1 }
$PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent

###########################################################################
# CONFIGURATION
###########################################################################

$BuildProjectFile = "$PSScriptRoot\build\_build.csproj"
$TempDirectory = "$PSScriptRoot\\.tmp"
$TempDirectory = "$PSScriptRoot\\.nuke\temp"

$DotNetGlobalFile = "$PSScriptRoot\\global.json"
$DotNetInstallUrl = "https://raw.githubusercontent.com/dotnet/cli/master/scripts/obtain/dotnet-install.ps1"
$DotNetChannel = "Current"
$DotNetInstallUrl = "https://dot.net/v1/dotnet-install.ps1"
$DotNetChannel = "STS"

$env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE = 1
$env:DOTNET_CLI_TELEMETRY_OPTOUT = 1
$env:DOTNET_NOLOGO = 1

###########################################################################
# EXECUTION
Expand All @@ -32,37 +32,43 @@ function ExecSafe([scriptblock] $cmd) {
if ($LASTEXITCODE) { exit $LASTEXITCODE }
}

# If global.json exists, load expected version
if (Test-Path $DotNetGlobalFile) {
$DotNetGlobal = $(Get-Content $DotNetGlobalFile | Out-String | ConvertFrom-Json)
if ($DotNetGlobal.PSObject.Properties["sdk"] -and $DotNetGlobal.sdk.PSObject.Properties["version"]) {
$DotNetVersion = $DotNetGlobal.sdk.version
}
}

# If dotnet is installed locally, and expected version is not set or installation matches the expected version
# If dotnet CLI is installed globally and it matches requested version, use for execution
if ($null -ne (Get-Command "dotnet" -ErrorAction SilentlyContinue) -and `
(!(Test-Path variable:DotNetVersion) -or $(& dotnet --version) -eq $DotNetVersion)) {
$(dotnet --version) -and $LASTEXITCODE -eq 0) {
$env:DOTNET_EXE = (Get-Command "dotnet").Path
}
else {
$DotNetDirectory = "$TempDirectory\dotnet-win"
$env:DOTNET_EXE = "$DotNetDirectory\dotnet.exe"

# Download install script
$DotNetInstallFile = "$TempDirectory\dotnet-install.ps1"
New-Item -ItemType Directory -Path $TempDirectory | Out-Null
New-Item -ItemType Directory -Path $TempDirectory -Force | Out-Null
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
(New-Object System.Net.WebClient).DownloadFile($DotNetInstallUrl, $DotNetInstallFile)

# If global.json exists, load expected version
if (Test-Path $DotNetGlobalFile) {
$DotNetGlobal = $(Get-Content $DotNetGlobalFile | Out-String | ConvertFrom-Json)
if ($DotNetGlobal.PSObject.Properties["sdk"] -and $DotNetGlobal.sdk.PSObject.Properties["version"]) {
$DotNetVersion = $DotNetGlobal.sdk.version
}
}

# Install by channel or version
$DotNetDirectory = "$TempDirectory\dotnet-win"
if (!(Test-Path variable:DotNetVersion)) {
ExecSafe { & $DotNetInstallFile -InstallDir $DotNetDirectory -Channel $DotNetChannel -NoPath }
ExecSafe { & powershell $DotNetInstallFile -InstallDir $DotNetDirectory -Channel $DotNetChannel -NoPath }
} else {
ExecSafe { & $DotNetInstallFile -InstallDir $DotNetDirectory -Version $DotNetVersion -NoPath }
ExecSafe { & powershell $DotNetInstallFile -InstallDir $DotNetDirectory -Version $DotNetVersion -NoPath }
}
$env:DOTNET_EXE = "$DotNetDirectory\dotnet.exe"
$env:PATH = "$DotNetDirectory;$env:PATH"
}

Write-Output "Microsoft (R) .NET Core SDK version $(& $env:DOTNET_EXE --version)"
Write-Output "Microsoft (R) .NET SDK version $(& $env:DOTNET_EXE --version)"

if (Test-Path env:NUKE_ENTERPRISE_TOKEN) {
& $env:DOTNET_EXE nuget remove source "nuke-enterprise" > $null
& $env:DOTNET_EXE nuget add source "https://f.feedz.io/nuke/enterprise/nuget" --name "nuke-enterprise" --username "PAT" --password $env:NUKE_ENTERPRISE_TOKEN > $null
}

ExecSafe { & $env:DOTNET_EXE build $BuildProjectFile /nodeReuse:false }
ExecSafe { & $env:DOTNET_EXE build $BuildProjectFile /nodeReuse:false /p:UseSharedCompilation=false -nologo -clp:NoSummary --verbosity quiet }
ExecSafe { & $env:DOTNET_EXE run --project $BuildProjectFile --no-build -- $BuildArguments }
Loading