Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

househeeping: resolve broken CI infrastructure #1587

Merged
merged 35 commits into from
Apr 24, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
6ce17da
use cake.filehelpers at 0.22.0 cakecore
ghuntley Apr 4, 2018
5d9b424
upgraded to latest version of cake.coveralls
ghuntley Apr 4, 2018
622b687
use cake.powershell at 0.22.0
ghuntley Apr 4, 2018
abd127d
use 2.4.1 of vswhere
ghuntley Apr 4, 2018
c39152c
use 0.7.0 of gitreleasemanager
ghuntley Apr 4, 2018
28b19f7
use 1.4.2 of coveralls
ghuntley Apr 4, 2018
6010fb6
use 3.1.2 of reportgenerator
ghuntley Apr 4, 2018
dede317
use Cake.PinNuGetDependency 3.0.0
ghuntley Apr 4, 2018
b53ac27
more verbose, use 0.22.1
ghuntley Apr 10, 2018
e802213
use nugetversin2 and make it super clear if android_home isnt no buil…
ghuntley Apr 11, 2018
88f0fd1
use bugfix from https://github.com/cake-contrib/Cake.PinNuGetDependen…
ghuntley Apr 12, 2018
ded426e
enable rdp to appveyor
ghuntley Apr 13, 2018
41d5101
what if we didnt
ghuntley Apr 13, 2018
c1e12dc
how about no
ghuntley Apr 23, 2018
6b3e0db
up
ghuntley Apr 23, 2018
810e9e9
okay this version works Oren
ghuntley Apr 23, 2018
b6b07f4
Revert "how about no"
ghuntley Apr 23, 2018
70cb602
R#8
Apr 23, 2018
8b17f27
latest Extras
Apr 23, 2018
639f9c0
Fully qualify type name
Apr 23, 2018
64fbcd5
Don't bring in packages that are too high for the target
Apr 23, 2018
b77aa11
Add serialization reference
Apr 23, 2018
b4327e9
use latest test runtime
Apr 23, 2018
1f057fc
Bump min ver to something supported
Apr 23, 2018
9d64b4d
Add VSTS build script
Apr 23, 2018
9ca8d04
use restore switch
Apr 23, 2018
c53321e
convert to sdk project
Apr 23, 2018
866f6e9
Update vsts script
Apr 23, 2018
4823ef8
update xunit version for vsts support
Apr 23, 2018
eb06ab8
fix packages dir
Apr 23, 2018
4d16f96
record package name for log file
Apr 23, 2018
5d372ad
flatten folders
Apr 23, 2018
c31fd0c
explicitly publish tests for now
Apr 23, 2018
d84e4c9
use xunit2 xml
Apr 24, 2018
d2c6581
don't rdp
Apr 24, 2018
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
86 changes: 86 additions & 0 deletions .vsts-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
queue: "Hosted VS2017"

steps:
- task: BatchScript@1
inputs:
filename: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\Common7\\Tools\\VsDevCmd.bat"
arguments: -no_logo
modifyEnvironment: true
displayName: Setup Environment Variables

- task: NuGetToolInstaller@0
displayName: Use NuGet 4.6.2
inputs:
versionSpec: 4.6.2

- powershell: |
nuget install SignClient -Version 0.9.1 -SolutionDir $(Build.SourcesDirectory) -Verbosity quiet -ExcludeVersion
.\build.cmd
displayName: Build
env:
SIGNCLIENT_SECRET: $(SignClientSecret)
SIGNCLIENT_USER: $(SignClientUser)
VSTS_ACCESS_TOKEN: $(System.AccessToken)

- task: PublishTestResults@2
inputs:
testRunner: XUnit
testResultsFiles: 'artifacts\*tests*.xml'

- task: CopyFiles@2
inputs:
Contents: 'artifacts/*.nupkg'
TargetFolder: '$(build.artifactstagingdirectory)\packages'
flattenFolders: true
condition: always()

- task: PublishBuildArtifacts@1
displayName: Publish Package Artifacts
inputs:
pathToPublish: '$(build.artifactstagingdirectory)\packages'
artifactType: container
artifactName: Packages
condition: always()

- task: CopyFiles@2
inputs:
Contents: '**/*.binlog'
TargetFolder: '$(build.artifactstagingdirectory)\binlogs'
flattenFolders: true
condition: always()

- task: PublishBuildArtifacts@1
displayName: Publish Logs
inputs:
pathToPublish: '$(build.artifactstagingdirectory)\binlogs'
artifactType: container
artifactName: Logs
condition: always()

- task: CopyFiles@2
inputs:
Contents: '**/bin/*'
TargetFolder: '$(build.artifactstagingdirectory)\binaries'
condition: always()

- task: PublishBuildArtifacts@1
displayName: Publish Binaries
inputs:
pathToPublish: '$(build.artifactstagingdirectory)\binaries'
artifactType: container
artifactName: Binaries
condition: always()

- task: CopyFiles@2
inputs:
Contents: 'src/ReactiveUI.**/Events_*.cs'
TargetFolder: '$(build.artifactstagingdirectory)\Events'
condition: always()

- task: PublishBuildArtifacts@1
displayName: Publish Generated Events
inputs:
pathToPublish: '$(build.artifactstagingdirectory)\Events'
artifactType: container
artifactName: Events
condition: always()
24 changes: 1 addition & 23 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,9 @@
SIGNCLIENT_USER:
secure: wwm115V/GOIkqGLbOom1aGBqkMQy6REFKPaG8P0b4//f0r01dc9pTWruOxLyi4X8
init:
- mkdir %ANDROID_HOME%"
- cd "%ANDROID_HOME%"
- appveyor DownloadFile "https://dl.google.com/android/repository/tools_r25.2.5-windows.zip"
- 7z x "tools_r25.2.5-windows.zip" > nul
- cd "C:\projects\reactiveui"
install:
- nuget install SignClient -Version 0.9.0 -SolutionDir %APPVEYOR_BUILD_FOLDER% -Verbosity quiet -ExcludeVersion
- echo y | "%ANDROID_HOME%\tools\android.bat" --silent update sdk --no-ui --all --filter platform-tools,tools,build-tools-26.0.2,android-26,android-25,extra-google-m2repository,extra-android-m2repository
# on windows we need to accept sublicenses for the new tooling, wee. 30 is an arbitrary number,
# but should be the maximum number of licenses we explicitly need to type "Y ENTER" for.
# also, the sdkmanager in all its glory leaks a bit of output to stderr, and powershell
# and appveyor interpret that as errors, and blows up. so, when piping in our "Y ENTER"
# responses, we invoke cmd so we can redirect stderr to stdout, and tell it to --update itself.
- ps: for($i=0;$i -lt 30;$i++) { $response += "y`n"}; $response | cmd /c 'C:\android-sdk-windows\tools\bin\sdkmanager.bat 2>&1' --update
build_script:
- ./build.cmd
cache:
Expand Down Expand Up @@ -68,20 +57,9 @@
SIGNCLIENT_USER:
secure: wwm115V/GOIkqGLbOom1aGBqkMQy6REFKPaG8P0b4//f0r01dc9pTWruOxLyi4X8
init:
- mkdir %ANDROID_HOME%"
- cd "%ANDROID_HOME%"
- appveyor DownloadFile "https://dl.google.com/android/repository/tools_r25.2.5-windows.zip"
- 7z x "tools_r25.2.5-windows.zip" > nul
- cd "C:\projects\reactiveui"
install:
- nuget install SignClient -Version 0.9.0 -SolutionDir %APPVEYOR_BUILD_FOLDER% -Verbosity quiet -ExcludeVersion
- echo y | "%ANDROID_HOME%\tools\android.bat" --silent update sdk --no-ui --all --filter platform-tools,tools,build-tools-26.0.2,android-26,android-25,extra-google-m2repository,extra-android-m2repository
# on windows we need to accept sublicenses for the new tooling, wee. 30 is an arbitrary number,
# but should be the maximum number of licenses we explicitly need to type "Y ENTER" for.
# also, the sdkmanager in all its glory leaks a bit of output to stderr, and powershell
# and appveyor interpret that as errors, and blows up. so, when piping in our "Y ENTER"
# responses, we invoke cmd so we can redirect stderr to stdout, and tell it to --update itself.
- ps: for($i=0;$i -lt 30;$i++) { $response += "y`n"}; $response | cmd /c 'C:\android-sdk-windows\tools\bin\sdkmanager.bat 2>&1' --update
build_script:
- ./build.cmd
cache:
Expand All @@ -95,4 +73,4 @@
- path: src/ReactiveUI.**/Events_*.cs
test: off
on_failure:
- ps: Get-ChildItem *.binlog -recurse | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
- ps: Get-ChildItem *.binlog -recurse | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
47 changes: 20 additions & 27 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,21 @@
// ADDINS
//////////////////////////////////////////////////////////////////////

#addin "nuget:?package=Cake.FileHelpers&version=1.0.4"
#addin "nuget:?package=Cake.Coveralls&version=0.4.0"
#addin "nuget:?package=Cake.PinNuGetDependency&version=0.1.0.1495792899"
#addin "nuget:?package=Cake.Powershell&version=0.3.5"
#addin "nuget:?package=Cake.FileHelpers&version=2.0.0"
#addin "nuget:?package=Cake.Coveralls&version=0.8.0"
#addin "nuget:?package=Cake.PinNuGetDependency&version=3.0.1"
#addin "nuget:?package=Cake.Powershell&version=0.4.3"

//////////////////////////////////////////////////////////////////////
// TOOLS
//////////////////////////////////////////////////////////////////////

#tool "nuget:?package=GitReleaseManager&version=0.6.0"
#tool "nuget:?package=GitReleaseManager&version=0.7.0"
#tool "nuget:?package=GitVersion.CommandLine&version=3.6.5"
#tool "nuget:?package=coveralls.io&version=1.3.4"
#tool "nuget:?package=coveralls.io&version=1.4.2"
#tool "nuget:?package=OpenCover&version=4.6.519"
#tool "nuget:?package=ReportGenerator&version=2.5.11"
#tool "nuget:?package=vswhere&version=2.1.4"
#tool "nuget:?package=ReportGenerator&version=3.1.2"
#tool "nuget:?package=vswhere&version=2.4.1"

//////////////////////////////////////////////////////////////////////
// ARGUMENTS
Expand Down Expand Up @@ -53,13 +53,14 @@ var githubRepository = "reactiveui";
var githubUrl = string.Format("https://github.com/{0}/{1}", githubOwner, githubRepository);

var msBuildPath = VSWhereLatest().CombineWithFilePath("./MSBuild/15.0/Bin/MSBuild.exe");
var androidHome = EnvironmentVariable("ANDROID_HOME");


// Version
var gitVersion = GitVersion();

var majorMinorPatch = gitVersion.MajorMinorPatch;
var informationalVersion = gitVersion.InformationalVersion;
var nugetVersion = gitVersion.NuGetVersion;
var nugetVersion = gitVersion.NuGetVersionV2;
var buildVersion = gitVersion.FullBuildMetaData;

// Artifacts
Expand Down Expand Up @@ -116,7 +117,6 @@ Task("BuildEventBuilder")
ArgumentCustomization = args => args.Append("/bl:eventbuilder.binlog /m")
}
.SetConfiguration("Release")
.WithProperty("AndroidSdkDirectory", androidHome.Quote())
.WithProperty("TreatWarningsAsErrors", treatWarningsAsErrors.ToString())
.SetVerbosity(Verbosity.Minimal)
.SetNodeReuse(false));
Expand Down Expand Up @@ -188,16 +188,15 @@ Task("BuildReactiveUI")
.IsDependentOn("GenerateEvents")
.Does (() =>
{
Action<string> build = (solution) =>
Action<string,string> build = (solution, name) =>
{
Information("Building {0} using {1}", solution, msBuildPath);

MSBuild(solution, new MSBuildSettings() {
ToolPath = msBuildPath,
ArgumentCustomization = args => args.Append("/bl:reactiveui-build.binlog /m")
ArgumentCustomization = args => args.Append("/bl:reactiveui-build-" + name + ".binlog /m /restore")
}
.WithTarget("build;pack")
.WithProperty("AndroidSdkDirectory", androidHome.Quote())
.WithProperty("PackageOutputPath", MakeAbsolute(Directory(artifactDirectory)).ToString().Quote())
.WithProperty("TreatWarningsAsErrors", treatWarningsAsErrors.ToString())
.SetConfiguration("Release")
Expand All @@ -209,17 +208,11 @@ Task("BuildReactiveUI")
.SetNodeReuse(false));
};

// Restore must be a separate step
MSBuild("./src/ReactiveUI.sln", new MSBuildSettings() {
ToolPath = msBuildPath,
ArgumentCustomization = args => args.Append("/bl:reactiveui-restore.binlog /m")
}
.WithTarget("restore")
.WithProperty("AndroidSdkDirectory", androidHome.Quote())
.WithProperty("Version", nugetVersion.ToString())
.SetVerbosity(Verbosity.Minimal));

build("./src/ReactiveUI.sln");
foreach(var package in packageWhitelist)
{
build("./src/" + package + "/" + package + ".csproj", package);
}
build("./src/ReactiveUI.Tests/ReactiveUI.Tests.csproj", "ReactiveUI.Tests");
});

Task("RunUnitTests")
Expand All @@ -230,7 +223,7 @@ Task("RunUnitTests")

tool.XUnit2("./src/ReactiveUI.Tests/bin/**/*.Tests.dll", new XUnit2Settings {
OutputDirectory = artifactDirectory,
XmlReportV1 = true,
XmlReport = true,
NoAppDomain = true
});
};
Expand Down Expand Up @@ -439,4 +432,4 @@ Task("Default")
// EXECUTION
//////////////////////////////////////////////////////////////////////

RunTarget(target);
RunTarget(target);
4 changes: 2 additions & 2 deletions build.cmd
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
@echo off
tools\nuget\nuget.exe update -self
tools\nuget\nuget.exe install xunit.runner.console -OutputDirectory tools -Version 2.2.0 -ExcludeVersion
tools\nuget\nuget.exe install Cake -OutputDirectory tools -ExcludeVersion -Version 0.21.1
tools\nuget\nuget.exe install Cake -OutputDirectory tools -ExcludeVersion -Version 0.22.1

tools\Cake\Cake.exe build.cake --target=%1
tools\Cake\Cake.exe build.cake --target=%1 --verbosity=diagnostic

exit /b %errorlevel%
5 changes: 2 additions & 3 deletions src/Directory.build.props
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
<Platform>AnyCPU</Platform>
<DebugType>full</DebugType>
<IsTestProject>$(MSBuildProjectName.Contains('Tests'))</IsTestProject>
<IsLegacyProject>$(MSBuildProjectName.Equals('ReactiveUI.Wpf'))</IsLegacyProject>
</PropertyGroup>

<ItemGroup>
Expand All @@ -26,12 +25,12 @@
<Choose>
<When Condition="'$(IsLegacyProject)' != 'true'">
<ItemGroup>
<PackageReference Include="MSBuild.Sdk.Extras" Version="1.1.0-preview.2.build.8" PrivateAssets="All" />
<PackageReference Include="MSBuild.Sdk.Extras" Version="1.3.1" PrivateAssets="All" />
</ItemGroup>
</When>
</Choose>

<ItemGroup Condition="'$(IsTestProject)' != 'true' and '$(SourceLinkEnabled)' != 'false'">
<PackageReference Include="SourceLink.Create.CommandLine" Version="2.3.1" PrivateAssets="All" />
<PackageReference Include="SourceLink.Create.CommandLine" Version="2.8.0" PrivateAssets="All" />
</ItemGroup>
</Project>
4 changes: 2 additions & 2 deletions src/Directory.build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<PropertyGroup Condition="'$(TargetFramework)' == 'uap10.0'">
<DefineConstants>$(DefineConstants);NETFX_CORE;XAML;WINDOWS_UWP</DefineConstants>
<TargetPlatformVersion>10.0.14393.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.10586.0</TargetPlatformMinVersion>
<TargetPlatformMinVersion>10.0.14393.0</TargetPlatformMinVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'Xamarin.iOS10'">
<DefineConstants>$(DefineConstants);MONO;UIKIT;COCOA</DefineConstants>
Expand All @@ -23,6 +23,6 @@
</PropertyGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'uap10.0' ">
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform " Version="5.2.2" />
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform" Version="6.0.8" />
</ItemGroup>
</Project>
6 changes: 6 additions & 0 deletions src/NuGet.Config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="myget.org/F/xunit" value="http://www.myget.org/F/xunit/api/v3/index.json" protocolVersion="3" />
</packageSources>
</configuration>
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<PackageReference Include="System.Runtime.Serialization.Primitives" Version="4.3.0" />
<PackageReference Include="System.Reactive" Version="[3.1.1,4)" />
<PackageReference Include="Splat" Version="2.0.0" />
<Reference Include="System.Runtime.Serialization" />
</ItemGroup>

<ItemGroup>
Expand Down
10 changes: 5 additions & 5 deletions src/ReactiveUI.Tests/ReactiveUI.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net452</TargetFrameworks>
<TargetFramework>net452</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.6.0" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="xunit" Version="2.3.1" />
<PackageReference Include="xunit.runner.console" Version="2.3.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
<PackageReference Include="xunit" Version="2.4.0-beta.2.build3984" />
<PackageReference Include="xunit.runner.console" Version="2.4.0-beta.2.build3984" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.0-beta.2.build3984" />
<PackageReference Include="Xunit.StaFact" Version="0.2.9" />
<PackageReference Include="ApprovalTests" Version=" 3.0.13" />
<PackageReference Include="System.Reactive" Version="[3.1.1,4)" />
Expand Down
2 changes: 1 addition & 1 deletion src/ReactiveUI.Winforms/CreatesCommandBinding.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class CreatesWinformsCommandBinding : ICreatesCommandBinding
static readonly List<Tuple<string, Type>> defaultEventsToBind = new List<Tuple<string, Type>>() {

Tuple.Create("Click", typeof (EventArgs)),
Tuple.Create("MouseUp", typeof (MouseEventArgs)),
Tuple.Create("MouseUp", typeof (System.Windows.Forms.MouseEventArgs)),
};

public int GetAffinityForObject(Type type, bool hasEventTarget)
Expand Down
5 changes: 0 additions & 5 deletions src/ReactiveUI.Wpf/CpsWorkaround.targets

This file was deleted.

Loading