Skip to content

Commit

Permalink
add flag to use stage 2
Browse files Browse the repository at this point in the history
  • Loading branch information
cdmihai committed Aug 30, 2018
1 parent f7f2692 commit eaeb796
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion build.cmd
@@ -1,3 +1,3 @@
@echo off
powershell -NoLogo -NoProfile -ExecutionPolicy ByPass "%~dp0build\build.ps1" -build -bootstraponly -skiptests %*
powershell -NoLogo -NoProfile -ExecutionPolicy ByPass "%~dp0build\build.ps1" -build -skiptests %*
exit /b %ErrorLevel%
10 changes: 5 additions & 5 deletions build/build.ps1
Expand Up @@ -12,7 +12,7 @@ Param(
[switch] $sign,
[switch] $skiptests,
[switch] $test,
[switch] $bootstrapOnly,
[switch] $bootstrap,
[string] $verbosity = "minimal",
[string] $hostType,
[switch] $DotNetBuildFromSource,
Expand All @@ -38,7 +38,7 @@ function Print-Usage() {
Write-Host " -rebuild Rebuild solution"
Write-Host " -skipTests Don't run tests"
Write-Host " -test Run tests. Ignores skipTests"
Write-Host " -bootstrapOnly Don't run build again with bootstrapped MSBuild"
Write-Host " -bootstrap Run build again with bootstrapped MSBuild."
Write-Host " -sign Sign build outputs"
Write-Host " -pack Package build outputs into NuGet packages and Willow components"
Write-Host ""
Expand Down Expand Up @@ -256,9 +256,9 @@ function Build {
$commonMSBuildArgs = $commonMSBuildArgs + "/p:SignToolDataPath=`"$emptySignToolDataPath`""
}

# Only test using stage 0 MSBuild if -bootstrapOnly is specified
# Only test using stage 0 MSBuild if -bootstrap is not specified
$testStage0 = $false
if ($bootstrapOnly)
if (-not $bootstrap)
{
$testStage0 = $runTests
}
Expand All @@ -269,7 +269,7 @@ function Build {
{
CallMSBuild $RepoToolsetBuildProj @msbuildArgs /p:Restore=$restore /p:Build=$build /p:Rebuild=$rebuild /p:Test=$testStage0 /p:Sign=$sign /p:Pack=$pack /p:CreateBootstrap=true @properties

if (-not $bootstrapOnly)
if ($bootstrap)
{
$bootstrapRoot = Join-Path $ArtifactsConfigurationDir "bootstrap"

Expand Down
14 changes: 7 additions & 7 deletions build/build.sh
Expand Up @@ -17,7 +17,7 @@ rebuild=false
norestore=false
sign=false
skipTests=false
bootstrapOnly=false
bootstrap=false
verbosity="minimal"
hostType="core"
properties=""
Expand All @@ -36,7 +36,7 @@ function Help() {
echo " -build Build solution"
echo " -rebuild Rebuild solution"
echo " -skipTests Don't run tests"
echo " -bootstrapOnly Don't run build again with bootstrapped MSBuild"
echo " -bootstrap Run build again with bootstrapped MSBuild"
echo " -sign Sign build outputs"
echo " -pack Package build outputs into NuGet packages and Willow components"
echo ""
Expand Down Expand Up @@ -104,8 +104,8 @@ while [[ $# -gt 0 ]]; do
skipTests=true
shift 1
;;
-bootstraponly)
bootstrapOnly=true
-bootstrap)
bootstrap=true
shift 1
;;
-usesystemmsbuild)
Expand Down Expand Up @@ -392,16 +392,16 @@ function Build {
commonMSBuildArgs="$commonMSBuildArgs /warnaserror"
fi

# Only test using stage 0 MSBuild if -bootstrapOnly is specified
# Only test using stage 0 MSBuild if -bootstrap is not specified
local testStage0=false
if $bootstrapOnly
if ! $bootstrap
then
testStage0=$test
fi

CallMSBuild $(QQ $RepoToolsetBuildProj) $commonMSBuildArgs $logCmd /p:Restore=$restore /p:Build=$build /p:Rebuild=$rebuild /p:Test=$testStage0 /p:Sign=$sign /p:Pack=$pack /p:CreateBootstrap=true $properties

if ! $bootstrapOnly
if $bootstrap
then
bootstrapRoot="$ArtifactsConfigurationDir/bootstrap"

Expand Down
2 changes: 1 addition & 1 deletion build/cibuild.cmd
@@ -1,3 +1,3 @@
@echo off
powershell -NoLogo -NoProfile -ExecutionPolicy ByPass "& '%~dp0build.ps1'" -build -pack -sign -ci -prepareMachine %*
powershell -NoLogo -NoProfile -ExecutionPolicy ByPass "& '%~dp0build.ps1'" -build -bootstrap -pack -ci -prepareMachine %*
exit /b %ErrorLevel%
2 changes: 1 addition & 1 deletion build/cibuild.sh
Expand Up @@ -8,6 +8,6 @@ while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symli
done
ScriptRoot="$( cd -P "$( dirname "$SOURCE" )" && pwd )"

bash $ScriptRoot/build.sh -fromScript $0 -build -ci -prepareMachine $*
bash $ScriptRoot/build.sh -fromScript $0 -build -bootstrap -ci -prepareMachine $*

exit $?
2 changes: 1 addition & 1 deletion netci.groovy
Expand Up @@ -73,7 +73,7 @@ def CreateJob(script, runtime, osName, isPR, machineAffinityOverride = null, sho

// sourcebuild simulation
CreateJob(
"./build/build.sh build -dotnetBuildFromSource -bootstraponly -skiptests -pack -configuration Release",
"./build/build.sh build -dotnetBuildFromSource -skiptests -pack -configuration Release",
"CoreCLR",
"RHEL7.2",
true,
Expand Down

0 comments on commit eaeb796

Please sign in to comment.