From ee07b5a9ceb27c6f0c0ca65e456eb37ba6b5e682 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Sim=C3=B5es?= Date: Wed, 15 Feb 2023 12:41:22 +0000 Subject: [PATCH] Work CI-CD - Fix missing cmake template when building in AZDO without community targets. ***NO_CI*** --- azure-pipelines-templates/build-preparations.yml | 14 ++++++++++++++ azure-pipelines.yml | 2 ++ 2 files changed, 16 insertions(+) diff --git a/azure-pipelines-templates/build-preparations.yml b/azure-pipelines-templates/build-preparations.yml index 464e206e7c..1c2b279571 100644 --- a/azure-pipelines-templates/build-preparations.yml +++ b/azure-pipelines-templates/build-preparations.yml @@ -1,6 +1,11 @@ # Copyright (c) .NET Foundation and Contributors # See LICENSE file in the project root for full license information. +parameters: + - name: repoDirectory + type: string + default: $(Build.SourcesDirectory) + steps: - task: PowerShell@2 @@ -24,3 +29,12 @@ steps: inputs: targetType: 'inline' script: New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force + + - task: PowerShell@2 + displayName: Add dummy cmake presets + condition: ne(variables['Build.Repository.Name'], 'nanoframework/nf-Community-Targets') + inputs: + workingDirectory: ${{ parameters.repoDirectory }}\targets-community + targetType: 'inline' + script: | + New-Item -Path . -Name "CMakePresets.json" -ItemType "file" -Value "{`n""version"": 4,`n""include"": []`n}" diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 236cc34ce0..73df24bcb8 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -465,6 +465,8 @@ jobs: fetchDepth: 1 - template: azure-pipelines-templates/build-preparations.yml + parameters: + repoDirectory: '$(Build.SourcesDirectory)\nf-interpreter' - template: azure-pipelines-templates/nb-gitversioning.yml parameters: repoDirectory: '$(Build.SourcesDirectory)\nf-interpreter'