Skip to content

Commit

Permalink
Quick fix: Consistently use --build-*
Browse files Browse the repository at this point in the history
- avoid `/p:Build*`  on the command line (except with eng/scripts/ci-source-build.sh)
- nits:
  - remove now-useless `-buildNative` with `-all`
  - expand and correct a couple of related comments and messages
  • Loading branch information
dougbu committed Apr 21, 2020
1 parent b29de9c commit b0f4606
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 17 deletions.
18 changes: 8 additions & 10 deletions .azure/pipelines/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ stages:
-arch x64
-pack
-all
-buildNative
/bl:artifacts/log/build.x64.binlog
$(_BuildArgs)
$(_InternalRuntimeDownloadArgs)
Expand All @@ -145,7 +144,6 @@ stages:
-arch x86
-pack
-all
-buildNative
-noBuildJava
/p:OnlyPackPlatformSpecificPackages=true
/bl:artifacts/log/build.x86.binlog
Expand Down Expand Up @@ -503,7 +501,7 @@ stages:
jobDisplayName: "Test: Windows Server 2016 x64"
agentOs: Windows
isTestingJob: true
buildArgs: -all -pack -test -BuildNative "/p:SkipHelixReadyTests=true /p:SkipIISNewHandlerTests=true /p:SkipIISTests=true /p:SkipIISExpressTests=true /p:SkipIISNewShimTests=true /p:RunTemplateTests=false" $(_InternalRuntimeDownloadArgs)
buildArgs: -all -pack -test "/p:SkipHelixReadyTests=true /p:SkipIISNewHandlerTests=true /p:SkipIISTests=true /p:SkipIISExpressTests=true /p:SkipIISNewShimTests=true /p:RunTemplateTests=false" $(_InternalRuntimeDownloadArgs)
beforeBuild:
- powershell: "& ./src/Servers/IIS/tools/UpdateIISExpressCertificate.ps1; & ./src/Servers/IIS/tools/update_schema.ps1"
displayName: Setup IISExpress test certificates and schema
Expand Down Expand Up @@ -642,11 +640,11 @@ stages:
timeoutInMinutes: 180
steps:
# Build the shared framework
- script: ./build.cmd -ci -all -pack -arch x64 -buildNative /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log /bl:artifacts/log/helix.build.x64.binlog
- script: ./build.cmd -ci -all -pack -arch x64 /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log /bl:artifacts/log/helix.build.x64.binlog
displayName: Build shared fx
- script: .\restore.cmd -ci /p:BuildInteropProjects=true
displayName: Restore
- script: .\build.cmd -ci -NoRestore -test -projects eng\helix\helix.proj /p:IsRequiredCheck=true /p:IsHelixJob=true /p:BuildAllProjects=true /p:BuildInteropProjects=true /p:BuildNative=true /p:RunTemplateTests=true /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log -bl
displayName: Restore interop projects
- script: .\build.cmd -ci -NoRestore -test -all -projects eng\helix\helix.proj /p:IsRequiredCheck=true /p:IsHelixJob=true /p:BuildInteropProjects=true /p:RunTemplateTests=true /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log -bl
displayName: Run build.cmd helix target
env:
HelixApiAccessToken: $(HelixApiAccessToken) # Needed for internal queues
Expand All @@ -666,11 +664,11 @@ stages:
timeoutInMinutes: 180
steps:
# Build the shared framework
- script: ./build.cmd -ci -all -pack -arch x64 -buildNative /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log /bl:artifacts/log/helix.daily.build.x64.binlog
- script: ./build.cmd -ci -all -pack -arch x64 /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log /bl:artifacts/log/helix.daily.build.x64.binlog
displayName: Build shared fx
- script: .\restore.cmd -ci /p:BuildInteropProjects=true
displayName: Restore
- script: .\build.cmd -ci -NoRestore -test -projects eng\helix\helix.proj /p:IsHelixJob=true /p:IsHelixDaily=true /p:BuildAllProjects=true /p:BuildInteropProjects=true /p:BuildNative=true /p:RunTemplateTests=true /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log -bl
displayName: Restore interop projects
- script: .\build.cmd -ci -NoRestore -test -all -projects eng\helix\helix.proj /p:IsHelixJob=true /p:IsHelixDaily=true /p:BuildInteropProjects=true /p:RunTemplateTests=true /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log -bl
displayName: Run build.cmd helix target
env:
HelixApiAccessToken: $(HelixApiAccessToken) # Needed for internal queues
Expand All @@ -693,7 +691,7 @@ stages:
# Build the shared framework
- script: ./restore.sh -ci
displayName: Restore
- script: ./build.sh -ci --arch arm64 -test --no-build-nodejs -projects $(Build.SourcesDirectory)/eng/helix/helix.proj /p:IsHelixJob=true /p:IsHelixDaily=true /p:BuildAllProjects=true /p:BuildNative=true /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log -bl
- script: ./build.sh -ci --arch arm64 -test --no-build-nodejs --all -projects $(Build.SourcesDirectory)/eng/helix/helix.proj /p:IsHelixJob=true /p:IsHelixDaily=true /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log -bl
displayName: Run build.sh helix arm64 target
env:
HelixApiAccessToken: $(HelixApiAccessToken) # Needed for internal queues
Expand Down
6 changes: 3 additions & 3 deletions .azure/pipelines/quarantined-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ jobs:
timeoutInMinutes: 240
steps:
# Build the shared framework
- script: ./build.cmd -ci -all -pack -arch x64 -buildNative /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log /bl:artifacts/log/helix.build.x64.binlog
- script: ./build.cmd -ci -all -pack -arch x64 /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log /bl:artifacts/log/helix.build.x64.binlog
displayName: Build shared fx
- script: .\restore.cmd -ci /p:BuildInteropProjects=true
displayName: Restore
- script: .\build.cmd -ci -NoRestore -test -noBuildJava -projects eng\helix\helix.proj /p:RunQuarantinedTests=true /p:IsRequiredCheck=true /p:IsHelixJob=true /p:BuildAllProjects=true /p:BuildInteropProjects=true /p:BuildNative=true /p:RunTemplateTests=true /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log -bl
displayName: Restore interop projects
- script: .\build.cmd -ci -NoRestore -test -noBuildJava -all -projects eng\helix\helix.proj /p:RunQuarantinedTests=true /p:IsRequiredCheck=true /p:IsHelixJob=true /p:BuildInteropProjects=true /p:RunTemplateTests=true /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log -bl
displayName: Run build.cmd helix target
env:
HelixApiAccessToken: $(HelixApiAccessToken) # Needed for internal queues
Expand Down
2 changes: 1 addition & 1 deletion docs/BuildFromSource.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ On macOS/Linux:
./build.sh
```

By default, all of the C# projects are built. Some C# projects require NodeJS to be installed to compile JavaScript assets which are then checked in as source. If NodeJS is detected on the path, the NodeJS projects will be compiled as part of building C# projects. If NodeJS is not detected on the path, the JavaScript assets checked in previously will be used instead. To disable building NodeJS projects, specify /p:BuildNodeJs=false on the command line.
By default, all of the C# projects are built. Some C# projects require NodeJS to be installed to compile JavaScript assets which are then checked in as source. If NodeJS is detected on the path, the NodeJS projects will be compiled as part of building C# projects. If NodeJS is not detected on the path, the JavaScript assets checked in previously will be used instead. To disable building NodeJS projects, specify `-noBuildNodeJS` or `--no-build-nodejs` on the command line.

### Using `dotnet` on command line in this repo

Expand Down
4 changes: 2 additions & 2 deletions eng/scripts/CodeCheck.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ try {
if ($ci) {
# Install dotnet.exe
if ($DotNetRuntimeSourceFeed -or $DotNetRuntimeSourceFeedKey) {
& $repoRoot/restore.cmd -ci -NoBuildNodeJS -DotNetRuntimeSourceFeed $DotNetRuntimeSourceFeed -DotNetRuntimeSourceFeedKey $DotNetRuntimeSourceFeedKey
& $repoRoot/restore.cmd -ci -noBuildNodeJS -DotNetRuntimeSourceFeed $DotNetRuntimeSourceFeed -DotNetRuntimeSourceFeedKey $DotNetRuntimeSourceFeedKey
}
else{
& $repoRoot/restore.cmd -ci -NoBuildNodeJS
& $repoRoot/restore.cmd -ci -noBuildNodeJS
}
}

Expand Down
2 changes: 1 addition & 1 deletion eng/targets/Npm.Common.targets
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<Output TaskParameter="ExitCode" PropertyName="ErrorCode"/>
</Exec>

<Error Text="Building *.npmproj but NodeJS was not detected on path. Ensure NodeJS is on path or disable building NodeJS projects with /p:BuildNodeJs=false. Skipping NodeJS projects will also skip managed projects depending on them, including Components, Mvc and Analysers." Condition="'$(ErrorCode)' != '0'"/>
<Error Text="Building *.npmproj but NodeJS was not detected on path. Ensure NodeJS is on path or disable building NodeJS projects with -noBuildNodeJS or --no-build-nodejs. Skipping NodeJS projects will also skip managed projects depending on them, including Components, Mvc and Analysers." Condition="'$(ErrorCode)' != '0'"/>
</Target>

<Target Name="Restore">
Expand Down

0 comments on commit b0f4606

Please sign in to comment.