Skip to content

Commit

Permalink
Enable source-build through arcade (#1823)
Browse files Browse the repository at this point in the history
Co-authored-by: Marek Safar <marek.safar@gmail.com>
  • Loading branch information
omajid and marek-safar committed Feb 24, 2021
1 parent b37475f commit 6b3a305
Show file tree
Hide file tree
Showing 8 changed files with 53 additions and 2 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion build.cmd
@@ -1,2 +1,2 @@
@echo off
powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0eng\common\Build.ps1""" -projects """%~dp0illink.sln""" -restore -build %*"
powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0eng\common\Build.ps1""" -restore -build %*"
2 changes: 1 addition & 1 deletion build.sh
Expand Up @@ -13,4 +13,4 @@ while [[ -h $source ]]; do
done

scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
"$scriptroot/eng/common/build.sh" --projects "$scriptroot/illink.sln" --build --restore $@
"$scriptroot/eng/common/build.sh" --build --restore $@
17 changes: 17 additions & 0 deletions eng/Build.props
@@ -0,0 +1,17 @@
<Project>
<ItemGroup>

<ProjectToBuild Include="$(RepoRoot)src\linker\Mono.Linker.csproj" />
<ProjectToBuild Include="$(RepoRoot)src\ILLink.Tasks\ILLink.Tasks.csproj" />
<ProjectToBuild Condition="'$(DotNetBuildFromSource)' != 'true'" Include="$(RepoRoot)test\Mono.Linker.Tests\Mono.Linker.Tests.csproj" />
<ProjectToBuild Condition="'$(DotNetBuildFromSource)' != 'true'" Include="$(RepoRoot)test\Mono.Linker.Tests.Cases\Mono.Linker.Tests.Cases.csproj" />
<ProjectToBuild Condition="'$(DotNetBuildFromSource)' != 'true'" Include="$(RepoRoot)test\Mono.Linker.Tests.Cases.Expectations\Mono.Linker.Tests.Cases.Expectations.csproj" />
<ProjectToBuild Condition="'$(DotNetBuildFromSource)' != 'true'" Include="$(RepoRoot)src\analyzer\analyzer.csproj" />
<ProjectToBuild Condition="'$(DotNetBuildFromSource)' != 'true'" Include="$(RepoRoot)test\ILLink.Tasks.Tests\ILLink.Tasks.Tests.csproj" />
<ProjectToBuild Include="$(RepoRoot)src\ILLink.RoslynAnalyzer\ILLink.RoslynAnalyzer.csproj" />
<ProjectToBuild Include="$(RepoRoot)test\ILLink.RoslynAnalyzer.Tests\ILLink.RoslynAnalyzer.Tests.csproj" />
<ProjectToBuild Include="$(RepoRoot)src\linker\ref\Mono.Linker.csproj" />
<ProjectToBuild Include="$(RepoRoot)src\tlens\tlens.csproj" />

</ItemGroup>
</Project>
8 changes: 8 additions & 0 deletions eng/SourceBuild.props
@@ -0,0 +1,8 @@
<Project>

<PropertyGroup>
<GitHubRepositoryName>linker</GitHubRepositoryName>
<SourceBuildManagedOnly>true</SourceBuildManagedOnly>
</PropertyGroup>

</Project>
5 changes: 5 additions & 0 deletions eng/SourceBuildPrebuiltBaseline.xml
@@ -0,0 +1,5 @@
<UsageData>
<IgnorePatterns>
<UsagePattern IdentityGlob="*/*" />
</IgnorePatterns>
</UsageData>
5 changes: 5 additions & 0 deletions eng/Version.Details.xml
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>
<Dependency Name="Microsoft.DotNet.ApiCompat" Version="6.0.0-beta.21105.12">
<Uri>https://github.com/dotnet/arcade</Uri>
Expand All @@ -14,6 +15,10 @@
<Dependency Name="Microsoft.NET.Sdk.IL" Version="6.0.0-preview.3.21121.7">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>49cfb3507c586b539d0652814defbbc9e3073f16</Sha>
<!--
This would introduce a cyclic dependency, so it's explictly not enabled for now
<SourceBuild RepoName="runtime" />
-->
</Dependency>
</ToolsetDependencies>
</Dependencies>
16 changes: 16 additions & 0 deletions eng/azure-pipelines.yml
Expand Up @@ -45,6 +45,8 @@ stages:
testResultsFormat: vstest
enablePublishBuildAssets: true # generate build manifests and publish to BAR in internal builds
enableMicrobuild: true # only affects internal builds
# See https://github.com/dotnet/source-build/issues/2049
# enableSourceBuild: true

jobs:

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

- job: SourceBuild_Managed
displayName: Source-Build (Managed)
pool:
vmImage: ubuntu-20.04
container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7-3e800f1-20190501005343'
workspace:
clean: all
steps:
- checkout: self
submodules: true
- template: /eng/common/templates/steps/source-build.yml
parameters:
enablePublishTestResults: true

- ${{ if eq(variables.officialBuild, 'false') }}:
- job: Linux
condition: eq(variables.officialBuild, 'false')
Expand Down

0 comments on commit 6b3a305

Please sign in to comment.