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

Make sure we run all the TFMs on master builds #5990

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
14 changes: 13 additions & 1 deletion tracer/build/_build/Build.Steps.cs
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,21 @@ Project[] ClrProfilerIntegrationTests
(true, false) => new[] { TargetFramework.NET5_0, TargetFramework.NET6_0, TargetFramework.NET8_0, },
};

string ReleaseBranchForCurrentVersion() => new Version(Version).Major switch
{
LatestMajorVersion => "origin/master",
var major => $"origin/release/{major}.x",
};

bool RequiresThoroughTesting()
{
var baseBranch = string.IsNullOrEmpty(TargetBranch) ? "origin/master" : $"origin/{TargetBranch}";
var baseBranch = string.IsNullOrEmpty(TargetBranch) ? ReleaseBranchForCurrentVersion() : $"origin/{TargetBranch}";
if (IsGitBaseBranch(baseBranch))
{
// do a full run on the main branch
return true;
}

var gitChangedFiles = GetGitChangedFiles(baseBranch);
var integrationChangedFiles = TargetFrameworks
.SelectMany(tfm => new[]
Expand Down
2 changes: 1 addition & 1 deletion tracer/build/_build/Build.VariableGenerations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ void GenerateConditionVariables()

void GenerateConditionVariableBasedOnGitChange(string variableName, string[] filters, string[] exclusionFilters)
{
var baseBranch = string.IsNullOrEmpty(TargetBranch) ? "origin/master" : $"origin/{TargetBranch}";
var baseBranch = string.IsNullOrEmpty(TargetBranch) ? ReleaseBranchForCurrentVersion() : $"origin/{TargetBranch}";
bool isChanged;
var forceExplorationTestsWithVariableName = $"force_exploration_tests_with_{variableName}";

Expand Down
3 changes: 3 additions & 0 deletions tracer/build/_build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ partial class Build : NukeBuild
[Parameter("Is the build running on Alpine linux? Default is 'false'")]
readonly bool IsAlpine = false;

[Parameter("The current latest tracer version")]
const int LatestMajorVersion = 3;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're totally going to remember to update this when releasing 4.0

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no 4.0, remember? :stare:


[Parameter("The current version of the source and build")]
readonly string Version = "3.3.0";

Expand Down
Loading