From 536096b43ebd4034ea246d82c4ffd7a16ca80b65 Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Wed, 16 Jun 2021 14:53:19 +0200 Subject: [PATCH 1/4] Free up space be deleting samples as we go --- build.cake | 9 +++++++++ scripts/azure-templates-bootstrapper.yml | 22 +++++++++++----------- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/build.cake b/build.cake index 354e768f5ee..ea179f7c9ed 100644 --- a/build.cake +++ b/build.cake @@ -450,6 +450,12 @@ Task ("samples") // build solutions locally var solutions = GetFiles ("./output/samples/**/*.sln"); + + Information ("Solutions found:"); + foreach (var sln in solutions) { + Information (" " + sln); + } + foreach (var sln in solutions) { var name = sln.GetFilenameWithoutExtension (); var slnPlatform = name.GetExtension (); @@ -476,6 +482,9 @@ Task ("samples") // skip this as this is not the correct platform } } + + // delete the build sample + CleanDirectories (sln.GetDirectory ().FullPath); } CleanDirectory ("./output/samples/"); diff --git a/scripts/azure-templates-bootstrapper.yml b/scripts/azure-templates-bootstrapper.yml index 19b197c1da7..01f3d745329 100644 --- a/scripts/azure-templates-bootstrapper.yml +++ b/scripts/azure-templates-bootstrapper.yml @@ -16,7 +16,7 @@ parameters: condition: succeeded() # whether or not to run this template shouldPublish: true # whether or not to publish the artifacts configuration: $(CONFIGURATION) # the build configuration - buildExternals: '' # the build number to download externals from + buildExternals: '4876692' # the build number to download externals from verbosity: $(VERBOSITY) # the level of verbosity to use when building docker: '' # the Docker image to build and use dockerArgs: '' # any additional arguments to pass to docker build @@ -29,17 +29,17 @@ parameters: installEmsdk: false # whether or not to install the Emscripten SDK jobs: -# - ${{ if and(ne(parameters.buildExternals, ''), startsWith(parameters.name, 'native_')) }}: -# - template: azure-templates-download.yml -# parameters: -# name: ${{ parameters.name }} -# displayName: ${{ parameters.displayName }} -# vmImage: ${{ parameters.vmImage }} -# condition: ${{ parameters.condition }} -# postBuildSteps: ${{ parameters.postBuildSteps }} -# buildExternals: ${{ parameters.buildExternals }} +- ${{ if and(ne(parameters.buildExternals, ''), startsWith(parameters.name, 'native_')) }}: + - template: azure-templates-download.yml + parameters: + name: ${{ parameters.name }} + displayName: ${{ parameters.displayName }} + vmImage: ${{ parameters.vmImage }} + condition: ${{ parameters.condition }} + postBuildSteps: ${{ parameters.postBuildSteps }} + buildExternals: ${{ parameters.buildExternals }} -# - ${{ if or(eq(parameters.buildExternals, ''), not(startsWith(parameters.name, 'native_'))) }}: +- ${{ if or(eq(parameters.buildExternals, ''), not(startsWith(parameters.name, 'native_'))) }}: - job: ${{ parameters.name }} displayName: ${{ parameters.displayName }} timeoutInMinutes: 120 From 9e59e5bac1f8511e2d8c804cf0ec912df13c06a1 Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Wed, 16 Jun 2021 16:11:57 +0200 Subject: [PATCH 2/4] Only delete if it actually built --- build.cake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build.cake b/build.cake index ea179f7c9ed..0ef77074371 100644 --- a/build.cake +++ b/build.cake @@ -424,6 +424,9 @@ Task ("samples") RunNuGetRestorePackagesConfig (sln); RunMSBuild (sln, platform: buildPlatform); + + // delete the built sample + CleanDirectories (sln.GetDirectory ().FullPath); } } @@ -482,9 +485,6 @@ Task ("samples") // skip this as this is not the correct platform } } - - // delete the build sample - CleanDirectories (sln.GetDirectory ().FullPath); } CleanDirectory ("./output/samples/"); From 275ed61e369e1ce65dfd9778ef3e6e2d3414ae96 Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Wed, 16 Jun 2021 18:35:26 +0200 Subject: [PATCH 3/4] Skip when deleted --- build.cake | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/build.cake b/build.cake index 0ef77074371..a3a0392b654 100644 --- a/build.cake +++ b/build.cake @@ -424,9 +424,6 @@ Task ("samples") RunNuGetRestorePackagesConfig (sln); RunMSBuild (sln, platform: buildPlatform); - - // delete the built sample - CleanDirectories (sln.GetDirectory ().FullPath); } } @@ -460,6 +457,10 @@ Task ("samples") } foreach (var sln in solutions) { + // might have been deleted due to a platform build and cleanup + if (!FileExists (sln)) + continue; + var name = sln.GetFilenameWithoutExtension (); var slnPlatform = name.GetExtension (); @@ -469,6 +470,8 @@ Task ("samples") if (!variants.Any ()) { // there is no platform variant BuildSample (sln); + // delete the built sample + CleanDirectories (sln.GetDirectory ().FullPath); } else { // skip as there is a platform variant } @@ -481,6 +484,8 @@ Task ("samples") (isWin && slnPlatform == ".windows"); if (shouldBuild) { BuildSample (sln); + // delete the built sample + CleanDirectories (sln.GetDirectory ().FullPath); } else { // skip this as this is not the correct platform } From 420dd06582090703cfee31a566f333ba7836b469 Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Wed, 16 Jun 2021 21:15:30 +0200 Subject: [PATCH 4/4] Build all --- scripts/azure-templates-bootstrapper.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/scripts/azure-templates-bootstrapper.yml b/scripts/azure-templates-bootstrapper.yml index 01f3d745329..19b197c1da7 100644 --- a/scripts/azure-templates-bootstrapper.yml +++ b/scripts/azure-templates-bootstrapper.yml @@ -16,7 +16,7 @@ parameters: condition: succeeded() # whether or not to run this template shouldPublish: true # whether or not to publish the artifacts configuration: $(CONFIGURATION) # the build configuration - buildExternals: '4876692' # the build number to download externals from + buildExternals: '' # the build number to download externals from verbosity: $(VERBOSITY) # the level of verbosity to use when building docker: '' # the Docker image to build and use dockerArgs: '' # any additional arguments to pass to docker build @@ -29,17 +29,17 @@ parameters: installEmsdk: false # whether or not to install the Emscripten SDK jobs: -- ${{ if and(ne(parameters.buildExternals, ''), startsWith(parameters.name, 'native_')) }}: - - template: azure-templates-download.yml - parameters: - name: ${{ parameters.name }} - displayName: ${{ parameters.displayName }} - vmImage: ${{ parameters.vmImage }} - condition: ${{ parameters.condition }} - postBuildSteps: ${{ parameters.postBuildSteps }} - buildExternals: ${{ parameters.buildExternals }} +# - ${{ if and(ne(parameters.buildExternals, ''), startsWith(parameters.name, 'native_')) }}: +# - template: azure-templates-download.yml +# parameters: +# name: ${{ parameters.name }} +# displayName: ${{ parameters.displayName }} +# vmImage: ${{ parameters.vmImage }} +# condition: ${{ parameters.condition }} +# postBuildSteps: ${{ parameters.postBuildSteps }} +# buildExternals: ${{ parameters.buildExternals }} -- ${{ if or(eq(parameters.buildExternals, ''), not(startsWith(parameters.name, 'native_'))) }}: +# - ${{ if or(eq(parameters.buildExternals, ''), not(startsWith(parameters.name, 'native_'))) }}: - job: ${{ parameters.name }} displayName: ${{ parameters.displayName }} timeoutInMinutes: 120