Skip to content

Commit

Permalink
Added AppVeyor validation build configuration
Browse files Browse the repository at this point in the history
- Ordered .gitattributes settings for text files.
- Normalized the line endings across source files.
- Updated dotnet-test-xunit version to 1.0.0-rc2-173384-19.
- Loosened test build result checks from testing `$?` to simply verifying
  the `$LASTEXITCODE`.
- Re-wrote GlobalSuppressions.cs files in UTF8.
- Fixed weird dependency of `System.Runtime.4.1.0/net46` by replacing it
  with framework assembly entry.
- Fixed build warnings.
- Added build status to the front repo page.
  • Loading branch information
alpaix committed Jul 18, 2016
1 parent f940689 commit 0edf0a2
Show file tree
Hide file tree
Showing 32 changed files with 1,080 additions and 1,024 deletions.
94 changes: 57 additions & 37 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
*.doc diff=astextplain
# Auto detect text files and perform LF normalization
* text=auto

.gitattributes text
.gitignore text

project.json text

*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
Expand All @@ -9,42 +17,54 @@
*.rtf diff=astextplain
*.RTF diff=astextplain

*.asm text
*.c text
*.config text
*.cpp text
*.clj text
*.cs text diff=csharp
*.css text
*.cxx text
*.erl text
*.fs text
*.fsx text
*.h text
*.hs text
*.htm text diff=html
*.html text diff=html
*.hxx text
*.java text
*.js text
*.json text
*.less text
*.lisp text
*.lua text
*.m text
*.md text
*.php text
*.ps1 text
*.py text
*.rb text
*.resx text
*.sass text
*.scss text
*.sql text
*.vb text

# Visual Studio artifacts
*.csproj text eol=crlf
*.dbproj text eol=crlf
*.filters text eol=crlf
*.fsproj text eol=crlf
*.props text eol=crlf
*.sln text eol=crlf
*.targets text eol=crlf
*.vbproj text eol=crlf
*.vcxitems text eol=crlf
*.vcxproj text eol=crlf

# Denote all files that are truly binary and should not be modified.
*.jpg binary
*.png binary
*.gif binary

*.cs text=auto diff=csharp
*.vb text=auto
*.resx text=auto
*.c text=auto
*.cpp text=auto
*.cxx text=auto
*.h text=auto
*.hxx text=auto
*.py text=auto
*.rb text=auto
*.java text=auto
*.html text=auto
*.htm text=auto
*.css text=auto
*.scss text=auto
*.sass text=auto
*.less text=auto
*.js text=auto
*.lisp text=auto
*.clj text=auto
*.sql text=auto
*.php text=auto
*.lua text=auto
*.m text=auto
*.asm text=auto
*.erl text=auto
*.fs text=auto
*.fsx text=auto
*.hs text=auto

*.csproj text=auto
*.vbproj text=auto
*.fsproj text=auto
*.dbproj text=auto
*.sln text=auto eol=crlf
*.zip binary
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

-------------

## Build Status

[![Build status](https://ci.appveyor.com/api/projects/status/1encuvwjo6k2sq68?svg=true)](https://ci.appveyor.com/project/NuGetTeam/nuget-client)

# Open Source Code of Conduct

This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [[email protected]](mailto:[email protected]) with any additional questions or comments.
Expand Down
30 changes: 30 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
version: 3.5.0-xprivate-{build}
pull_requests:
do_not_increment_build_number: true
skip_tags: true
clone_depth: 1
image: Visual Studio 2015
init:
- git config --global core.autocrlf true
install:
- git submodule update --init
build_script:
- ps: .\build.ps1 -Configuration Release -ReleaseLabel xprivate -BuildNumber $env:APPVEYOR_BUILD_NUMBER -SkipTests -SkipILMerge
test_script:
- ps: >-
. .\build\common.ps1
$TestErrors = @()
Invoke-BuildStep 'Running NuGet.Core tests' {
Test-CoreProjects -Configuration Release
} -ev +TestErrors
Invoke-BuildStep 'Running NuGet.Clients tests - Dev14 dependencies' {
Test-ClientsProjects -Configuration Release -MSBuildVersion "14"
} -ev +TestErrors
if ($TestErrors) {
$host.SetShouldExit(1)
}
deploy: off
2 changes: 1 addition & 1 deletion build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ Invoke-BuildStep 'Running NuGet.Clients tests - Dev15 dependencies' {

Invoke-BuildStep 'Running NuGet.Clients tests - Dev14 dependencies' {
param($Configuration)
Test-ClientsProjects -Configuration:$Configuration -MSBuildVersion "14"
Test-ClientsProjects -Configuration $Configuration -MSBuildVersion "14"
} `
-args $Configuration `
-skip:((-not $RunTests) -or $SkipDev14) `
Expand Down
21 changes: 11 additions & 10 deletions build/common.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -438,12 +438,14 @@ Function Test-XProject {
$opts += '-v'
}
$opts += 'test', '--configuration', $Configuration, '--framework', 'netcoreapp1.0'
if ($VerbosePreference) {
$opts += '-verbose'
}

Trace-Log "$DotNetExe $opts"

& $DotNetExe $opts

if (-not $?) {
if ($LASTEXITCODE -ne 0) {
Error-Log "Tests failed @""$_"" on CoreCLR. Code: $LASTEXITCODE"
}
}
Expand All @@ -458,11 +460,10 @@ Function Test-XProject {
$opts += 'build', '--configuration', $Configuration, '--runtime', 'win7-x64'

Trace-Log "$DotNetExe $opts"

& $DotNetExe $opts

if (-not $?) {
Error-Log "Build failed for $directoryName. Code: $LASTEXITCODE"
if ($LASTEXITCODE -ne 0) {
Error-Log "Build failed @""$_"" on CLR. Code: $LASTEXITCODE"
}
else {
$htmlOutput = Join-Path $_ "bin\$Configuration\net46\win7-x64\xunit.results.html"
Expand Down Expand Up @@ -651,18 +652,18 @@ Function Invoke-ILMerge {
}

$opts2 += "/out:$Artifacts\NuGet.exe"

if ($VerbosePreference) {
$opts2 += '/log'
}

Trace-Log "$ILMerge $opts2"
& $ILMerge $opts2 2>&1

if (-not $?) {
Error-Log "ILMerge has failed. Code: $LASTEXITCODE"
}

Remove-Item $buildArtifactsFolder\$nugetIntermediateExe
Remove-Item $buildArtifactsFolder\$nugetIntermediatePdb
}
}
3 changes: 2 additions & 1 deletion scripts/utils/UpdateNuGetVersion.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ $miscFiles = @(
"src\NuGet.Clients\VsExtension\source.extension.dev15.vsixmanifest",
"src\NuGet.Clients\VsExtension\NuGetPackage.cs",
"build\common.props",
".teamcity.properties"
".teamcity.properties",
"appveyor.yml"
)

$miscFiles | %{ Join-Path $NuGetRoot $_ } | ReplaceNuGetVersion
2 changes: 1 addition & 1 deletion src/NuGet.Clients/Options/GlobalSuppressions.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using System.Diagnostics.CodeAnalysis;
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using System.Diagnostics.CodeAnalysis;
Expand Down
134 changes: 67 additions & 67 deletions src/NuGet.Core/NuGet.CommandLine.XPlat/project.json
Original file line number Diff line number Diff line change
@@ -1,67 +1,67 @@
{
"version": "3.5.0-*",
"copyright": "Copyright .NET Foundation. All rights reserved.",
"packOptions": {
"licenseUrl": "https://raw.githubusercontent.com/NuGet/NuGet.Client/dev/LICENSE.txt",
"projectUrl": "https://github.com/NuGet/NuGet.Client"
},
"description": "NuGet 3 restore for dotnet CLI, DNX, and UWP",
"buildOptions": {
"emitEntryPoint": true,
"warningsAsErrors": true,
"allowUnsafe": true,
"xmlDoc": true,
"nowarn": [
"CS1591"
],
"compile": {
"include": [
"../../../Shared/*.cs"
]
}
},
"dependencies": {
"System.Runtime.InteropServices.RuntimeInformation": "4.0.0",
"Microsoft.Extensions.CommandLineUtils.Sources": {
"version": "1.0.0-*",
"type": "build"
},
"NuGet.Commands": {
"target": "project"
},
"System.Runtime.Serialization.Primitives": "4.1.1"
},
"commands": {
"NuGet.CommandLine.XPlat": "NuGet.CommandLine.XPlat"
},
"frameworks": {
"net46": {
"dependencies": {
"System.Runtime": "4.1.0"
},
"buildOptions": {
"define": [
"IS_DESKTOP"
]
}
},
"netcoreapp1.0": {
"imports": [
"netstandardapp1.5",
"dnxcore50",
"portable-net45+win8"
],
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.0.0"
}
},
"buildOptions": {
"define": [
"IS_CORECLR"
]
}
}
}
}
{
"version": "3.5.0-*",
"copyright": "Copyright .NET Foundation. All rights reserved.",
"packOptions": {
"licenseUrl": "https://raw.githubusercontent.com/NuGet/NuGet.Client/dev/LICENSE.txt",
"projectUrl": "https://github.com/NuGet/NuGet.Client"
},
"description": "NuGet 3 restore for dotnet CLI, DNX, and UWP",
"buildOptions": {
"emitEntryPoint": true,
"warningsAsErrors": true,
"allowUnsafe": true,
"xmlDoc": true,
"nowarn": [
"CS1591"
],
"compile": {
"include": [
"../../../Shared/*.cs"
]
}
},
"dependencies": {
"System.Runtime.InteropServices.RuntimeInformation": "4.0.0",
"Microsoft.Extensions.CommandLineUtils.Sources": {
"version": "1.0.0-*",
"type": "build"
},
"NuGet.Commands": {
"target": "project"
},
"System.Runtime.Serialization.Primitives": "4.1.1"
},
"commands": {
"NuGet.CommandLine.XPlat": "NuGet.CommandLine.XPlat"
},
"frameworks": {
"net46": {
"frameworkAssemblies": {
"System.Runtime": ""
},
"buildOptions": {
"define": [
"IS_DESKTOP"
]
}
},
"netcoreapp1.0": {
"imports": [
"netstandardapp1.5",
"dnxcore50",
"portable-net45+win8"
],
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.0.0"
}
},
"buildOptions": {
"define": [
"IS_CORECLR"
]
}
}
}
}
Binary file not shown.
Binary file modified src/NuGet.Core/NuGet.Packaging/Properties/GlobalSuppressions.cs
Binary file not shown.
Loading

0 comments on commit 0edf0a2

Please sign in to comment.