diff --git a/eng/pipelines/common/variables.yml b/eng/pipelines/common/variables.yml index 6008d82e36..7ce02a04e7 100644 --- a/eng/pipelines/common/variables.yml +++ b/eng/pipelines/common/variables.yml @@ -6,4 +6,16 @@ variables: - name: DOTNET_SKIP_FIRST_TIME_EXPERIENCE value: true - name: DOTNET_VERSION - value: 5.0.102 \ No newline at end of file + value: 5.0.102 +- name: LogDirectory + value: $(Build.ArtifactStagingDirectory)/logs +- name: provisionator.xcode + value: '$(System.DefaultWorkingDirectory)/eng/provisioning/xcode.csx' +- name: provisionator.path + value: '$(System.DefaultWorkingDirectory)/eng/provisioning/provisioning.csx' +- name: provisionator.vs2019 + value: '$(System.DefaultWorkingDirectory)/eng/provisioning/vs2019.csx' +- name: provisionator.extraArguments + value: '--v' +- name: DotNet.Path + value: $(System.DefaultWorkingDirectory)/bin/dotnet/dotnet diff --git a/eng/pipelines/handlers.yml b/eng/pipelines/handlers.yml index 795538439a..1480004547 100644 --- a/eng/pipelines/handlers.yml +++ b/eng/pipelines/handlers.yml @@ -48,16 +48,6 @@ schedules: variables: - template: /eng/pipelines/common/variables.yml - - name: LogDirectory - value: $(Build.ArtifactStagingDirectory)/logs - - name: provisionator.xcode - value: '$(System.DefaultWorkingDirectory)/eng/provisioning/xcode.csx' - - name: provisionator.path - value: '$(System.DefaultWorkingDirectory)/eng/provisioning/provisioning.csx' - - name: provisionator.extraArguments - value: '--v' - - name: DotNet.Path - value: $(System.DefaultWorkingDirectory)/bin/dotnet/dotnet parameters: - name: BuildEverything @@ -229,9 +219,16 @@ stages: /usr/libexec/PlistBuddy -c "add :AppleSdkRoot string $(dirname $(dirname $(xcode-select -p)))" ~/Library/Preferences/Xamarin/Settings.plist || true cat ~/Library/Preferences/Xamarin/Settings.plist || true displayName: configure vsmac xcode - - ${{ if eq(BuildPlatform.name, 'macos') }}: + - script: echo '##vso[task.setvariable variable=JI_JAVA_HOME]$(JAVA_HOME_11_X64)' displayName: set JI_JAVA_HOME + + - ${{ if eq(BuildPlatform.name, 'windows') }}: + - task: xamops.azdevex.provisionator-task.provisionator@1 + displayName: 'Provision VSWindows' + inputs: + provisioning_script: $(provisionator.vs2019) + - script: dotnet tool restore displayName: install dotnet tools - script: dotnet cake --configuration=Release @@ -307,9 +304,15 @@ stages: /usr/libexec/PlistBuddy -c "add :AppleSdkRoot string $(dirname $(dirname $(xcode-select -p)))" ~/Library/Preferences/Xamarin/Settings.plist || true cat ~/Library/Preferences/Xamarin/Settings.plist || true displayName: configure vsmac xcode - - ${{ if eq(BuildPlatform.name, 'macos') }}: - script: echo '##vso[task.setvariable variable=JI_JAVA_HOME]$(JAVA_HOME_11_X64)' displayName: set JI_JAVA_HOME + + - ${{ if eq(BuildPlatform.name, 'windows') }}: + - task: xamops.azdevex.provisionator-task.provisionator@1 + displayName: 'Provision VSWindows' + inputs: + provisioning_script: $(provisionator.vs2019) + - pwsh: | & dotnet build src/DotNet/DotNet.csproj -bl:$(LogDirectory)/$(BuildConfiguration)-dotnet.binlog & $(DotNet.Path) build Microsoft.Maui.BuildTasks-net6.sln -c $(BuildConfiguration) -bl:$(LogDirectory)/$(BuildConfiguration)-buildtasks.binlog diff --git a/eng/provisioning/vs2019.csx b/eng/provisioning/vs2019.csx new file mode 100644 index 0000000000..b0a03da7a9 --- /dev/null +++ b/eng/provisioning/vs2019.csx @@ -0,0 +1,3 @@ +VisualStudio (VisualStudioChannel.Stable, VisualStudioTier.Enterprise, 16, @"%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Enterprise", true) + .Workload (VisualStudioWorkload.ManagedDesktop) + .Workload (VisualStudioWorkload.NetCrossPlat); \ No newline at end of file