Skip to content

Commit d608b25

Browse files
committed
Bump CI build requirements:
* OS-X : 4.0.2 (latest public MDK package) * Linux: 4.0.1 (latest in debian main, non-pinned version) Added exe wrapper for CustomBuildTasks.dll to allow xplat project building with the following: * Xamarian Studio v5.9.x+ / MonoDevelop v5.9.x+ * mdtool (matching version from above's IDE installation) * xbuild (from mono 4.0.2+ installation)
1 parent 2244f29 commit d608b25

File tree

11 files changed

+148
-20
lines changed

11 files changed

+148
-20
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Thumbs.db
55
*.obj
66
*.exe
77
*.pdb
8+
*.mdb
89
*.user
910
*.aps
1011
*.pch

CI/build.msbuild

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
<Exec Condition=" ('$(OS)' != 'Windows_NT') " Command=" rm -r -f $(DeployFolder) " />
2121
<Exec Condition=" ('$(OS)' != 'Windows_NT') " Command=" rm -r -f $(TestBuildDir) " />
2222

23+
<Exec Condition=" ('$(OS)' == 'Unix') " Command=" xbuild ../Lib/CustomBuildTasks/CustomBuildTasksExe/CustomBuildTasksExe.sln " />
24+
<Exec Condition=" ('$(OS)' == 'Unix') " Command=" cd ../LibGit2Sharp; mono ../Lib/CustomBuildTasks/CustomBuildTasksExe/CustomBuildTasksExe.exe UniqueIdentifierTask ; cd .. " />
25+
<Exec Condition=" ('$(OS)' == 'Unix') " Command=" cd ../LibGit2Sharp; mono ../Lib/CustomBuildTasks/CustomBuildTasksExe/CustomBuildTasksExe.exe NativeDllNameTask ; cd .. " />
2326
<RemoveDir Directories="$(DeployFolder)" Condition="Exists('$(DeployFolder)')" />
2427
<RemoveDir Directories="$(TestBuildDir)" Condition="Exists('$(TestBuildDir)')" />
2528
</Target>
@@ -37,7 +40,9 @@
3740
</Target>
3841

3942
<Target Name="Test" DependsOnTargets="Build">
40-
<xunit Assembly="$(TestBuildDir)/LibGit2Sharp.Tests.dll" ShadowCopy="false" Xml="$(DeployFolder)/Test-result.xml" />
43+
<xunit Condition=" ('$(OS)' == 'Windows_NT') " Assembly="$(TestBuildDir)/LibGit2Sharp.Tests.dll" ShadowCopy="false" Xml="$(DeployFolder)/Test-result.xml" />
44+
<Exec Condition=" ('$(OS)' == 'Unix') " Command=" cd $(TestBuildDir); LD_LIBRARY_PATH=. mono ../../../packages/xunit.runners.1.9.2/tools/xunit.console.exe LibGit2Sharp.Tests.dll /xml Test-result.xml " />
45+
<Exec Condition=" ('$(OS)' == 'Unix') " Command=" cp $(TestBuildDir)/Test-result.xml $(DeployFolder) " />
4146
</Target>
4247

4348
<Target Name="Deploy" DependsOnTargets="Test">

CI/travis.linux.install.deps.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ set -ev
33

44
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
55

6-
echo "deb http://download.mono-project.com/repo/debian wheezy/snapshots/3.12.0 main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
6+
echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
77
echo "deb http://download.mono-project.com/repo/debian wheezy-libtiff-compat main" | sudo tee -a /etc/apt/sources.list.d/mono-xamarin.list
88

99
sudo apt-get update

CI/travis.osx.install.deps.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22
set -ev
33

4-
MONO_VER=3.6.0
4+
MONO_VER=4.0.2
55

66
brew update
77
which cmake || brew install cmake

Lib/CustomBuildTasks/CustomBuildTasks.csproj

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@
99
<AppDesignerFolder>Properties</AppDesignerFolder>
1010
<RootNamespace>CustomBuildTasks</RootNamespace>
1111
<AssemblyName>CustomBuildTasks</AssemblyName>
12-
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
12+
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
1313
<FileAlignment>512</FileAlignment>
1414
<TargetFrameworkProfile />
15+
<ProductVersion>8.0.30703</ProductVersion>
16+
<SchemaVersion>2.0</SchemaVersion>
1517
</PropertyGroup>
1618
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1719
<DebugSymbols>true</DebugSymbols>
@@ -33,7 +35,11 @@
3335
<ItemGroup>
3436
<Reference Include="System" />
3537
<Reference Include="Microsoft.Build.Framework" />
36-
<Reference Include="Microsoft.Build.Utilities" />
38+
<Reference Include="Microsoft.Build" />
39+
<Reference Include="Microsoft.Build.Engine" />
40+
<Reference Include="Microsoft.Build.Tasks.v4.0" />
41+
<Reference Include="Microsoft.Build.Utilities.v4.0" />
42+
<Reference Include="Microsoft.Build.Engine" />
3743
</ItemGroup>
3844
<ItemGroup>
3945
<Compile Include="GenerateUniqueIdentifierTask.cs" />
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
6+
<ProductVersion>8.0.30703</ProductVersion>
7+
<SchemaVersion>2.0</SchemaVersion>
8+
<ProjectGuid>{3A032B41-0FE8-411E-B60B-AD6D22B1BBFE}</ProjectGuid>
9+
<OutputType>Exe</OutputType>
10+
<RootNamespace>CustomeBuildTasksExe</RootNamespace>
11+
<AssemblyName>CustomBuildTasksExe</AssemblyName>
12+
<UseMSBuildEngine>False</UseMSBuildEngine>
13+
<StartupObject>CustomeBuildTasksExe.MainClass</StartupObject>
14+
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
15+
</PropertyGroup>
16+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
17+
<DebugSymbols>true</DebugSymbols>
18+
<DebugType>full</DebugType>
19+
<Optimize>false</Optimize>
20+
<OutputPath>.</OutputPath>
21+
<DefineConstants>DEBUG;</DefineConstants>
22+
<ErrorReport>prompt</ErrorReport>
23+
<WarningLevel>4</WarningLevel>
24+
<Externalconsole>true</Externalconsole>
25+
</PropertyGroup>
26+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
27+
<Optimize>true</Optimize>
28+
<OutputPath>.</OutputPath>
29+
<ErrorReport>prompt</ErrorReport>
30+
<WarningLevel>4</WarningLevel>
31+
<Externalconsole>true</Externalconsole>
32+
</PropertyGroup>
33+
<ItemGroup>
34+
<Reference Include="System" />
35+
<Reference Include="Microsoft.Build.Framework" />
36+
<Reference Include="Microsoft.Build.Engine" />
37+
<Reference Include="Microsoft.Build" />
38+
<Reference Include="Microsoft.Build.Tasks.v4.0" />
39+
<Reference Include="Microsoft.Build.Utilities.v4.0" />
40+
</ItemGroup>
41+
<ItemGroup>
42+
<Compile Include="Program.cs" />
43+
</ItemGroup>
44+
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
45+
<ItemGroup>
46+
<ProjectReference Include="..\CustomBuildTasks.csproj">
47+
<Project>{B6138573-A4B9-44E7-83C2-8964CAF51EDA}</Project>
48+
<Name>CustomBuildTasks</Name>
49+
</ProjectReference>
50+
</ItemGroup>
51+
</Project>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 11.00
3+
# Visual Studio 2010
4+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CustomBuildTasksExe", "CustomBuildTasksExe.csproj", "{3A032B41-0FE8-411E-B60B-AD6D22B1BBFE}"
5+
EndProject
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CustomBuildTasks", "..\CustomBuildTasks.csproj", "{B6138573-A4B9-44E7-83C2-8964CAF51EDA}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{3A032B41-0FE8-411E-B60B-AD6D22B1BBFE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{3A032B41-0FE8-411E-B60B-AD6D22B1BBFE}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{3A032B41-0FE8-411E-B60B-AD6D22B1BBFE}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{3A032B41-0FE8-411E-B60B-AD6D22B1BBFE}.Release|Any CPU.Build.0 = Release|Any CPU
18+
{B6138573-A4B9-44E7-83C2-8964CAF51EDA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
19+
{B6138573-A4B9-44E7-83C2-8964CAF51EDA}.Debug|Any CPU.Build.0 = Debug|Any CPU
20+
{B6138573-A4B9-44E7-83C2-8964CAF51EDA}.Release|Any CPU.ActiveCfg = Release|Any CPU
21+
{B6138573-A4B9-44E7-83C2-8964CAF51EDA}.Release|Any CPU.Build.0 = Release|Any CPU
22+
EndGlobalSection
23+
EndGlobal
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
using System;
2+
using System.IO;
3+
using Microsoft.Build.Utilities;
4+
using CustomBuildTasks;
5+
6+
namespace CustomeBuildTasksExe
7+
{
8+
class MainClass
9+
{
10+
public static void Main(string[] args)
11+
{
12+
if (args.Length > 0)
13+
{
14+
if (args[0] == "UniqueIdentifierTask")
15+
{
16+
var guidTask = new GenerateUniqueIdentifierTask();
17+
guidTask.OutputFile = args.Length > 1 ? args[1] : Path.Combine(Environment.CurrentDirectory, "Core/UniqueIdentifier.cs");
18+
guidTask.Execute();
19+
Console.WriteLine("Generated: {0}", guidTask.OutputFile);
20+
}
21+
else if (args[0] == "NativeDllNameTask")
22+
{
23+
string fileName;
24+
fileName = args.Length < 2 ? Directory.GetFiles("../packages", "libgit2_hash.txt", SearchOption.AllDirectories)[0] : args[1];
25+
var dllNameTask = new GenerateNativeDllNameTask();
26+
dllNameTask.InputHashFile = new TaskItem(fileName);
27+
dllNameTask.OutputFile = args.Length > 1 ? args[2] : Path.Combine(Environment.CurrentDirectory, "Core/NativeDllName.cs");
28+
dllNameTask.Execute();
29+
Console.WriteLine("Generated: {0}", dllNameTask.OutputFile);
30+
return;
31+
}
32+
else
33+
{
34+
Console.WriteLine("{0}: Unsupported Microsoft.Build.Utilities.Task Id supplied, no task executed.", args[0]);
35+
}
36+
}
37+
}
38+
}
39+
}

LibGit2Sharp.Tests/LibGit2Sharp.Tests.csproj

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,18 @@
3535
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
3636
</PropertyGroup>
3737
<ItemGroup>
38-
<Reference Include="Moq, Version=4.2.1409.1722, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
39-
<SpecificVersion>False</SpecificVersion>
40-
<HintPath>..\packages\Moq.4.2.1409.1722\lib\net40\Moq.dll</HintPath>
41-
</Reference>
4238
<Reference Include="System" />
4339
<Reference Include="System.Core" />
4440
<Reference Include="System.Xml" />
45-
<Reference Include="xunit, Version=1.9.2.1705, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
46-
<SpecificVersion>False</SpecificVersion>
47-
<HintPath>..\packages\xunit.1.9.2\lib\net20\xunit.dll</HintPath>
48-
</Reference>
4941
<Reference Include="xunit.extensions">
5042
<HintPath>..\packages\xunit.extensions.1.9.2\lib\net20\xunit.extensions.dll</HintPath>
5143
</Reference>
44+
<Reference Include="Moq">
45+
<HintPath>..\packages\Moq.4.2.1409.1722\lib\net40\Moq.dll</HintPath>
46+
</Reference>
47+
<Reference Include="xunit">
48+
<HintPath>..\packages\xunit.1.9.2\lib\net20\xunit.dll</HintPath>
49+
</Reference>
5250
</ItemGroup>
5351
<ItemGroup>
5452
<Compile Include="..\LibGit2Sharp\Core\Epoch.cs">

LibGit2Sharp/LibGit2Sharp.csproj

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
<PropertyGroup>
55
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
66
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7-
<ProductVersion>8.0.30703</ProductVersion>
8-
<SchemaVersion>2.0</SchemaVersion>
97
<ProjectGuid>{EE6ED99F-CB12-4683-B055-D28FC7357A34}</ProjectGuid>
108
<OutputType>Library</OutputType>
119
<AppDesignerFolder>Properties</AppDesignerFolder>
@@ -14,6 +12,8 @@
1412
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
1513
<FileAlignment>512</FileAlignment>
1614
<TargetFrameworkProfile />
15+
<ProductVersion>8.0.30703</ProductVersion>
16+
<SchemaVersion>2.0</SchemaVersion>
1717
</PropertyGroup>
1818
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1919
<DebugSymbols>true</DebugSymbols>
@@ -23,10 +23,16 @@
2323
<DefineConstants>TRACE;DEBUG;NET40</DefineConstants>
2424
<ErrorReport>prompt</ErrorReport>
2525
<WarningLevel>4</WarningLevel>
26-
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
2726
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
2827
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
2928
<DocumentationFile>bin\Debug\LibGit2Sharp.xml</DocumentationFile>
29+
<CustomCommands>
30+
<CustomCommands>
31+
<Command type="BeforeBuild" command="xbuild Lib/CustomBuildTasks/CustomBuildTasksExe/CustomBuildTasksExe.sln" workingdir="${SolutionDir}" Condition=" '$(OS)' == 'Unix' " />
32+
<Command type="BeforeBuild" command="mono Lib/CustomBuildTasks/CustomBuildTasksExe/CustomBuildTasksExe.exe UniqueIdentifierTask" workingdir="${SolutionDir}" Condition=" '$(OS)' == 'Unix' " />
33+
<Command type="BeforeBuild" command="mono Lib/CustomBuildTasks/CustomBuildTasksExe/CustomBuildTasksExe.exe NativeDllNameTask" workingdir="${SolutionDir}" Condition=" '$(OS)' == 'Unix' " />
34+
</CustomCommands>
35+
</CustomCommands>
3036
</PropertyGroup>
3137
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
3238
<DebugType>pdbonly</DebugType>
@@ -36,7 +42,6 @@
3642
<ErrorReport>prompt</ErrorReport>
3743
<WarningLevel>4</WarningLevel>
3844
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
39-
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
4045
<DocumentationFile>bin\Release\LibGit2Sharp.xml</DocumentationFile>
4146
</PropertyGroup>
4247
<ItemGroup>
@@ -382,8 +387,8 @@
382387
<None Include="packages.config" />
383388
</ItemGroup>
384389
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
385-
<Import Project="UniqueIdentifier.targets" />
386-
<Import Project="NativeDllName.targets" />
390+
<Import Project="UniqueIdentifier.targets" Condition=" '$(OS)' == 'Windows_NT' " />
391+
<Import Project="NativeDllName.targets" Condition=" '$(OS)' == 'Windows_NT' " />
387392
<Import Project="ExtraDefine.targets" />
388393
<PropertyGroup>
389394
<PreBuildEvent>

build.libgit2sharp.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ EXTRADEFINE="$1"
1010
export LD_LIBRARY_PATH=.
1111

1212
# Required for NuGet package restore to run.
13-
mozroots --import --sync
13+
#mozroots --import --sync
1414

1515
mono Lib/NuGet/NuGet.exe restore LibGit2Sharp.sln
1616
xbuild CI/build.msbuild /target:Deploy /property:ExtraDefine="$EXTRADEFINE"

0 commit comments

Comments
 (0)