Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Favor project-specific build scripts over top-level script #29918

Merged
merged 13 commits into from
Feb 16, 2021
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
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
30 changes: 15 additions & 15 deletions .azure/pipelines/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ stages:
# This is intentional to workaround https://github.com/dotnet/arcade/issues/1957 which always re-submits for code-signing, even
# if they have already been signed. This results in slower builds due to re-submitting the same .nupkg many times for signing.
# The sign settings have been configured to
- script: ./build.cmd
- script: ./eng/build.cmd
-ci
-arch x64
-pack
Expand All @@ -165,7 +165,7 @@ stages:

# Build the x86 shared framework
# This is going to actually build x86 native assets.
- script: ./build.cmd
- script: ./eng/build.cmd
-ci
-noBuildRepoTasks
-arch x86
Expand Down Expand Up @@ -193,7 +193,7 @@ stages:
# This runs code-signing on all packages, zips, and jar files as defined in build/CodeSign.targets. If
# https://github.com/dotnet/arcade/issues/1957 is resolved, consider running code-signing inline with the other
# previous steps. Sign check is disabled because it is run in a separate step below, after installers are built.
- script: ./build.cmd
- script: ./eng/build.cmd
-ci
-noBuildRepoTasks
-noBuildNative
Expand All @@ -206,7 +206,7 @@ stages:
displayName: Code sign packages

# Windows installers bundle both x86 and x64 assets
- script: ./build.cmd
- script: ./eng/build.cmd
-ci
-noBuildRepoTasks
-sign
Expand Down Expand Up @@ -287,7 +287,7 @@ stages:
- name: Windows_arm64_Installers
path: artifacts/installers/
steps:
- script: ./build.cmd
- script: ./eng/build.cmd
-ci
-arch arm64
-sign
Expand All @@ -302,7 +302,7 @@ stages:
displayName: Build ARM64

# Windows installers bundle for arm64
- script: ./build.cmd
- script: ./eng/build.cmd
-ci
-noBuildRepoTasks
-arch arm64
Expand Down Expand Up @@ -399,7 +399,7 @@ stages:
agentOs: Linux
useHostedUbuntu: false
steps:
- script: ./build.sh
- script: ./eng/build.sh
--ci
--arch x64
--pack
Expand Down Expand Up @@ -529,7 +529,7 @@ stages:
jobDisplayName: "Build: Linux Musl x64"
agentOs: Linux
container: mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.9-WithNode-0fc54a3-20190918214015
buildScript: ./build.sh
buildScript: ./eng/build.sh
buildArgs:
--arch x64
--os-name linux-musl
Expand Down Expand Up @@ -566,7 +566,7 @@ stages:
agentOs: Linux
useHostedUbuntu: false
container: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-cross-arm-alpine-20200827125937-14441ae
buildScript: ./build.sh
buildScript: ./eng/build.sh
buildArgs:
--arch arm
--os-name linux-musl
Expand Down Expand Up @@ -602,7 +602,7 @@ stages:
agentOs: Linux
useHostedUbuntu: false
container: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-cross-arm64-alpine-20200413125008-406629a
buildScript: ./build.sh
buildScript: ./eng/build.sh
buildArgs:
--arch arm64
--os-name linux-musl
Expand Down Expand Up @@ -670,7 +670,7 @@ stages:
isTestingJob: true
testRunTitle: Templates-$(AgentOsName)-$(BuildConfiguration)
steps:
- script: ./build.cmd -ci -nobl -all -pack $(_InternalRuntimeDownloadArgs)
- script: ./eng/build.cmd -ci -nobl -all -pack $(_InternalRuntimeDownloadArgs)
displayName: Build Repo
- script: ./src/ProjectTemplates/build.cmd -ci -nobl -noBuildRepoTasks -pack -NoRestore -noBuildNative -NoBuilddeps "/p:RunTemplateTests=true"
displayName: Pack Templates
Expand Down Expand Up @@ -745,13 +745,13 @@ stages:
timeoutInMinutes: 240
steps:
# Build the shared framework
- script: ./build.cmd -ci -nobl -all -pack -arch x64
- script: ./eng/build.cmd -ci -nobl -all -pack -arch x64
/p:CrossgenOutput=false /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log $(_InternalRuntimeDownloadArgs)
displayName: Build shared fx
- script: ./build.cmd -ci -nobl -noBuildRepoTasks -restore -noBuild -noBuildNative -projects src/Grpc/**/*.csproj
- script: ./eng/build.cmd -ci -nobl -noBuildRepoTasks -restore -noBuild -noBuildNative -projects src/Grpc/**/*.csproj
/p:CrossgenOutput=false /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log $(_InternalRuntimeDownloadArgs)
displayName: Restore interop projects
- script: ./build.cmd -ci -nobl -noBuildRepoTasks -noRestore -test -all -noBuildNative -projects eng\helix\helix.proj
- script: ./eng/build.cmd -ci -nobl -noBuildRepoTasks -noRestore -test -all -noBuildNative -projects eng\helix\helix.proj
/p:IsRequiredCheck=true /p:IsHelixJob=true /p:BuildInteropProjects=true /p:RunTemplateTests=true
/p:CrossgenOutput=false /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log $(_InternalRuntimeDownloadArgs)
displayName: Run build.cmd helix target
Expand Down Expand Up @@ -845,4 +845,4 @@ stages:
enableSymbolValidation: false
enableSigningValidation: false
enableNugetValidation: false
publishInstallersAndChecksums: true
publishInstallersAndChecksums: true
8 changes: 4 additions & 4 deletions .azure/pipelines/devBuilds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ stages:
jobDisplayName: "Build: Components"
agentOs: Windows
steps:
- script: ./build.cmd
- script: ./eng/build.cmd
-ci
-arch x64
/bl:$(Build.SourcesDirectory)/artifacts/log/build.components.x64.binlog
Expand All @@ -43,7 +43,7 @@ stages:
jobDisplayName: "Build: Servers"
agentOs: Windows
steps:
- script: ./build.cmd
- script: ./eng/build.cmd
-ci
-arch x64
/bl:$(Build.SourcesDirectory)/artifacts/log/build.servers.x64.binlog
Expand All @@ -66,7 +66,7 @@ stages:
jobDisplayName: "Build: Project Templates"
agentOs: Windows
steps:
- script: ./build.cmd
- script: ./eng/build.cmd
-ci
-arch x64
/bl:$(Build.SourcesDirectory)/artifacts/log/build.projectTemplates.x64.binlog
Expand All @@ -89,7 +89,7 @@ stages:
jobDisplayName: "Build: Everything"
agentOs: Windows
steps:
- script: ./build.cmd
- script: ./eng/build.cmd
-ci
-arch x64
/bl:$(Build.SourcesDirectory)/artifacts/log/build.all.x64.binlog
Expand Down
8 changes: 4 additions & 4 deletions .azure/pipelines/helix-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ jobs:
timeoutInMinutes: 480
steps:
# Build the shared framework
- script: ./build.cmd -ci -nobl -all -pack -arch x64
- script: ./eng/build.cmd -ci -nobl -all -pack -arch x64
/p:CrossgenOutput=false /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log
displayName: Build shared fx
- script: ./build.cmd -ci -nobl -noBuildRepoTasks -restore -noBuild -noBuildNative -projects src/Grpc/**/*.csproj
- script: ./eng/build.cmd -ci -nobl -noBuildRepoTasks -restore -noBuild -noBuildNative -projects src/Grpc/**/*.csproj
/p:CrossgenOutput=false /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log
displayName: Restore interop projects
- script: .\build.cmd -ci -nobl -noBuildRepoTasks -NoRestore -test -all -noBuildNative -projects eng\helix\helix.proj
Expand All @@ -59,10 +59,10 @@ jobs:
agentOs: Linux
timeoutInMinutes: 480
steps:
- script: ./build.sh --ci --nobl --pack --arch arm64
- script: ./eng/build.sh --ci --nobl --pack --arch arm64
/p:CrossgenOutput=false /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log
displayName: Build shared Fx
- script: ./build.sh --ci --nobl --arch arm64 --noBuildRepoTasks --no-build-nodejs --no-restore --test --all
- script: ./eng/build.sh --ci --nobl --arch arm64 --noBuildRepoTasks --no-build-nodejs --no-restore --test --all
--projects $(Build.SourcesDirectory)/eng/helix/helix.proj /p:IsHelixJob=true /p:IsHelixDaily=true
/p:CrossgenOutput=false /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log
displayName: Run build.sh helix arm64 target
Expand Down
2 changes: 1 addition & 1 deletion .azure/pipelines/jobs/default-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ parameters:
# jobName: '' - use agentOs by default.
# jobDisplayName: '' - use agentOs by default.
artifacts: []
buildDirectory: ''
buildDirectory: $(System.DefaultWorkingDirectory)/eng/
buildScript: ''
installTar: true
installNodeJs: true
Expand Down
18 changes: 9 additions & 9 deletions .azure/pipelines/quarantined-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ jobs:
timeoutInMinutes: 120
steps:
# Build the shared framework
- script: ./build.cmd -ci -nobl -all -pack -arch x64
- script: ./eng/build.cmd -ci -nobl -all -pack -arch x64
/p:CrossgenOutput=false /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log
displayName: Build shared fx
- script: ./build.cmd -ci -nobl -noBuildRepoTasks -restore -noBuild -noBuildNative -projects src/Grpc/**/*.csproj
- script: ./eng/build.cmd -ci -nobl -noBuildRepoTasks -restore -noBuild -noBuildNative -projects src/Grpc/**/*.csproj
/p:CrossgenOutput=false /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log
displayName: Restore interop projects
- script: ./build.cmd -ci -nobl -noBuildRepoTasks -noRestore -test -all -noBuildJava -noBuildNative
- script: ./eng/build.cmd -ci -nobl -noBuildRepoTasks -noRestore -test -all -noBuildJava -noBuildNative
-projects eng\helix\helix.proj /p:RunQuarantinedTests=true /p:IsRequiredCheck=true /p:IsHelixJob=true
/p:BuildInteropProjects=true /p:RunTemplateTests=true
/p:CrossgenOutput=false /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log
Expand All @@ -84,12 +84,12 @@ jobs:
timeoutInMinutes: 90
isTestingJob: true
steps:
- powershell: "& ./build.ps1 -CI -nobl -all -pack -NoBuildJava"
- powershell: "& ./eng/build.ps1 -CI -nobl -all -pack -NoBuildJava"
displayName: Build
# The templates part can be removed when the Blazor Templates run on Helix
- script: ./src/ProjectTemplates/build.cmd -ci -nobl -pack -NoRestore -NoBuildNative -NoBuilddeps "/p:RunTemplateTests=true"
displayName: Pack Templates
- script: ./build.cmd -ci -nobl -test -NoRestore -NoBuild -NoBuilddeps "/p:RunTemplateTests=true /p:RunQuarantinedTests=true /p:SkipHelixReadyTests=true"
- script: ./eng/build.cmd -ci -nobl -test -NoRestore -NoBuild -NoBuilddeps "/p:RunTemplateTests=true /p:RunQuarantinedTests=true /p:SkipHelixReadyTests=true"
displayName: Run Quarantined Tests
continueOnError: true
- task: PublishTestResults@2
Expand Down Expand Up @@ -119,12 +119,12 @@ jobs:
timeoutInMinutes: 120
isTestingJob: true
steps:
- bash: ./build.sh --all --pack --ci --nobl --no-build-java
- bash: ./eng/build.sh --all --pack --ci --nobl --no-build-java
displayName: Build
# The templates part can be removed when the Blazor Templates run on Helix
- bash: ./src/ProjectTemplates/build.sh --ci --nobl --pack --no-restore --no-build-deps
displayName: Pack Templates (for Template tests)
- bash: ./build.sh --no-build --ci --nobl --test -p:RunTemplateTests=true -p:RunQuarantinedTests=true -p:SkipHelixReadyTests=true
- bash: ./eng/build.sh --no-build --ci --nobl --test -p:RunTemplateTests=true -p:RunQuarantinedTests=true -p:SkipHelixReadyTests=true
displayName: Run Quarantined Tests
continueOnError: true
- task: PublishTestResults@2
Expand Down Expand Up @@ -155,12 +155,12 @@ jobs:
isTestingJob: true
useHostedUbuntu: false
steps:
- bash: ./build.sh --all --pack --ci --nobl --no-build-java
- bash: ./eng/build.sh --all --pack --ci --nobl --no-build-java
displayName: Build
# The templates part can be removed when the Blazor Templates run on Helix
- bash: ./src/ProjectTemplates/build.sh --ci --nobl --pack --no-restore --no-build-deps
displayName: Pack Templates (for Template tests)
- bash: ./build.sh --no-build --ci --nobl --test -p:RunTemplateTests=true -p:RunQuarantinedTests=true -p:SkipHelixReadyTests=true
- bash: ./eng/build.sh --no-build --ci --nobl --test -p:RunTemplateTests=true -p:RunQuarantinedTests=true -p:SkipHelixReadyTests=true
displayName: Run Quarantined Tests
continueOnError: true
- task: PublishTestResults@2
Expand Down
10 changes: 5 additions & 5 deletions .azure/pipelines/quarantined-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ jobs:
timeoutInMinutes: 480
steps:
# Build the shared framework
- script: ./build.cmd -ci -nobl -all -pack -arch x64
- script: ./eng/build.cmd -ci -nobl -all -pack -arch x64
/p:CrossgenOutput=false /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log
displayName: Build shared fx
- script: ./build.cmd -ci -nobl -noBuildRepoTasks -restore -noBuild -noBuildNative -projects src/Grpc/**/*.csproj
- script: ./eng/build.cmd -ci -nobl -noBuildRepoTasks -restore -noBuild -noBuildNative -projects src/Grpc/**/*.csproj
/p:CrossgenOutput=false /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log
displayName: Restore interop projects
- script: ./build.cmd -ci -nobl -noBuildRepoTasks -noRestore -test -all -noBuildJava -noBuildNative
- script: ./eng/build.cmd -ci -nobl -noBuildRepoTasks -noRestore -test -all -noBuildJava -noBuildNative
-projects eng\helix\helix.proj /p:IsHelixDaily=true /p:RunQuarantinedTests=true /p:IsRequiredCheck=true
/p:IsHelixJob=true /p:BuildInteropProjects=true /p:RunTemplateTests=true
/p:CrossgenOutput=false /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log
Expand All @@ -56,10 +56,10 @@ jobs:
agentOs: Linux
timeoutInMinutes: 480
steps:
- script: ./build.sh --ci --nobl --pack --arch arm64
- script: ./eng/build.sh --ci --nobl --pack --arch arm64
/p:CrossgenOutput=false /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log
displayName: Build shared Fx
- script: ./build.sh --ci --nobl --arch arm64 --noBuildRepoTasks --no-build-nodejs --no-restore --test --all
- script: ./eng/build.sh --ci --nobl --arch arm64 --noBuildRepoTasks --no-build-nodejs --no-restore --test --all
--projects $(Build.SourcesDirectory)/eng/helix/helix.proj /p:IsHelixJob=true /p:IsHelixDaily=true
/p:RunQuarantinedTests=true /p:CrossgenOutput=false /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log
displayName: Run build.sh helix arm64 target
Expand Down
2 changes: 1 addition & 1 deletion AspNetCore.sln
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Html", "Html", "{13E7C397-F
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Abstractions", "Abstractions", "{412D4C15-F48F-4DB1-940A-131D1AA87088}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Html.Abstractions", "src\Html\Abstractions\src\Microsoft.AspNetCore.Html.Abstractions.csproj", "{A400C938-46E2-4B84-B06E-487B13D22E1B}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Html.Abstractions", "src\Html.Abstractions\src\Microsoft.AspNetCore.Html.Abstractions.csproj", "{A400C938-46E2-4B84-B06E-487B13D22E1B}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Http", "Http", "{3D330C1E-D773-4BA8-9E91-123544B0D672}"
EndProject
Expand Down
4 changes: 3 additions & 1 deletion docs/BuildFromSource.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,8 @@ code .

When developing in VS Code, you'll need to use the `build.cmd` or `build.sh` scripts in order to build the project. You can learn more about the command line options available, check out [the section below](using-dotnet-on-command-line-in-this-repo).

After navigating to the parent directory of the desired project, you can run the build script for that individual project.
Copy link
Member

Choose a reason for hiding this comment

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

Does "parent directory" here mean something like "closest ancestor directory that contains a build.cmd/build.sh file"? Many of the .csproj files don't have a build script in their immediate parent directory.

Copy link
Member Author

Choose a reason for hiding this comment

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

Correct -- I've added some more text/samples here to explain the relationship between the build scripts and the project modified.


On Windows:

```powershell
Expand Down Expand Up @@ -266,7 +268,7 @@ source ./activate.sh

### Running tests on command-line

Tests are not run by default. Use the `-test` option to run tests in addition to building.
Tests are not run by default. Within an project's parent directory, use the `-test` option to run tests in addition to building.

On Windows:

Expand Down
Loading