Skip to content

Commit

Permalink
Merge #2028 Update Build
Browse files Browse the repository at this point in the history
  • Loading branch information
politas committed Apr 5, 2017
2 parents 0473b10 + 118165d commit 98889f2
Show file tree
Hide file tree
Showing 30 changed files with 126 additions and 112 deletions.
9 changes: 5 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ env:
- BUILD_CONFIGURATION=Release

mono:
- 4.8.0
- 4.6.2
- 4.2.4
- 4.4.2
- 4.0.5

addons:
Expand All @@ -26,7 +27,7 @@ before_install:

script:
- ./build --configuration=$BUILD_CONFIGURATION
- ./build test+only --configuration=$BUILD_CONFIGURATION --exclude=FlakyNetwork
- ./build test+only --configuration=$BUILD_CONFIGURATION --where="cat!=FlakyNetwork"

deploy:
# Releases (which are tagged) go to github
Expand All @@ -38,7 +39,7 @@ deploy:
on:
repo: KSP-CKAN/CKAN
tags: true
condition: $BUILD_CONFIGURATION = Release && $(mono --version | perl -ne'/version (\S+)/ and print $1') = 4.6.2
condition: $BUILD_CONFIGURATION = Release && $(mono --version | perl -ne'/version (\S+)/ and print $1') = 4.8.0
# all_branches needed as a workaround for travis-ci#1675
all_branches: true

Expand All @@ -55,7 +56,7 @@ deploy:
on:
repo: KSP-CKAN/CKAN
branch: master
condition: $BUILD_CONFIGURATION = Release && $(mono --version | perl -ne'/version (\S+)/ and print $1') = 4.6.2
condition: $BUILD_CONFIGURATION = Release && $(mono --version | perl -ne'/version (\S+)/ and print $1') = 4.8.0

notifications:
irc:
Expand Down
11 changes: 5 additions & 6 deletions AutoUpdate/CKAN-autoupdate.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
Expand All @@ -32,13 +33,11 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="log4net, Version=1.2.15.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\_build\lib\nuget\log4net.2.0.5\lib\net45-full\log4net.dll</HintPath>
<Private>True</Private>
<Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\_build\lib\nuget\log4net.2.0.8\lib\net45-full\log4net.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\_build\lib\nuget\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\_build\lib\nuget\Newtonsoft.Json.10.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand Down
4 changes: 2 additions & 2 deletions AutoUpdate/packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="log4net" version="2.0.5" targetFramework="net45" />
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net45" />
<package id="log4net" version="2.0.8" targetFramework="net45" />
<package id="Newtonsoft.Json" version="10.0.2" targetFramework="net45" />
</packages>
2 changes: 2 additions & 0 deletions CKAN.sln.DotSettings
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:Boolean x:Key="/Default/Environment/UnitTesting/ShadowCopy/@EntryValue">False</s:Boolean></wpf:ResourceDictionary>
14 changes: 6 additions & 8 deletions Cmdline/CKAN-cmdline.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
Expand All @@ -36,17 +37,14 @@
<Reference Include="CommandLine">
<HintPath>..\_build\lib\nuget\CommandLineParser.1.9.71\lib\net40\CommandLine.dll</HintPath>
</Reference>
<Reference Include="log4net, Version=1.2.15.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a">
<HintPath>..\_build\lib\nuget\log4net.2.0.5\lib\net45-full\log4net.dll</HintPath>
<Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\_build\lib\nuget\log4net.2.0.8\lib\net45-full\log4net.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\_build\lib\nuget\Newtonsoft.Json.10.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Transactions" />
<Reference Include="log4net, Version=1.2.15.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a">
</Reference>
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed">
<HintPath>..\_build\lib\nuget\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="..\_build\meta\GlobalAssemblyVersionInfo.cs">
Expand Down
4 changes: 2 additions & 2 deletions Cmdline/packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="log4net" version="2.0.5" targetFramework="net45" />
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net45" />
<package id="log4net" version="2.0.8" targetFramework="net45" />
<package id="Newtonsoft.Json" version="10.0.2" targetFramework="net45" />
</packages>
20 changes: 11 additions & 9 deletions Core/CKAN-core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
<AssemblyName>CKAN</AssemblyName>
<OutputPath>..\_build\out\$(AssemblyName)\$(Configuration)\bin\</OutputPath>
<IntermediateOutputPath>..\_build\out\$(AssemblyName)\$(Configuration)\obj\</IntermediateOutputPath>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
Expand All @@ -19,6 +21,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
Expand All @@ -27,22 +30,24 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="Autofac, Version=4.4.0.0, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">
<HintPath>..\_build\lib\nuget\Autofac.4.4.0\lib\net45\Autofac.dll</HintPath>
</Reference>
<Reference Include="CommandLine">
<HintPath>..\_build\lib\nuget\CommandLineParser.1.9.71\lib\net40\CommandLine.dll</HintPath>
</Reference>
<Reference Include="ICSharpCode.SharpZipLib, Version=0.86.5.0, Culture=neutral, PublicKeyToken=9dea7c6e17aa31ff, processorArchitecture=MSIL">
<HintPath>..\_build\lib\nuget\ICSharpCode.SharpZipLib.Patched.0.86.5\lib\net20\ICSharpCode.SharpZipLib.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="log4net, Version=1.2.15.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\_build\lib\nuget\log4net.2.0.5\lib\net40-full\log4net.dll</HintPath>
<Private>True</Private>
<Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\_build\lib\nuget\log4net.2.0.8\lib\net45-full\log4net.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\_build\lib\nuget\Newtonsoft.Json.9.0.1\lib\net40\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\_build\lib\nuget\Newtonsoft.Json.10.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="Microsoft.CSharp" />
Expand All @@ -53,9 +58,6 @@
<Reference Include="CurlSharp">
<HintPath>..\lib\curlsharp-v0.5.1-2-gd2d5699\CurlSharp.dll</HintPath>
</Reference>
<Reference Include="Autofac">
<HintPath>..\_build\lib\nuget\Autofac.3.5.2\lib\net40\Autofac.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="..\_build\meta\GlobalAssemblyVersionInfo.cs">
Expand Down
6 changes: 3 additions & 3 deletions Core/packages.config
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Autofac" version="3.5.2" targetFramework="net40" />
<package id="Autofac" version="4.4.0" targetFramework="net45" />
<package id="ChinhDo.Transactions.FileManager" version="1.2.0" targetFramework="net45" />
<package id="ICSharpCode.SharpZipLib.Patched" version="0.86.5" targetFramework="net45" />
<package id="log4net" version="2.0.5" targetFramework="net40" />
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net40" />
<package id="log4net" version="2.0.8" targetFramework="net45" />
<package id="Newtonsoft.Json" version="10.0.2" targetFramework="net45" />
<package id="TxFileManager" version="1.3" targetFramework="net40" />
</packages>
19 changes: 9 additions & 10 deletions GUI/CKAN-GUI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
Expand All @@ -49,19 +50,17 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Autofac, Version=3.5.0.0, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">
<HintPath>..\_build\lib\nuget\Autofac.3.5.2\lib\net40\Autofac.dll</HintPath>
<Reference Include="Autofac, Version=4.4.0.0, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">
<HintPath>..\_build\lib\nuget\Autofac.4.4.0\lib\net45\Autofac.dll</HintPath>
</Reference>
<Reference Include="INIFileParser">
<HintPath>..\_build\lib\nuget\ini-parser.2.1.1\lib\INIFileParser.dll</HintPath>
<Reference Include="INIFileParser, Version=2.4.0.0, Culture=neutral, PublicKeyToken=79af7b307b65cf3c, processorArchitecture=MSIL">
<HintPath>..\_build\lib\nuget\ini-parser.3.4.0\lib\net20\INIFileParser.dll</HintPath>
</Reference>
<Reference Include="log4net, Version=1.2.15.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\_build\lib\nuget\log4net.2.0.5\lib\net45-full\log4net.dll</HintPath>
<Private>True</Private>
<Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\_build\lib\nuget\log4net.2.0.8\lib\net45-full\log4net.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\_build\lib\nuget\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\_build\lib\nuget\Newtonsoft.Json.10.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand Down
8 changes: 4 additions & 4 deletions GUI/packages.config
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Autofac" version="3.5.2" targetFramework="net45" />
<package id="ini-parser" version="2.1.1" targetFramework="net4" userInstalled="true" />
<package id="log4net" version="2.0.5" targetFramework="net45" />
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net45" />
<package id="Autofac" version="4.4.0" targetFramework="net45" />
<package id="ini-parser" version="3.4.0" targetFramework="net45" userInstalled="true" />
<package id="log4net" version="2.0.8" targetFramework="net45" />
<package id="Newtonsoft.Json" version="10.0.2" targetFramework="net45" />
</packages>
11 changes: 5 additions & 6 deletions Netkan/CKAN-netkan.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
Expand All @@ -43,13 +44,11 @@
<HintPath>..\_build\lib\nuget\ICSharpCode.SharpZipLib.Patched.0.86.5\lib\net20\ICSharpCode.SharpZipLib.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="log4net, Version=1.2.15.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\_build\lib\nuget\log4net.2.0.5\lib\net45-full\log4net.dll</HintPath>
<Private>True</Private>
<Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\_build\lib\nuget\log4net.2.0.8\lib\net45-full\log4net.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\_build\lib\nuget\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\_build\lib\nuget\Newtonsoft.Json.10.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
</ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions Netkan/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
<packages>
<package id="CommandLineParser" version="1.9.71" targetFramework="net45" />
<package id="ICSharpCode.SharpZipLib.Patched" version="0.86.5" targetFramework="net45" />
<package id="log4net" version="2.0.5" targetFramework="net45" />
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net45" />
<package id="log4net" version="2.0.8" targetFramework="net45" />
<package id="Newtonsoft.Json" version="10.0.2" targetFramework="net45" />
</packages>
2 changes: 1 addition & 1 deletion Tests/Core/ModuleInstallerDirTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class ModuleInstallerDirTest
/// Prep environment by setting up a single mod in
/// a disposable KSP instance.
/// </summary>
[TestFixtureSetUp]
[OneTimeSetUp]
public void SetUp()
{
_testModule = TestData.DogeCoinFlag_101_module();
Expand Down
2 changes: 1 addition & 1 deletion Tests/Core/Relationships/SanityChecker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class SanityChecker
private CKAN.Registry registry;
private DisposableKSP ksp;

[TestFixtureSetUp]
[OneTimeSetUp]
public void Setup()
{
ksp = new DisposableKSP();
Expand Down
15 changes: 9 additions & 6 deletions Tests/Data/TestData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Reflection;
using CKAN;
using CKAN.Versioning;
using Version = CKAN.Version;
Expand All @@ -12,12 +13,14 @@ static public class TestData
{
public static string DataDir()
{
// TODO: Have this actually walk our directory structure and find
// t/data. This means we can relocate our test executable and
// things will still work.
string current = Directory.GetCurrentDirectory();

return Path.Combine(current, "../../../../../Tests/Data");
// FIXME: Come up with a better solution for test data
// 1. This is fragile with respect to changes in directory structure.
// 2. This forces us to disable ReSharper's test assembly shadow copying
// 3. "Quick" solution is to embed test data as an archive and extract it on demand to a known temporary location.
// But this makes updates hard.
// 4. A better, but much harder solution, is to not require harded files on disk for any of our tests, but that's
// a lot of work.
return Path.Combine(Directory.GetParent(Assembly.GetExecutingAssembly().Location).FullName, "../../../../../Tests/Data");
}

public static string DataDir(string file)
Expand Down
4 changes: 2 additions & 2 deletions Tests/GUI/Configuration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ public class ConfigurationTests
{
string tempDir;

[TestFixtureSetUp]
[OneTimeSetUp]
public void Setup()
{
tempDir = TestData.NewTempDir();
}

[TestFixtureTearDown]
[OneTimeTearDown]
public void TearDown()
{
Directory.Delete(tempDir, true);
Expand Down
4 changes: 2 additions & 2 deletions Tests/GUI/GH1866.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class GH1866
new NetAsyncModulesDownloader(main.currentUser)
);*/

[TestFixtureSetUp]
[OneTimeSetUp]
public void Up()
{
_instance = new DisposableKSP();
Expand Down Expand Up @@ -84,7 +84,7 @@ public void Up()
}
}

[TestFixtureTearDown]
[OneTimeTearDown]
public void Down()
{
_instance.Dispose();
Expand Down
12 changes: 6 additions & 6 deletions Tests/GUI/NavigationHistoryTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public void After_SingleHistoryItem_CannotNavigate()
Assert.IsFalse(nav.CanNavigateForward);
}

[Test, ExpectedException(typeof(InvalidOperationException))]
[Test]
public void NavigatingBackward_WhenUnable_ThrowsException()
{
// arrange
Expand All @@ -48,14 +48,14 @@ public void NavigatingBackward_WhenUnable_ThrowsException()

// act

nav.NavigateBackward();
TestDelegate act = () => nav.NavigateBackward();

// assert

Assert.Fail();
Assert.Throws<InvalidOperationException>(act);
}

[Test, ExpectedException(typeof(InvalidOperationException))]
[Test]
public void NavigatingForward_WhenUnable_ThrowsException()
{
// arrange
Expand All @@ -64,11 +64,11 @@ public void NavigatingForward_WhenUnable_ThrowsException()

// act

nav.NavigateForward();
TestDelegate act = () => nav.NavigateForward();

// assert

Assert.Fail();
Assert.Throws<InvalidOperationException>(act);
}

[Test]
Expand Down
Loading

0 comments on commit 98889f2

Please sign in to comment.