Skip to content

Commit 6b3a305

Browse files
omajidmarek-safar
andauthored
Enable source-build through arcade (#1823)
Co-authored-by: Marek Safar <marek.safar@gmail.com>
1 parent b37475f commit 6b3a305

File tree

8 files changed

+53
-2
lines changed

8 files changed

+53
-2
lines changed
File renamed without changes.

build.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
@echo off
2-
powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0eng\common\Build.ps1""" -projects """%~dp0illink.sln""" -restore -build %*"
2+
powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0eng\common\Build.ps1""" -restore -build %*"

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ while [[ -h $source ]]; do
1313
done
1414

1515
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
16-
"$scriptroot/eng/common/build.sh" --projects "$scriptroot/illink.sln" --build --restore $@
16+
"$scriptroot/eng/common/build.sh" --build --restore $@

eng/Build.props

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<Project>
2+
<ItemGroup>
3+
4+
<ProjectToBuild Include="$(RepoRoot)src\linker\Mono.Linker.csproj" />
5+
<ProjectToBuild Include="$(RepoRoot)src\ILLink.Tasks\ILLink.Tasks.csproj" />
6+
<ProjectToBuild Condition="'$(DotNetBuildFromSource)' != 'true'" Include="$(RepoRoot)test\Mono.Linker.Tests\Mono.Linker.Tests.csproj" />
7+
<ProjectToBuild Condition="'$(DotNetBuildFromSource)' != 'true'" Include="$(RepoRoot)test\Mono.Linker.Tests.Cases\Mono.Linker.Tests.Cases.csproj" />
8+
<ProjectToBuild Condition="'$(DotNetBuildFromSource)' != 'true'" Include="$(RepoRoot)test\Mono.Linker.Tests.Cases.Expectations\Mono.Linker.Tests.Cases.Expectations.csproj" />
9+
<ProjectToBuild Condition="'$(DotNetBuildFromSource)' != 'true'" Include="$(RepoRoot)src\analyzer\analyzer.csproj" />
10+
<ProjectToBuild Condition="'$(DotNetBuildFromSource)' != 'true'" Include="$(RepoRoot)test\ILLink.Tasks.Tests\ILLink.Tasks.Tests.csproj" />
11+
<ProjectToBuild Include="$(RepoRoot)src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj" />
12+
<ProjectToBuild Include="$(RepoRoot)test\ILLink.RoslynAnalyzer.Tests\ILLink.RoslynAnalyzer.Tests.csproj" />
13+
<ProjectToBuild Include="$(RepoRoot)src\linker\ref\Mono.Linker.csproj" />
14+
<ProjectToBuild Include="$(RepoRoot)src\tlens\tlens.csproj" />
15+
16+
</ItemGroup>
17+
</Project>

eng/SourceBuild.props

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<Project>
2+
3+
<PropertyGroup>
4+
<GitHubRepositoryName>linker</GitHubRepositoryName>
5+
<SourceBuildManagedOnly>true</SourceBuildManagedOnly>
6+
</PropertyGroup>
7+
8+
</Project>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<UsageData>
2+
<IgnorePatterns>
3+
<UsagePattern IdentityGlob="*/*" />
4+
</IgnorePatterns>
5+
</UsageData>

eng/Version.Details.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="6.0.0-beta.21105.12">
77
<Uri>https://github.com/dotnet/arcade</Uri>
88
<Sha>938b3e8b4edcd96ca0f0cbbae63c87b3f51f7afe</Sha>
9+
<SourceBuild RepoName="arcade" ManagedOnly="true" />
910
</Dependency>
1011
<Dependency Name="Microsoft.DotNet.ApiCompat" Version="6.0.0-beta.21105.12">
1112
<Uri>https://github.com/dotnet/arcade</Uri>
@@ -14,6 +15,10 @@
1415
<Dependency Name="Microsoft.NET.Sdk.IL" Version="6.0.0-preview.3.21121.7">
1516
<Uri>https://github.com/dotnet/runtime</Uri>
1617
<Sha>49cfb3507c586b539d0652814defbbc9e3073f16</Sha>
18+
<!--
19+
This would introduce a cyclic dependency, so it's explictly not enabled for now
20+
<SourceBuild RepoName="runtime" />
21+
-->
1722
</Dependency>
1823
</ToolsetDependencies>
1924
</Dependencies>

eng/azure-pipelines.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ stages:
4545
testResultsFormat: vstest
4646
enablePublishBuildAssets: true # generate build manifests and publish to BAR in internal builds
4747
enableMicrobuild: true # only affects internal builds
48+
# See https://github.com/dotnet/source-build/issues/2049
49+
# enableSourceBuild: true
4850

4951
jobs:
5052

@@ -85,6 +87,20 @@ stages:
8587
${{ if eq(variables.officialBuild, 'true') }}:
8688
displayName: Build and publish illink.sln $(_BuildConfig)
8789

90+
- job: SourceBuild_Managed
91+
displayName: Source-Build (Managed)
92+
pool:
93+
vmImage: ubuntu-20.04
94+
container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7-3e800f1-20190501005343'
95+
workspace:
96+
clean: all
97+
steps:
98+
- checkout: self
99+
submodules: true
100+
- template: /eng/common/templates/steps/source-build.yml
101+
parameters:
102+
enablePublishTestResults: true
103+
88104
- ${{ if eq(variables.officialBuild, 'false') }}:
89105
- job: Linux
90106
condition: eq(variables.officialBuild, 'false')

0 commit comments

Comments
 (0)