From f85eda658a82968869120289c57ccb90a1fbe0a6 Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Sun, 27 May 2018 18:49:18 +0100 Subject: [PATCH 01/12] Use AppVeyor build matrix to produce artefacts in separate build job that can run in parallel. --- appveyor.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 84d2f9114af..24ebba127ec 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,6 +1,11 @@ # version is set in tools\appveyor.psm1 - Invoke-AppVeyorInstall -image: Visual Studio 2017 +environment: + matrix: + - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 + Purpose: Testing + - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 + Purpose: Packaging # cache version - netcoreapp.2.1-sdk.2.1.300-rc1 cache: @@ -19,15 +24,15 @@ install: - ps: Invoke-AppveyorInstall build_script: - - ps: Invoke-AppveyorBuild + - ps: if ($env:Purpose -eq 'Testing'){ Invoke-AppveyorBuild } test_script: - - ps: Invoke-AppveyorTest + - ps: if ($env:Purpose -eq 'Testing'){ Invoke-AppveyorTest } after_test: - - ps: Invoke-AppVeyorAfterTest + - ps: (if ($env:Purpose -eq 'Testing'){ Invoke-AppVeyorAfterTest } # Run the finish command and delete files which should not be in the cache on_finish: - - ps: Invoke-AppveyorFinish + - ps: if ($env:Packaging -eq 'Packaging'){ Invoke-AppveyorFinish } - ps: Invoke-AppVeyorCleanCache From 85e363be0ecafb5af9b4804b909b4335a14c16da Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Sun, 27 May 2018 18:50:48 +0100 Subject: [PATCH 02/12] fix yaml syntax --- appveyor.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 24ebba127ec..cc9a023e981 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,6 +1,6 @@ # version is set in tools\appveyor.psm1 - Invoke-AppVeyorInstall - environment: + POWERSHELL_TELEMETRY_OPTOUT: 1 matrix: - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 Purpose: Testing @@ -15,9 +15,6 @@ cache: nuget: project_feed: true -environment: - POWERSHELL_TELEMETRY_OPTOUT: 1 - install: - git submodule update --init - ps: Import-Module .\tools\Appveyor.psm1 From c60e4bf31e8b78e755feeb41fc9c21bdf3de4b43 Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Sun, 27 May 2018 20:33:11 +0100 Subject: [PATCH 03/12] fix ps syntax --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index cc9a023e981..73911091a3a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -27,7 +27,7 @@ test_script: - ps: if ($env:Purpose -eq 'Testing'){ Invoke-AppveyorTest } after_test: - - ps: (if ($env:Purpose -eq 'Testing'){ Invoke-AppVeyorAfterTest } + - ps: if ($env:Purpose -eq 'Testing'){ Invoke-AppVeyorAfterTest } # Run the finish command and delete files which should not be in the cache on_finish: From f998055b5b510c5eead8f0d76f288cc1a1d5501c Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Sun, 27 May 2018 21:55:27 +0100 Subject: [PATCH 04/12] Make Invoke-AppVeyorCleanCache check if the folder exists (because it does not exist for the packaging build) --- tools/appveyor.psm1 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/appveyor.psm1 b/tools/appveyor.psm1 index ff0a3cd4dbd..4540cb82282 100644 --- a/tools/appveyor.psm1 +++ b/tools/appveyor.psm1 @@ -555,5 +555,9 @@ function Invoke-AppveyorFinish # Clean the Cache of files which should not be cached function Invoke-AppVeyorCleanCache { - Remove-Item $env:LocalAppData\Microsoft\dotnet\optimizationdata -Recurse -force + $dotnetOptimizationCachePath = "$env:LocalAppData\Microsoft\dotnet\optimizationdata" + if (Test-Path $dotnetOptimizationCachePath) + { + Remove-Item $dotnetOptimizationCachePath -Recurse -Force + } } From 51068256ae4d4178b469e32cf601806fed801ce5 Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Sun, 27 May 2018 21:56:31 +0100 Subject: [PATCH 05/12] Fix env variable check --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 73911091a3a..f5ba2bc157e 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -31,5 +31,5 @@ after_test: # Run the finish command and delete files which should not be in the cache on_finish: - - ps: if ($env:Packaging -eq 'Packaging'){ Invoke-AppveyorFinish } + - ps: if ($env:Purpose -eq 'Packaging'){ Invoke-AppveyorFinish } - ps: Invoke-AppVeyorCleanCache From cf3ec34f6348c3c97fa37e2f7318159df7bbc243 Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Mon, 28 May 2018 10:09:44 +0100 Subject: [PATCH 06/12] -Run packaging before testing (useful for single-threaded non-premium forks for a fail-fast approach and to get deliverables early) -Remove caching dotnet, which does not seem to pay off due to high zipping and unzipping costs -Set DOTNET_SKIP_FIRST_TIME_EXPERIENCE to 1 to save 1 minute for unnecessary cache initialization since now we always install the sdk from fresh --- appveyor.yml | 20 +++++++++++--------- tools/appveyor.psm1 | 10 ---------- 2 files changed, 11 insertions(+), 19 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index f5ba2bc157e..2c6ffd4156f 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,15 +1,18 @@ # version is set in tools\appveyor.psm1 - Invoke-AppVeyorInstall environment: POWERSHELL_TELEMETRY_OPTOUT: 1 + DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 matrix: - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - Purpose: Testing + Purpose: BuildingAndPackaging - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - Purpose: Packaging + Purpose: BuildingAndTesting + +# Stop all jobs in the matrix if any one them fail +matrix: + fast_finish: true -# cache version - netcoreapp.2.1-sdk.2.1.300-rc1 cache: - - '%LocalAppData%\Microsoft\dotnet -> appveyor.yml' - '%HOMEDRIVE%%HOMEPATH%\.nuget\packages -> appveyor.yml' nuget: @@ -21,15 +24,14 @@ install: - ps: Invoke-AppveyorInstall build_script: - - ps: if ($env:Purpose -eq 'Testing'){ Invoke-AppveyorBuild } + - ps: if ($env:Purpose -eq 'BuildingAndTesting'){ Invoke-AppveyorBuild } test_script: - - ps: if ($env:Purpose -eq 'Testing'){ Invoke-AppveyorTest } + - ps: if ($env:Purpose -eq 'BuildingAndTesting'){ Invoke-AppveyorTest } after_test: - - ps: if ($env:Purpose -eq 'Testing'){ Invoke-AppVeyorAfterTest } + - ps: if ($env:Purpose -eq 'BuildingAndTesting'){ Invoke-AppVeyorAfterTest } # Run the finish command and delete files which should not be in the cache on_finish: - - ps: if ($env:Purpose -eq 'Packaging'){ Invoke-AppveyorFinish } - - ps: Invoke-AppVeyorCleanCache + - ps: if ($env:Purpose -eq 'BuildingAndPackaging'){ Invoke-AppveyorFinish } diff --git a/tools/appveyor.psm1 b/tools/appveyor.psm1 index 4540cb82282..483e8433079 100644 --- a/tools/appveyor.psm1 +++ b/tools/appveyor.psm1 @@ -551,13 +551,3 @@ function Invoke-AppveyorFinish throw $_ } } - -# Clean the Cache of files which should not be cached -function Invoke-AppVeyorCleanCache -{ - $dotnetOptimizationCachePath = "$env:LocalAppData\Microsoft\dotnet\optimizationdata" - if (Test-Path $dotnetOptimizationCachePath) - { - Remove-Item $dotnetOptimizationCachePath -Recurse -Force - } -} From f48c1726e7698b830e4d83235590326cd94b582f Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Mon, 28 May 2018 10:48:11 +0100 Subject: [PATCH 07/12] Skip dotnet initialization for packaging only --- appveyor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 2c6ffd4156f..bef75da5d69 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,13 +1,13 @@ # version is set in tools\appveyor.psm1 - Invoke-AppVeyorInstall environment: POWERSHELL_TELEMETRY_OPTOUT: 1 - DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 matrix: - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 Purpose: BuildingAndPackaging + DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 Purpose: BuildingAndTesting - + # Stop all jobs in the matrix if any one them fail matrix: fast_finish: true From 7db9dd0e03ea609ea0207a7ee8e223f2a341b0a8 Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Mon, 28 May 2018 11:26:50 +0100 Subject: [PATCH 08/12] remove trailing whitespace --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index bef75da5d69..e7b02e2cecb 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -7,7 +7,7 @@ environment: DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 Purpose: BuildingAndTesting - + # Stop all jobs in the matrix if any one them fail matrix: fast_finish: true From 332bcd21e03c7f183f7caf4bcbab0a8bbad92fbe Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Mon, 28 May 2018 13:14:13 +0100 Subject: [PATCH 09/12] Try DOTNET_SKIP_FIRST_TIME_EXPERIENCE for both jobs (again) to see if it makes the 2nd build slower (it did before but maybe it was a bad run --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index e7b02e2cecb..2c6ffd4156f 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,10 +1,10 @@ # version is set in tools\appveyor.psm1 - Invoke-AppVeyorInstall environment: POWERSHELL_TELEMETRY_OPTOUT: 1 + DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 matrix: - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 Purpose: BuildingAndPackaging - DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 Purpose: BuildingAndTesting From 46fcd9d26055cbbf2c536b8ced8e4614a939f120 Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Mon, 4 Jun 2018 21:38:13 +0100 Subject: [PATCH 10/12] fix merge error --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index ee660e360c2..74eebc81adb 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -12,7 +12,7 @@ environment: matrix: fast_finish: true -# cache version - netcoreapp.2.1-sdk.2.1.300-rc1cache: +cache: - '%HOMEDRIVE%%HOMEPATH%\.nuget\packages -> appveyor.yml' nuget: From 37ca273b2bd1f86800f3c719b900d0f4785d676f Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Tue, 5 Jun 2018 07:36:59 +0100 Subject: [PATCH 11/12] address pr feedback about comments (different line and cache) --- appveyor.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 74eebc81adb..7d9d74a4892 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,7 +1,8 @@ # version is set in tools\appveyor.psm1 - Invoke-AppVeyorInstall environment: POWERSHELL_TELEMETRY_OPTOUT: 1 - DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 # avoid expensive initialization of dotnet cli, see: http://donovanbrown.com/post/Stop-wasting-time-during-NET-Core-builds + # Avoid expensive initialization of dotnet cli, see: http://donovanbrown.com/post/Stop-wasting-time-during-NET-Core-builds + DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 matrix: - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 Purpose: BuildingAndPackaging @@ -12,6 +13,7 @@ environment: matrix: fast_finish: true +-# cache version - netcoreapp.2.1-sdk.2.1.300 cache: - '%HOMEDRIVE%%HOMEPATH%\.nuget\packages -> appveyor.yml' From 42a98092f176eda40248e82574d347ec19c5507c Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Tue, 5 Jun 2018 07:38:30 +0100 Subject: [PATCH 12/12] fix yaml --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 7d9d74a4892..4ab026f2c98 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -13,7 +13,7 @@ environment: matrix: fast_finish: true --# cache version - netcoreapp.2.1-sdk.2.1.300 +# cache version - netcoreapp.2.1-sdk.2.1.300 cache: - '%HOMEDRIVE%%HOMEPATH%\.nuget\packages -> appveyor.yml'