Skip to content
This repository has been archived by the owner on Oct 27, 2023. It is now read-only.

Add local + ci for source-build build infra #416

Merged
merged 1 commit into from
Feb 10, 2021
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
23 changes: 23 additions & 0 deletions eng/SourceBuild.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<Project>

<PropertyGroup>
<GitHubRepositoryName>xliff-tasks</GitHubRepositoryName>
<SourceBuildManagedOnly>true</SourceBuildManagedOnly>
</PropertyGroup>

<Target Name="ApplySourceBuildPatchFiles"
Condition="
'$(ArcadeBuildFromSource)' == 'true' and
'$(ArcadeInnerBuildFromSource)' == 'true'"
BeforeTargets="Execute">
<ItemGroup>
<SourceBuildPatchFile Include="$(RepositoryEngineeringDir)source-build-patches\*.patch" />
</ItemGroup>

<Exec
Command="git apply --ignore-whitespace --whitespace=nowarn &quot;%(SourceBuildPatchFile.FullPath)&quot;"
WorkingDirectory="$(RepoRoot)"
Condition="'@(SourceBuildPatchFile)' != ''" />
</Target>

</Project>
5 changes: 5 additions & 0 deletions eng/SourceBuildPrebuiltBaseline.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<UsageData>
<IgnorePatterns>
<UsagePattern IdentityGlob="*/*" />
Copy link
Member

Choose a reason for hiding this comment

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

not **/*? (recursive dirs)?

Copy link
Member Author

Choose a reason for hiding this comment

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

Based on the docs here:

This defines which prebuilt NuGet packages are allowed to be used during the build. Initially, all package IDs and versions are permitted (*/*).

The */* glob means "any nupkg id, any version". It will be replaced with more specific rules at a later phase of the implementation plan.

It seems to mean a name/version pair rather than a file glob.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, this matches the common NuGet identity representation Microsoft.NETCore.App.Runtime/5.0.0. (Typical nupkg filenames are ambiguous, using . instead of /.)

</IgnorePatterns>
</UsageData>
1 change: 1 addition & 0 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="6.0.0-beta.21105.12">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>938b3e8b4edcd96ca0f0cbbae63c87b3f51f7afe</Sha>
<SourceBuild RepoName="arcade" ManagedOnly="true" />
</Dependency>
</ToolsetDependencies>
</Dependencies>
1 change: 1 addition & 0 deletions eng/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ stages:
enablePublishTestResults: false
enablePublishBuildAssets: true
enablePublishUsingPipelines: $(_PublishUsingPipelines)
enableSourceBuild: true
enableTelemetry: true
helixRepo: dotnet/standard
jobs:
Expand Down
54 changes: 54 additions & 0 deletions eng/source-build-patches/0001-remove-netcoreapp2.1-targets.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
From 61101604c89260e680df2d0e52c2dce84629ba00 Mon Sep 17 00:00:00 2001
From: Tom Deseyn <tom.deseyn@gmail.com>
Date: Thu, 19 Nov 2020 20:06:23 +0100
Subject: [PATCH] xliff-tasks: remove netcoreapp2.1 targets
Copy link
Member Author

@omajid omajid Feb 9, 2021

Choose a reason for hiding this comment

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

This patch originally bumped from netcoreapp2.0 to net5.0. I modified it change from netcoreapp2.1 to net5.0. I am not sure if this make sense for master, which really means net6.0...

Copy link
Member

Choose a reason for hiding this comment

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

master is still on a 5.0.100 SDK, so I don't think we can use net6.0 yet. I think this is fine--we'll revisit in stage 4 (prebuilt removal) when presumably the repo will be on a newer SDK.


---
src/XliffTasks/XliffTasks.csproj | 6 ++----
src/XliffTasks/build/XliffTasks.targets | 2 +-
2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/src/XliffTasks/XliffTasks.csproj b/src/XliffTasks/XliffTasks.csproj
index d967ac3..340b458 100644
--- a/src/XliffTasks/XliffTasks.csproj
+++ b/src/XliffTasks/XliffTasks.csproj
@@ -4,10 +4,9 @@

<PropertyGroup>
<TargetFrameworks>netcoreapp2.1;net46</TargetFrameworks>
- <TargetFrameworks Condition="'$(OS)' != 'Windows_NT'">netcoreapp2.1</TargetFrameworks>
+ <TargetFrameworks Condition="'$(OS)' != 'Windows_NT'">net5.0</TargetFrameworks>
<BuildOutputTargetFolder>tools</BuildOutputTargetFolder>
<EnableDefaultItems>false</EnableDefaultItems>
- <DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
<IsPackable>true</IsPackable>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<LangVersion>7.2</LangVersion>
@@ -23,10 +22,9 @@
<InternalsVisibleTo Include="XliffTasks.Tests" />
</ItemGroup>

- <ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp2.1'">
+ <ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">
<PackageReference Include="Microsoft.Build.Framework" Version="15.1.1012" PrivateAssets="All" />
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="15.1.1012" PrivateAssets="All" />
- <PackageReference Include="Microsoft.NETCore.App" Version="2.0.0" PrivateAssets="All" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net46'">
diff --git a/src/XliffTasks/build/XliffTasks.targets b/src/XliffTasks/build/XliffTasks.targets
index a79dae2..d5498c2 100644
--- a/src/XliffTasks/build/XliffTasks.targets
+++ b/src/XliffTasks/build/XliffTasks.targets
@@ -4,7 +4,7 @@
<Project>

<PropertyGroup>
- <XliffTasksDirectory Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\tools\netcoreapp2.1\</XliffTasksDirectory>
+ <XliffTasksDirectory Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\tools\net5.0\</XliffTasksDirectory>
<XliffTasksDirectory Condition="'$(MSBuildRuntimeType)' != 'Core'">$(MSBuildThisFileDirectory)..\tools\net46\</XliffTasksDirectory>
<XliffTasksAssembly>$(XliffTasksDirectory)XliffTasks.dll</XliffTasksAssembly>
</PropertyGroup>
--
2.26.2