Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
3ac9604
Add source-build ci leg
MichaelSimons May 14, 2021
06b0555
Refactor to support custom publish arg
MichaelSimons May 14, 2021
977e0dc
Add option for publish
May 17, 2021
67bd20c
Typo
May 17, 2021
5adbdbf
Update patch content
May 18, 2021
93ec033
Update patch
May 18, 2021
360d1c4
Fixup another global.json patch
May 18, 2021
36bfffa
Path to remove WASM.Performance shouldn't be needed
May 18, 2021
d63f4c1
Remove two patches
May 18, 2021
83c0e6f
Remove some patches
May 18, 2021
b341966
Typo
May 18, 2021
d005a52
Consolidate global.json patch
May 18, 2021
7304df6
Update packability of integration tests
May 18, 2021
3ccd37c
Fixup project type logic
May 19, 2021
52dc166
Skip import on source build
May 19, 2021
1f2e8ee
Mark Components.E2ETests as NodeJsProject
May 19, 2021
0a160d9
Exclude YarnMSBuild project in source build
May 19, 2021
5122e59
Try remove packastool patch
May 19, 2021
3cb3937
Verification
May 19, 2021
2303106
Consolidate ExcludeFromSourceBuild logic
May 19, 2021
4619287
Revert "Consolidate ExcludeFromSourceBuild logic"
May 19, 2021
6bdeeeb
Add support to skip SB publish validation in CI
MichaelSimons May 21, 2021
83774e3
Update patch
MichaelSimons May 21, 2021
6a77269
Revert publish workaround
Jun 1, 2021
cfb0638
Update binlog parameter logic
Jun 1, 2021
2ad715f
Revert Directory.Build.props changes
Jun 1, 2021
d35951b
Substitute patch with jq script
Jun 1, 2021
d1e142a
Version properties
Jun 1, 2021
fc96aa2
Remove debugging code
Jun 1, 2021
07c0006
Modify source build global json script
Jun 2, 2021
3b42193
Relocate script invocation
Jun 3, 2021
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
59 changes: 8 additions & 51 deletions .azure/pipelines/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -749,56 +749,13 @@ stages:
includeForks: true

# Source build
- job: Source_Build
displayName: 'Test: Linux Source Build'
container: centos:7
pool:
vmImage: 'ubuntu-18.04'
variables:
LC_ALL: 'en_US.UTF-8'
LANG: 'en_US.UTF-8'
LANGUAGE: 'en_US.UTF-8'
DotNetCoreSdkDir: $(Agent.ToolsDirectory)/dotnet
# This isn't needed in the path because build does not need to _use_ global tools.
DOTNET_CLI_HOME: $(System.DefaultWorkingDirectory)
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT: true
steps:
- script: |
source eng/common/native/common-library.sh
mkdir -p $(System.DefaultWorkingDirectory)/.tools
GetFile https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64 $(System.DefaultWorkingDirectory)/.tools/jq
chmod +x $(System.DefaultWorkingDirectory)/.tools/jq
echo "##vso[task.prependpath]$(System.DefaultWorkingDirectory)/.tools"
displayName: Install jq
- ${{ if ne(variables['System.TeamProject'], 'public') }}:
- task: Bash@3
displayName: Setup Private Feeds Credentials
inputs:
filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh
arguments: $(Build.SourcesDirectory)/NuGet.config $Token
env:
Token: $(dn-bot-dnceng-artifact-feeds-rw)
- script: ./eng/scripts/ci-source-build.sh --ci --nobl --configuration Release /p:BuildManaged=true /p:BuildNodeJs=false $(_InternalRuntimeDownloadArgs)
displayName: Run ci-source-build.sh
- task: PublishBuildArtifacts@1
displayName: Upload logs
condition: always()
continueOnError: true
inputs:
pathtoPublish: artifacts/log/
artifactName: Source_Build_Logs
artifactType: Container
parallel: true
- task: PublishBuildArtifacts@1
displayName: Upload package artifacts
# Only capture source build artifacts in PRs for the sake of inspecting
# changes that impact source-build. The artifacts from this build pipeline are never actually used.
condition: and(succeeded(), in(variables['Build.Reason'], 'PullRequest'))
inputs:
pathtoPublish: artifacts/packages/
artifactName: Source_Build_Packages
artifactType: Container
parallel: true
- template: /eng/common/templates/job/source-build.yml
parameters:
platform:
name: 'Managed'
container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7-f39df28-20191023143754'
buildScript: './eng/build.sh'
skipPublishValidation: true

# Publish to the BAR
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
Expand Down Expand Up @@ -827,7 +784,7 @@ stages:
- Linux_musl_arm_build
- Linux_musl_arm64_build
# In addition to the dependencies above, ensure the build was successful overall.
- Source_Build
- Source_Build_Managed
pool:
vmImage: vs2017-win2016
publishUsingPipelines: ${{ variables._PublishUsingPipelines }}
Expand Down
5 changes: 3 additions & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
( $(MSBuildProjectName.EndsWith('Tests')) OR
$(MSBuildProjectName.EndsWith('.Test')) OR
$(MSBuildProjectName.EndsWith('.FunctionalTest')) ) ">true</IsUnitTestProject>
<IsTestAssetProject Condition=" $(RepoRelativeProjectDir.Contains('testassets')) ">true</IsTestAssetProject>
<IsTestAssetProject Condition=" $(RepoRelativeProjectDir.Contains('testassets')) OR $(MSBuildProjectName.Contains('TestCommon'))">true</IsTestAssetProject>
<IsSampleProject Condition=" $(RepoRelativeProjectDir.ToUpperInvariant().Contains('SAMPLE')) ">true</IsSampleProject>
<IsAnalyzersProject Condition="$(MSBuildProjectName.EndsWith('.Analyzers'))">true</IsAnalyzersProject>
<IsShipping Condition=" '$(IsSampleProject)' == 'true' OR
Expand Down Expand Up @@ -171,7 +171,8 @@
linux-musl-arm64;
linux-x64;
linux-arm;
linux-arm64
linux-arm64;
freebsd-x64
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@MichaelSimons Can you provide the background why this was added?

Copy link
Member

Choose a reason for hiding this comment

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

FreeBSD is a community effort which we want to foster.
Issue - dotnet/source-build#1139
Initial PR - dotnet/source-build#1362

</SupportedRuntimeIdentifiers>

<!-- Make error messages clickable in VS Code's console -->
Expand Down
8 changes: 8 additions & 0 deletions eng/Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,14 @@
<ProjectToBuild Condition=" '$(BuildNodeJS)' == 'true'" Include="@(NodeJsProjects)" Exclude="@(ProjectToExclude)" />
<ProjectToExclude Condition=" '$(BuildNodeJS)' != 'true'" Include="@(NodeJsProjects)" />

<YarnMSBuildProjects Include="
$(RepoRoot)src\Components\test\E2ETest\Microsoft.AspNetCore.Components.E2ETests.csproj;
$(RepoRoot)src\Components\WebAssembly\Authentication.Msal\src\Microsoft.Authentication.WebAssembly.Msal.csproj;
$(RepoRoot)src\Components\WebAssembly\WebAssembly.Authentication\src\Microsoft.AspNetCore.Components.WebAssembly.Authentication.csproj;
"
Exclude="@(ProjectToExclude)" />
<ProjectToExclude Condition=" '$(DotNetBuildFromSource)' == 'true'" Include="@(YarnMSBuildProjects)" />

<JavaProjects Include="$(RepoRoot)src\SignalR\**\*.javaproj"
Exclude="@(ProjectToExclude)" />

Expand Down
1 change: 1 addition & 0 deletions eng/Common.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<TargetOsName Condition=" '$(TargetOsName)' == '' AND $([MSBuild]::IsOSPlatform('Windows'))">win</TargetOsName>
<TargetOsName Condition=" '$(TargetOsName)' == '' AND $([MSBuild]::IsOSPlatform('OSX'))">osx</TargetOsName>
<TargetOsName Condition=" '$(TargetOsName)' == '' AND $([MSBuild]::IsOSPlatform('Linux'))">linux</TargetOsName>
<TargetOsName Condition=" '$(TargetOsName)' == '' AND $([MSBuild]::IsOSPlatform('FreeBSD'))">freebsd</TargetOsName>
<TargetArchitecture Condition="'$(TargetArchitecture)' == ''">x64</TargetArchitecture>
<TargetRuntimeIdentifier Condition="'$(TargetRuntimeIdentifier)' == ''">$(TargetOsName)-$(TargetArchitecture)</TargetRuntimeIdentifier>
</PropertyGroup>
Expand Down
12 changes: 3 additions & 9 deletions eng/SourceBuild.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,12 @@
<CloneSubmodulesToInnerSourceBuildRepo>false</CloneSubmodulesToInnerSourceBuildRepo>
</PropertyGroup>

<Target Name="ApplySourceBuildPatchFiles"
<Target Name="PrepareGlobalJsonForSourceBuild"
AfterTargets="PrepareInnerSourceBuildRepoRoot"
BeforeTargets="RunInnerSourceBuildCommand">

<ItemGroup>
<SourceBuildPatchFile Include="$(RepositoryEngineeringDir)source-build-patches\*.patch" />
</ItemGroup>

<Exec
Command="git apply --ignore-whitespace --whitespace=nowarn &quot;%(SourceBuildPatchFile.FullPath)&quot;"
WorkingDirectory="$(InnerSourceBuildRepoRoot)"
Condition="'@(SourceBuildPatchFile)' != ''" />
Command="./eng/scripts/prepare-sourcebuild-globaljson.sh"
WorkingDirectory="$(InnerSourceBuildRepoRoot)" />
</Target>

<!--
Expand Down
3 changes: 3 additions & 0 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,8 @@
<MicrosoftBuildVersion>16.9.0</MicrosoftBuildVersion>
<MicrosoftAzureSignalRVersion>1.2.0</MicrosoftAzureSignalRVersion>
<MicrosoftBuildFrameworkVersion>16.9.0</MicrosoftBuildFrameworkVersion>
<MicrosoftBuildTaskCoreVersion>16.9.0</MicrosoftBuildTaskCoreVersion>
<MicrosoftBuildUtilitiesCoreVersion>16.9.0</MicrosoftBuildUtilitiesCoreVersion>
<MicrosoftBuildLocatorVersion>1.2.6</MicrosoftBuildLocatorVersion>
<MicrosoftBuildUtilitiesCoreVersion>16.9.0</MicrosoftBuildUtilitiesCoreVersion>
<MicrosoftCodeAnalysisCommonVersion>3.8.0</MicrosoftCodeAnalysisCommonVersion>
Expand All @@ -201,6 +203,7 @@
<MicrosoftWebWebView2Version>1.0.705.50</MicrosoftWebWebView2Version>
<MicrosoftWebXdtVersion>1.4.0</MicrosoftWebXdtVersion>
<SystemIdentityModelTokensJwtVersion>6.10.0</SystemIdentityModelTokensJwtVersion>
<NuGetPackagingVersion>5.10.0-rc.7240</NuGetPackagingVersion>
<NuGetVersioningVersion>5.10.0-rc.7240</NuGetVersioningVersion>
<NuGetFrameworksVersion>5.10.0-rc.7240</NuGetFrameworksVersion>
<SystemComponentModelAnnotationsVersion>5.0.0</SystemComponentModelAnnotationsVersion>
Expand Down
1 change: 1 addition & 0 deletions eng/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ if [[ "$binary_log" == true ]]; then
if [[ "$found" == false ]]; then
msbuild_args[${#msbuild_args[*]}]="/bl:$log_dir/Build.binlog"
fi
toolset_build_args[${#toolset_build_args[*]}]="/bl:$log_dir/Build.repotasks.binlog"
elif [[ "$ci" == true ]]; then
# Ensure the artifacts/log directory isn't empty to avoid warnings.
touch "$log_dir/empty.log"
Expand Down
113 changes: 0 additions & 113 deletions eng/scripts/ci-source-build.sh

This file was deleted.

24 changes: 24 additions & 0 deletions eng/scripts/prepare-sourcebuild-globaljson.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/usr/bin/env bash

set -euo pipefail

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

while IFS= read -r line
do
# Remove dotnet/x64 runtimes
if [[ "$line" == *"dotnet/x86"* ]]
then
while IFS= read -r removeLine
do
if [[ "$removeLine" == *"]"* ]]
then
break
fi
done
else
# Change dotnet/x64 to dotnet
echo "${line/dotnet\/x64/dotnet}"
fi
done < $DIR/../../global.json > global.json.swap
mv global.json.swap $DIR/../../global.json

This file was deleted.

This file was deleted.

Loading