Skip to content

Commit

Permalink
Build projects that require direct datadog trace references in the Co…
Browse files Browse the repository at this point in the history
…mpileIntegrationTests stage
  • Loading branch information
andrewlock committed Jan 7, 2025
1 parent 63aeca7 commit 14b7e65
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tracer/build/_build/Build.Steps.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1274,10 +1274,25 @@ void PrepareMonitoringHomeLinuxForPackaging(AbsolutePath assetsDirectory, string
.Requires(() => MonitoringHomeDirectory != null)
.Executes(() =>
{
// Compile the dependent samples.
// These are either directly used by the integration tests or depend on Datadog.Trace already being built
// It would be preferable to have these all in a separate "build" solution to avoid complexity,
// but we'll do that later
if (!Framework.ToString().StartsWith("net46"))
{
// we need to build RazorPages before integration tests for .net46x
DotnetBuild(Solution.GetProject(Projects.RazorPages), framework: Framework);

// These directly reference Datadog.Trace
var directDatadogTraceReferences = Solution
.AllProjects
.Where(project => project.SolutionFolder.Name == "instrumentation"
&& project.ReferencesDatadogTrace()
&& project.TryGetTargetFrameworks()?.Contains(Framework) != false);
foreach (var project in directDatadogTraceReferences)
{
DotnetBuild(project, framework: Framework);
}
}

var projects = TracerDirectory
Expand Down Expand Up @@ -1417,6 +1432,7 @@ string GetSamplesToBuild()

Target CompileTrimmingSamples => _ => _
.Description("Compiles the trimming samples")
.After(CompileManagedSrc)
.Requires(() => Framework)
.Unlisted()
.After(Clean)
Expand Down

0 comments on commit 14b7e65

Please sign in to comment.