diff --git a/.vsts/builds/ci-official.yml b/.vsts/builds/ci-official.yml new file mode 100644 index 0000000000..86f5079ad8 --- /dev/null +++ b/.vsts/builds/ci-official.yml @@ -0,0 +1,193 @@ +phases: +- phase: Windows + queue: + name: DotNetCore-Windows + timeoutInMinutes: 120 + matrix: + Release: + BuildConfiguration: Release + # see https://github.com/dotnet/core-eng/issues/4053 + demands: in(agent.name, 'DDVSOSWINAGE086', 'DDVSOSWINAGE087') + variables: + CI: true + DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true + steps: + - task: NodeTool@0 + displayName: Install Node 10.x + inputs: + versionSpec: 10.x + # TODO: configure build.cmd to build both x64 and x86 in one invocation + # TODO build.cmd -ci + - script: build.cmd /p:SkipTests=true /p:Configuration=$(BuildConfiguration) /p:BuildNumber=$(Build.BuildNumber) /t:Build /t:BuildSharedFx /p:SharedFxRID=win-x64 /t:BuildFallbackArchive + displayName: Build NuGet packages and win-x64 runtime + - script: build.cmd /p:SkipTests=true /p:Configuration=$(BuildConfiguration) /p:BuildNumber=$(Build.BuildNumber) /t:BuildSharedFx /p:SharedFxRID=win-x86 + displayName: Build win-x86 runtime + - powershell: > + src/Installers/Windows/clone_and_build_ancm.ps1 + -GitCredential '$(dn-bot-devdiv-build-rw-code-rw)' + -Config $(BuildConfiguration) + -BuildNumber $(Build.BuildNumber) + displayName: Build ANCM installers + # TODO: configure harvesting to run as a part of build.cmd + - powershell: > + src/Installers/Windows/build.ps1 + -x64 artifacts/assets/Runtime/2.2.0-preview1-$(Build.BuildNumber)/aspnetcore-runtime-internal-2.2.0-preview1-$(Build.BuildNumber)-win-x64.zip + -x86 artifacts/assets/Runtime/2.2.0-preview1-$(Build.BuildNumber)/aspnetcore-runtime-internal-2.2.0-preview1-$(Build.BuildNumber)-win-x86.zip + -Config $(BuildConfiguration) + -BuildNumber $(Build.BuildNumber) + displayName: Build Windows installers + - task: PublishTestResults@2 + displayName: Publish test results + condition: always() + inputs: + testRunner: vstest + testResultsFiles: 'artifacts/logs/**/*.trx' + - task: PublishBuildArtifacts@1 + displayName: Upload artifacts + condition: eq(variables['system.pullrequest.isfork'], false) + inputs: + pathtoPublish: ./artifacts/ + artifactName: artifacts-Windows-Release + artifactType: Container + +- phase: macOS + dependsOn: Windows + queue: + name: Hosted macOS Preview + matrix: + Release: + BuildConfiguration: Release + variables: + CI: true + DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true + steps: + - task: DownloadBuildArtifacts@0 + displayName: Download artifacts + inputs: + artifactName: artifacts-Windows-Release + downloadPath: $(Build.SourcesDirectory)/.deps + itemPattern: '**/*.nupkg' + # Workaround https://github.com/Microsoft/vsts-tasks/issues/6739 + - task: CopyFiles@2 + displayName: Copy package assets to correct folder + inputs: + sourceFolder: $(Build.SourcesDirectory)/.deps/artifacts-Windows-Release + targetFolder: $(Build.SourcesDirectory)/.deps + - script: > + ./build.sh + --ci + /t:Prepare + /t:Restore + /t:GeneratePropsFiles + /t:BuildSharedFx + /p:SharedFxRID=osx-x64 + /p:BuildNumber=$(Build.BuildNumber) + displayName: Build osx-x64 runtime + - task: PublishTestResults@2 + displayName: Publish test results + condition: always() + inputs: + testRunner: vstest + testResultsFiles: 'artifacts/logs/**/*.trx' + - task: PublishBuildArtifacts@1 + displayName: Upload artifacts + condition: eq(variables['system.pullrequest.isfork'], false) + inputs: + pathtoPublish: ./artifacts/ + artifactName: artifacts-macOS-Release + artifactType: Container + +- phase: Linux + dependsOn: + - Windows + - macOS + queue: + name: DotNetCore-Linux + matrix: + Release: + BuildConfiguration: Release + variables: + CI: true + DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true + steps: + - task: DownloadBuildArtifacts@0 + displayName: Download artifacts + inputs: + artifactName: artifacts-Windows-Release + downloadPath: $(Build.SourcesDirectory)/.deps + itemPattern: '**/*.nupkg' + - task: DownloadBuildArtifacts@0 + displayName: Download Windows artifacts + inputs: + artifactName: artifacts-Windows-Release + downloadPath: $(Build.SourcesDirectory)/.r + itemPattern: '**/aspnetcore-runtime-*' + - task: DownloadBuildArtifacts@0 + displayName: Download macOS artifacts + inputs: + artifactName: artifacts-macOS-Release + downloadPath: $(Build.SourcesDirectory)/.r + itemPattern: '**/aspnetcore-runtime-*' + # Workaround https://github.com/Microsoft/vsts-tasks/issues/6739 + - task: CopyFiles@2 + displayName: Copy package assets to correct folder + inputs: + sourceFolder: $(Build.SourcesDirectory)/.deps/artifacts-Windows-Release + targetFolder: $(Build.SourcesDirectory)/.deps + # TODO: Make the cumulative zips build in their own step + - task: CopyFiles@2 + displayName: Copy package assets to correct folder + inputs: + sourceFolder: $(Build.SourcesDirectory)/.r/artifacts-Windows-Release + targetFolder: $(Build.SourcesDirectory)/artifacts/ + - task: CopyFiles@2 + displayName: Copy package assets to correct folder + inputs: + sourceFolder: $(Build.SourcesDirectory)/.r/artifacts-macOS-Release + targetFolder: $(Build.SourcesDirectory)/artifacts/ + - script: > + ./build.sh + --ci + /t:Prepare + /t:Restore + /t:GeneratePropsFiles + /t:BuildSharedFx + /p:SharedFxRID=linux-x64 + /p:BuildNumber=$(Build.BuildNumber) + displayName: Build linux-x64 runtime + - script: > + ./build.sh + --ci + /t:BuildSharedFx + /p:SharedFxRID=linux-arm + /p:BuildNumber=$(Build.BuildNumber) + displayName: Build linux-arm runtime + - script: > + ./dockerbuild.sh + alpine + /t:Prepare + /t:GeneratePropsFiles + /t:BuildSharedFx + /p:SharedFxRID=linux-musl-x64 + /p:BuildNumber=$(Build.BuildNumber) + displayName: Build linux-musl-x64 runtime + # TODO: configure installers to run in one build.sh invocation + - script: > + ./build.sh + --ci + /t:BuildInstallers + /p:_SharedFxSourceDir=$(Build.SourcesDirectory)/artifacts/assets/Runtime/2.2.0-preview1-$(Build.BuildNumber)/ + displayName: Build linux installers + - task: PublishTestResults@2 + displayName: Publish test results + condition: always() + inputs: + testRunner: vstest + testResultsFiles: 'artifacts/logs/**/*.trx' + - task: PublishBuildArtifacts@1 + displayName: Upload artifacts + condition: eq(variables['system.pullrequest.isfork'], false) + inputs: + pathtoPublish: ./artifacts/ + artifactName: artifacts-Linux-Release + artifactType: Container diff --git a/build/SharedFx.props b/build/SharedFx.props index babe57db55..98b00c1240 100644 --- a/build/SharedFx.props +++ b/build/SharedFx.props @@ -1,10 +1,10 @@ - <_WorkRoot>$(RepositoryRoot).w\ + <_WorkRoot>$(RepositoryRoot).w\$(SharedFxRID)\ <_WorkLayoutDir>$(_WorkRoot).l\ <_WorkOutputDir>$(_WorkRoot).o\ - <_MetapackageSrcRoot>$(RepositoryRoot)src\ + <_MetapackageSrcRoot>$(RepositoryRoot)src\Packages\ <_TemplatesDir>$(MSBuildThisFileDirectory)tools\templates\ <_DockerDir>$(MSBuildThisFileDirectory)tools\docker\ <_PackagingDir>$(MSBuildThisFileDirectory)tools\packaging\ @@ -17,6 +17,8 @@ : %3B + .tar.gz + .zip lib .so diff --git a/build/SharedFx.targets b/build/SharedFx.targets index 1705e6ae83..0544fc522c 100644 --- a/build/SharedFx.targets +++ b/build/SharedFx.targets @@ -8,9 +8,9 @@ - <_MetapackageProject Include="$(RepositoryRoot)src\Microsoft.AspNetCore.All\Microsoft.AspNetCore.All.csproj" /> - <_MetapackageProject Include="$(RepositoryRoot)src\Microsoft.AspNetCore.App\Microsoft.AspNetCore.App.csproj" /> - <_MetapackageProject Include="$(RepositoryRoot)src\Microsoft.AspNetCore.Analyzers\Microsoft.AspNetCore.Analyzers.csproj" /> + <_MetapackageProject Include="$(RepositoryRoot)src\Packages\Microsoft.AspNetCore.All\Microsoft.AspNetCore.All.csproj" /> + <_MetapackageProject Include="$(RepositoryRoot)src\Packages\Microsoft.AspNetCore.App\Microsoft.AspNetCore.App.csproj" /> + <_MetapackageProject Include="$(RepositoryRoot)src\Packages\Microsoft.AspNetCore.Analyzers\Microsoft.AspNetCore.Analyzers.csproj" /> $(_MetapackageSrcRoot)$(MetapackageName)\ - $(_WorkRoot)$(MetapackageName)\ + $(_WorkRoot)pkg\$(MetapackageName)\ $(CommonProps);Configuration=$(Configuration) $(CommonProps);DotNetRestoreSourcePropsPath=$(GeneratedRestoreSourcesPropsPath) @@ -48,7 +48,7 @@ @@ -109,7 +109,7 @@ BuildInParallel="false" /> - + true false @@ -165,12 +165,12 @@ Properties="$(RestoreProps);_Target=Restore;RestoreForce=true" /> - + - SharedFxWorkDirectory=$(AppSharedFxWorkDirectory) + RepositoryCommit=$(RepositoryCommit);SharedFxWorkDirectory=$(AppSharedFxWorkDirectory) $(AppSharedFxProps);RuntimeFrameworkVersion=$(MicrosoftNETCoreApp22PackageVersion) $(AppSharedFxProps);SharedFxPackage=Microsoft.AspNetCore.App - SharedFxWorkDirectory=$(AllSharedFxWorkDirectory) + RepositoryCommit=$(RepositoryCommit);SharedFxWorkDirectory=$(AllSharedFxWorkDirectory) $(AllSharedFxProps);RuntimeFrameworkVersion=$(MicrosoftNETCoreApp22PackageVersion) $(AllSharedFxProps);SharedFxPackage=Microsoft.AspNetCore.All $(AllSharedFxProps);SharedFxDep=Microsoft.AspNetCore.App @@ -178,7 +178,7 @@ - + @@ -186,9 +186,9 @@ - + - + @@ -515,8 +515,10 @@ - - + + - + diff --git a/src/Directory.Build.targets b/src/Packages/Directory.Build.targets similarity index 100% rename from src/Directory.Build.targets rename to src/Packages/Directory.Build.targets diff --git a/src/Microsoft.AspNetCore.All/Microsoft.AspNetCore.All.csproj b/src/Packages/Microsoft.AspNetCore.All/Microsoft.AspNetCore.All.csproj similarity index 100% rename from src/Microsoft.AspNetCore.All/Microsoft.AspNetCore.All.csproj rename to src/Packages/Microsoft.AspNetCore.All/Microsoft.AspNetCore.All.csproj diff --git a/src/Microsoft.AspNetCore.All/build/netcoreapp2.2/Microsoft.AspNetCore.All.props b/src/Packages/Microsoft.AspNetCore.All/build/netcoreapp2.2/Microsoft.AspNetCore.All.props similarity index 100% rename from src/Microsoft.AspNetCore.All/build/netcoreapp2.2/Microsoft.AspNetCore.All.props rename to src/Packages/Microsoft.AspNetCore.All/build/netcoreapp2.2/Microsoft.AspNetCore.All.props diff --git a/src/Microsoft.AspNetCore.All/build/netcoreapp2.2/Microsoft.AspNetCore.All.targets b/src/Packages/Microsoft.AspNetCore.All/build/netcoreapp2.2/Microsoft.AspNetCore.All.targets similarity index 100% rename from src/Microsoft.AspNetCore.All/build/netcoreapp2.2/Microsoft.AspNetCore.All.targets rename to src/Packages/Microsoft.AspNetCore.All/build/netcoreapp2.2/Microsoft.AspNetCore.All.targets diff --git a/src/Microsoft.AspNetCore.All/lib/netcoreapp2.2/_._ b/src/Packages/Microsoft.AspNetCore.All/lib/netcoreapp2.2/_._ similarity index 100% rename from src/Microsoft.AspNetCore.All/lib/netcoreapp2.2/_._ rename to src/Packages/Microsoft.AspNetCore.All/lib/netcoreapp2.2/_._ diff --git a/src/Microsoft.AspNetCore.Analyzers/Microsoft.AspNetCore.Analyzers.csproj b/src/Packages/Microsoft.AspNetCore.Analyzers/Microsoft.AspNetCore.Analyzers.csproj similarity index 100% rename from src/Microsoft.AspNetCore.Analyzers/Microsoft.AspNetCore.Analyzers.csproj rename to src/Packages/Microsoft.AspNetCore.Analyzers/Microsoft.AspNetCore.Analyzers.csproj diff --git a/src/Microsoft.AspNetCore.App/Microsoft.AspNetCore.App.csproj b/src/Packages/Microsoft.AspNetCore.App/Microsoft.AspNetCore.App.csproj similarity index 100% rename from src/Microsoft.AspNetCore.App/Microsoft.AspNetCore.App.csproj rename to src/Packages/Microsoft.AspNetCore.App/Microsoft.AspNetCore.App.csproj diff --git a/src/Microsoft.AspNetCore.App/build/netcoreapp2.2/Microsoft.AspNetCore.App.props b/src/Packages/Microsoft.AspNetCore.App/build/netcoreapp2.2/Microsoft.AspNetCore.App.props similarity index 100% rename from src/Microsoft.AspNetCore.App/build/netcoreapp2.2/Microsoft.AspNetCore.App.props rename to src/Packages/Microsoft.AspNetCore.App/build/netcoreapp2.2/Microsoft.AspNetCore.App.props diff --git a/src/Microsoft.AspNetCore.App/build/netcoreapp2.2/Microsoft.AspNetCore.App.targets b/src/Packages/Microsoft.AspNetCore.App/build/netcoreapp2.2/Microsoft.AspNetCore.App.targets similarity index 100% rename from src/Microsoft.AspNetCore.App/build/netcoreapp2.2/Microsoft.AspNetCore.App.targets rename to src/Packages/Microsoft.AspNetCore.App/build/netcoreapp2.2/Microsoft.AspNetCore.App.targets diff --git a/src/Microsoft.AspNetCore.App/lib/netcoreapp2.2/_._ b/src/Packages/Microsoft.AspNetCore.App/lib/netcoreapp2.2/_._ similarity index 100% rename from src/Microsoft.AspNetCore.App/lib/netcoreapp2.2/_._ rename to src/Packages/Microsoft.AspNetCore.App/lib/netcoreapp2.2/_._