Skip to content

Commit

Permalink
Fix CI build process (#77)
Browse files Browse the repository at this point in the history
* add missing default target to msbuild file

* always target AnyCPU platform in sample apps

* show application bitness in sample apps to i don't go insane

* make intermediate and output folders consistent across configurations

* use same output path convention for native projects as managed projects (bin\Configuration\Platform), but change Win32 to x86, for consistency

* only build .NET Framework targets on Windows
  • Loading branch information
lucaspimentel committed Aug 24, 2018
1 parent 66a7c1c commit 69f8356
Show file tree
Hide file tree
Showing 15 changed files with 90 additions and 68 deletions.
7 changes: 7 additions & 0 deletions Datadog.Trace.proj
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@
<MSBuild Targets="Clean" Projects="@(CsharpProject);@(CsharpTestProject);@(CppProject);@(CppTestProject);@(SampleProject);@(BenchmarkProject);@(WindowsInstallerProject)"/>
</Target>

<!-- default target -->
<Target Name="Build">
<MSBuild Targets="Build" Projects="@(CsharpProject);@(CsharpTestProject);@(CppProject);@(CppTestProject)">
<Output TaskParameter="TargetOutputs" ItemName="CollectedBuildOutput"/>
</MSBuild>
</Target>

<Target Name="BuildCsharp">
<MSBuild Targets="Build" Projects="@(CsharpProject)">
<Output TaskParameter="TargetOutputs" ItemName="CollectedBuildOutput"/>
Expand Down
32 changes: 16 additions & 16 deletions Datadog.Trace.sln
Original file line number Diff line number Diff line change
Expand Up @@ -157,22 +157,22 @@ Global
{85F35AAF-D102-4960-8B41-3BD9CBD0E77F}.Release|x64.Build.0 = Release|Any CPU
{85F35AAF-D102-4960-8B41-3BD9CBD0E77F}.Release|x86.ActiveCfg = Release|Any CPU
{85F35AAF-D102-4960-8B41-3BD9CBD0E77F}.Release|x86.Build.0 = Release|Any CPU
{3C6DD42E-9214-4747-92BA-78DE29AACE59}.Debug|x64.ActiveCfg = Debug|x64
{3C6DD42E-9214-4747-92BA-78DE29AACE59}.Debug|x64.Build.0 = Debug|x64
{3C6DD42E-9214-4747-92BA-78DE29AACE59}.Debug|x86.ActiveCfg = Debug|x86
{3C6DD42E-9214-4747-92BA-78DE29AACE59}.Debug|x86.Build.0 = Debug|x86
{3C6DD42E-9214-4747-92BA-78DE29AACE59}.Release|x64.ActiveCfg = Release|x64
{3C6DD42E-9214-4747-92BA-78DE29AACE59}.Release|x64.Build.0 = Release|x64
{3C6DD42E-9214-4747-92BA-78DE29AACE59}.Release|x86.ActiveCfg = Release|x86
{3C6DD42E-9214-4747-92BA-78DE29AACE59}.Release|x86.Build.0 = Release|x86
{9951A03A-AD1B-48D8-A96D-B85532BEDADD}.Debug|x64.ActiveCfg = Debug|x64
{9951A03A-AD1B-48D8-A96D-B85532BEDADD}.Debug|x64.Build.0 = Debug|x64
{9951A03A-AD1B-48D8-A96D-B85532BEDADD}.Debug|x86.ActiveCfg = Debug|x86
{9951A03A-AD1B-48D8-A96D-B85532BEDADD}.Debug|x86.Build.0 = Debug|x86
{9951A03A-AD1B-48D8-A96D-B85532BEDADD}.Release|x64.ActiveCfg = Release|x64
{9951A03A-AD1B-48D8-A96D-B85532BEDADD}.Release|x64.Build.0 = Release|x64
{9951A03A-AD1B-48D8-A96D-B85532BEDADD}.Release|x86.ActiveCfg = Release|x86
{9951A03A-AD1B-48D8-A96D-B85532BEDADD}.Release|x86.Build.0 = Release|x86
{3C6DD42E-9214-4747-92BA-78DE29AACE59}.Debug|x64.ActiveCfg = Debug|Any CPU
{3C6DD42E-9214-4747-92BA-78DE29AACE59}.Debug|x64.Build.0 = Debug|Any CPU
{3C6DD42E-9214-4747-92BA-78DE29AACE59}.Debug|x86.ActiveCfg = Debug|Any CPU
{3C6DD42E-9214-4747-92BA-78DE29AACE59}.Debug|x86.Build.0 = Debug|Any CPU
{3C6DD42E-9214-4747-92BA-78DE29AACE59}.Release|x64.ActiveCfg = Release|Any CPU
{3C6DD42E-9214-4747-92BA-78DE29AACE59}.Release|x64.Build.0 = Release|Any CPU
{3C6DD42E-9214-4747-92BA-78DE29AACE59}.Release|x86.ActiveCfg = Release|Any CPU
{3C6DD42E-9214-4747-92BA-78DE29AACE59}.Release|x86.Build.0 = Release|Any CPU
{9951A03A-AD1B-48D8-A96D-B85532BEDADD}.Debug|x64.ActiveCfg = Debug|Any CPU
{9951A03A-AD1B-48D8-A96D-B85532BEDADD}.Debug|x64.Build.0 = Debug|Any CPU
{9951A03A-AD1B-48D8-A96D-B85532BEDADD}.Debug|x86.ActiveCfg = Debug|Any CPU
{9951A03A-AD1B-48D8-A96D-B85532BEDADD}.Debug|x86.Build.0 = Debug|Any CPU
{9951A03A-AD1B-48D8-A96D-B85532BEDADD}.Release|x64.ActiveCfg = Release|Any CPU
{9951A03A-AD1B-48D8-A96D-B85532BEDADD}.Release|x64.Build.0 = Release|Any CPU
{9951A03A-AD1B-48D8-A96D-B85532BEDADD}.Release|x86.ActiveCfg = Release|Any CPU
{9951A03A-AD1B-48D8-A96D-B85532BEDADD}.Release|x86.Build.0 = Release|Any CPU
{3054DE0E-F140-4758-B2DA-0B9470C6EDE1}.Debug|x64.ActiveCfg = Debug|x64
{3054DE0E-F140-4758-B2DA-0B9470C6EDE1}.Debug|x86.ActiveCfg = Debug|x86
{3054DE0E-F140-4758-B2DA-0B9470C6EDE1}.Release|x64.ActiveCfg = Release|x64
Expand Down
2 changes: 0 additions & 2 deletions deploy/Datadog.Trace.ClrProfiler.WindowsInstaller/Config.wxi
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,10 @@
<?define ProductName = "Datadog $(var.BaseProductName) 64-bit" ?>
<?define Win64 = "yes" ?>
<?define PlatformProgramFilesFolder = "ProgramFiles64Folder" ?>
<?define PlatformSourceFolder = "x64" ?>
<?else ?>
<?define ProductName = "Datadog $(var.BaseProductName) 32-bit" ?>
<?define Win64 = "no" ?>
<?define PlatformProgramFilesFolder = "ProgramFilesFolder" ?>
<?define PlatformSourceFolder = "Win32" ?>
<?endif ?>

<?define NativeDllName = "Datadog.Trace.ClrProfiler.Native.dll" ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
<ComponentGroup Id="Files.Native" Directory="INSTALLFOLDER">
<Component Win64="$(var.Win64)">
<File Id="Datadog.Trace.ClrProfiler.Native"
Source="..\..\src\Datadog.Trace.ClrProfiler.Native\$(var.PlatformSourceFolder)\$(var.Configuration)\$(var.NativeDllName)"
Source="..\..\src\Datadog.Trace.ClrProfiler.Native\bin\$(var.Configuration)\$(var.Platform)\$(var.NativeDllName)"
Checksum="yes">
<Class Id="$(var.ProfilerCLSID)" Context="InprocServer32" ThreadingModel="both" Description="$(var.ProductName)"/>
</File>
Expand Down
5 changes: 4 additions & 1 deletion samples/Samples.AspNetCoreMvc2/Samples.AspNetCoreMvc2.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@
<PropertyGroup>
<TargetFrameworks>net461;netcoreapp2.0</TargetFrameworks>
<MvcRazorCompileOnPublish>true</MvcRazorCompileOnPublish>
<Platforms>x64;x86</Platforms>
</PropertyGroup>

<PropertyGroup Condition="'$(OS)' != 'Windows_NT'">
<TargetFrameworks>netcoreapp2.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
<Folder Include="Models\" />
<Folder Include="wwwroot\" />
Expand Down
6 changes: 5 additions & 1 deletion samples/Samples.AspNetCoreMvc2/Views/Home/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,8 @@
ViewData["Description"] = "The home page of my website";
}

<h1>Hello, world!</h1>
<h1>Hello, world!</h1>

<div>
Bitness: @(Environment.Is64BitProcess ? "64-bit" : "32-bit")
</div>
35 changes: 8 additions & 27 deletions samples/Samples.AspNetMvc5/Samples.AspNetMvc5.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -103,42 +103,23 @@
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<PlatformTarget>AnyCPU</PlatformTarget>
<OutputPath>bin\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<DebugSymbols>true</DebugSymbols>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<DebugSymbols>true</DebugSymbols>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
<PlatformTarget>AnyCPU</PlatformTarget>
<OutputPath>bin\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<DebugType>pdbonly</DebugType>
<DebugSymbols>true</DebugSymbols>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
Expand Down
6 changes: 5 additions & 1 deletion samples/Samples.AspNetMvc5/Views/Home/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@
ViewBag.Title = "Index";
}

<h1>Hello, world!</h1>
<h1>Hello, world!</h1>

<div>
Bitness: @(Environment.Is64BitProcess ? "64-bit" : "32-bit")
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
<RootNamespace>Datadog.Trace.ClrProfiler</RootNamespace>
</PropertyGroup>

<PropertyGroup Condition="'$(OS)' != 'Windows_NT'">
<TargetFrameworks>netcoreapp2.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Datadog.Trace\Datadog.Trace.csproj" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,26 +70,26 @@
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>$(ProjectDir)\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(Platform)\$(Configuration)\dynamic\</IntDir>
<OutDir>bin\$(Configuration)\x86\</OutDir>
<IntDir>obj\$(Configuration)\x86\</IntDir>
<TargetName>Datadog.Trace.ClrProfiler.Native</TargetName>
<TargetExt>.dll</TargetExt>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<OutDir>$(ProjectDir)\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(Platform)\$(Configuration)\dynamic\</IntDir>
<OutDir>bin\$(Configuration)\$(Platform)\</OutDir>
<IntDir>obj\$(Configuration)\$(Platform)\</IntDir>
<TargetName>Datadog.Trace.ClrProfiler.Native</TargetName>
<TargetExt>.dll</TargetExt>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutDir>$(ProjectDir)\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(Platform)\$(Configuration)\dynamic\</IntDir>
<OutDir>bin\$(Configuration)\$(Platform)\</OutDir>
<IntDir>obj\$(Configuration)\$(Platform)\</IntDir>
<TargetName>Datadog.Trace.ClrProfiler.Native</TargetName>
<TargetExt>.dll</TargetExt>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>$(ProjectDir)\$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(Platform)\$(Configuration)\dynamic\</IntDir>
<OutDir>bin\$(Configuration)\x86\</OutDir>
<IntDir>obj\$(Configuration)\x86\</IntDir>
<TargetName>Datadog.Trace.ClrProfiler.Native</TargetName>
<TargetExt>.dll</TargetExt>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,26 +61,26 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
<IncludePath>$(VC_IncludePath);$(CORECLR_PATH)\src\pal\prebuilt\inc;$(CORECLR_PATH)\src\inc;$(CORECLR_PATH)\bin\Product\$(BuildOS).$(BuildArch).$(BuildType)\inc;$(NETFXSDKDir)Include\um;$(WindowsSDK_IncludePath)</IncludePath>
<OutDir>$(ProjectDir)\$(Platform)\$(Configuration)\static\</OutDir>
<IntDir>$(Platform)\$(Configuration)\static\</IntDir>
<OutDir>bin\$(Configuration)\$(Platform)\static\</OutDir>
<IntDir>obj\$(Configuration)\$(Platform)\static\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
<IncludePath>$(VC_IncludePath);$(CORECLR_PATH)\src\pal\prebuilt\inc;$(CORECLR_PATH)\src\inc;$(CORECLR_PATH)\bin\Product\$(BuildOS).$(BuildArch).$(BuildType)\inc;$(NETFXSDKDir)Include\um;$(WindowsSDK_IncludePath)</IncludePath>
<OutDir>$(ProjectDir)\$(Platform)\$(Configuration)\static\</OutDir>
<IntDir>$(Platform)\$(Configuration)\static\</IntDir>
<OutDir>bin\$(Configuration)\x86\static\</OutDir>
<IntDir>obj\$(Configuration)\x86\static\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<IncludePath>$(VC_IncludePath);$(CORECLR_PATH)\src\pal\prebuilt\inc;$(CORECLR_PATH)\src\inc;$(CORECLR_PATH)\bin\Product\$(BuildOS).$(BuildArch).$(BuildType)\inc;$(NETFXSDKDir)Include\um;$(WindowsSDK_IncludePath)</IncludePath>
<OutDir>$(ProjectDir)\$(Platform)\$(Configuration)\static\</OutDir>
<IntDir>$(Platform)\$(Configuration)\static\</IntDir>
<OutDir>bin\$(Configuration)\$(Platform)\static\</OutDir>
<IntDir>obj\$(Configuration)\$(Platform)\static\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<IncludePath>$(VC_IncludePath);$(CORECLR_PATH)\src\pal\prebuilt\inc;$(CORECLR_PATH)\src\inc;$(CORECLR_PATH)\bin\Product\$(BuildOS).$(BuildArch).$(BuildType)\inc;$(NETFXSDKDir)Include\um;$(WindowsSDK_IncludePath)</IncludePath>
<OutDir>$(ProjectDir)\$(Platform)\$(Configuration)\static\</OutDir>
<IntDir>$(Platform)\$(Configuration)\static\</IntDir>
<OutDir>bin\$(Configuration)\x86\static\</OutDir>
<IntDir>obj\$(Configuration)\x86\static\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
<Description>OpenTracing implementation for Datadog APM</Description>
</PropertyGroup>

<PropertyGroup Condition="'$(OS)' != 'Windows_NT'">
<TargetFrameworks>netstandard2.0</TargetFrameworks>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
<DefineConstants>LIBLOG_PORTABLE</DefineConstants>
</PropertyGroup>
Expand Down
4 changes: 4 additions & 0 deletions src/Datadog.Trace/Datadog.Trace.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
<Description>.NET Tracer for Datadog APM</Description>
</PropertyGroup>

<PropertyGroup Condition="'$(OS)' != 'Windows_NT'">
<TargetFrameworks>netstandard2.0</TargetFrameworks>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
<DefineConstants>LIBLOG_PORTABLE</DefineConstants>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,23 @@
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<OutDir>$(ProjectDir)$(Platform)\$(Configuration)\</OutDir>
<OutDir>bin\$(Configuration)\$(Platform)\</OutDir>
<IntDir>obj\$(Configuration)\$(Platform)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>$(ProjectDir)$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(Platform)\$(Configuration)\</IntDir>
<OutDir>bin\$(Configuration)\x86\</OutDir>
<IntDir>obj\$(Configuration)\x86\</IntDir>
<LibraryPath>$(SolutionDir)src\Datadog.Trace.ClrProfiler.Native\$(Platform)$(Configuration);$(LibraryPath)</LibraryPath>
<IncludePath>$(SolutionDir)src\Datadog.Trace.ClrProfiler.Native;$(IncludePath)</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>bin\$(Configuration)\x86\</OutDir>
<IntDir>obj\$(Configuration)\x86\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutDir>bin\$(Configuration)\$(Platform)\</OutDir>
<IntDir>obj\$(Configuration)\$(Platform)\</IntDir>
</PropertyGroup>
<ItemGroup>
<ClInclude Include="pch.h" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
<TargetFrameworks>netcoreapp2.0;net452;net46;net47</TargetFrameworks>
</PropertyGroup>

<PropertyGroup Condition="'$(OS)' != 'Windows_NT'">
<TargetFrameworks>netcoreapp2.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="MsgPack.Cli" Version="0.9.2" />
</ItemGroup>
Expand Down

0 comments on commit 69f8356

Please sign in to comment.