-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add azure-pipeline for x64, arm64, x86, arm
- Loading branch information
Showing
6 changed files
with
150 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[submodule "vcpkg"] | ||
path = vcpkg | ||
url = https://github.com/microsoft/vcpkg.git | ||
fetchRecurseSubmodules = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
$ErrorActionPreference = "Stop" | ||
|
||
Function InstallVS | ||
{ | ||
# Microsoft hosted agents do not have the required MSVC 14.23 for building MSVC STL. | ||
# This step installs MSVC 14.23, only on Microsoft hosted agents. | ||
|
||
Param( | ||
[String]$WorkLoads, | ||
[String]$Sku, | ||
[String]$VSBootstrapperURL) | ||
$exitCode = -1 | ||
try | ||
{ | ||
Write-Host "Downloading bootstrapper ..." | ||
[string]$bootstrapperExe = Join-Path ${env:Temp} ([System.IO.Path]::GetRandomFileName() + ".exe") | ||
Invoke-WebRequest -Uri $VSBootstrapperURL -OutFile $bootstrapperExe | ||
|
||
$Arguments = ('/c', $bootstrapperExe, $WorkLoads, '--quiet', '--norestart', '--wait', '--nocache' ) | ||
|
||
Write-Host "Starting Install: $Arguments" | ||
$process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru | ||
$exitCode = $process.ExitCode | ||
|
||
if ($exitCode -eq 0 -or $exitCode -eq 3010) | ||
{ | ||
Write-Host -Object 'Installation successful!' | ||
} | ||
else | ||
{ | ||
Write-Host -Object "Non zero exit code returned by the installation process : $exitCode." | ||
} | ||
} | ||
catch | ||
{ | ||
Write-Host -Object "Failed to install Visual Studio!" | ||
Write-Host -Object $_.Exception.Message | ||
exit $exitCode | ||
} | ||
|
||
exit $exitCode | ||
} | ||
|
||
# Invalidate the standard installation of VS on the hosted agent. | ||
Move-Item "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/" "C:/Program Files (x86)/Microsoft Visual Studio/2019/nouse/" -Verbose | ||
|
||
$WorkLoads = '--add Microsoft.VisualStudio.Component.UWP.VC.ARM64 ' + ` | ||
'--add Microsoft.VisualStudio.Component.VC.CLI.Support ' + ` | ||
'--add Microsoft.VisualStudio.Component.VC.Runtimes.ARM.Spectre ' + ` | ||
'--add Microsoft.VisualStudio.Component.VC.Runtimes.ARM64.Spectre ' + ` | ||
'--add Microsoft.VisualStudio.Component.VC.Runtimes.x86.x64.Spectre ' + ` | ||
'--add Microsoft.VisualStudio.Component.VC.TestAdapterForBoostTest ' + ` | ||
'--add Microsoft.VisualStudio.Component.VC.TestAdapterForGoogleTest ' + ` | ||
'--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 ' + ` | ||
'--add Microsoft.VisualStudio.Component.VC.Tools.ARM64 ' + ` | ||
'--add Microsoft.VisualStudio.Component.VC.Tools.ARM ' + ` | ||
'--add Microsoft.VisualStudio.Component.Windows10SDK.18362 ' | ||
|
||
$ReleaseInPath = 'Preview' | ||
$Sku = 'Enterprise' | ||
$VSBootstrapperURL = 'https://aka.ms/vs/16/pre/vs_buildtools.exe' | ||
|
||
$ErrorActionPreference = 'Stop' | ||
|
||
# Install VS | ||
$exitCode = InstallVS -WorkLoads $WorkLoads -Sku $Sku -VSBootstrapperURL $VSBootstrapperURL | ||
|
||
exit $exitCode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
parameters: | ||
targetPlatform: 'x64' | ||
|
||
jobs: | ||
- job: vs2019_hosted_${{ parameters.targetPlatform }} | ||
pool: | ||
#name: Hosted Windows 2019 with VS2019 | ||
name: STL | ||
|
||
variables: | ||
vcpkgLocation: '$(Build.SourcesDirectory)/vcpkg' | ||
vcpkgResponseFile: $(Build.SourcesDirectory)/vcpkg_windows.txt | ||
steps: | ||
- checkout: self | ||
submodules: recursive | ||
- task: BatchScript@1 | ||
inputs: | ||
filename: 'azure-devops/enforce-clang-format.cmd' | ||
failOnStandardError: true | ||
displayName: 'Enforce clang-format' | ||
# Install VS 2019 preview on Microsoft Hosted Agents only. | ||
- task: PowerShell@2 | ||
displayName: 'Install MSVC preview' | ||
condition: or(contains(variables['Agent.Name'], 'Azure Pipelines'), contains(variables['Agent.Name'], 'Hosted Agent')) | ||
inputs: | ||
targetType: filePath | ||
filePath: $(Build.SourcesDirectory)/azure-devops/install_msvc_preview.ps1 | ||
- task: CacheBeta@0 | ||
displayName: Cache vcpkg | ||
inputs: | ||
key: $(vcpkgResponseFile) | $(Build.SourcesDirectory)/.git/modules/vcpkg/HEAD | ||
path: '$(vcpkgLocation)' | ||
- task: run-vcpkg@0 | ||
displayName: 'Run vcpkg to install boost-build' | ||
inputs: | ||
vcpkgArguments: 'boost-build:x86-windows' | ||
vcpkgDirectory: '$(vcpkgLocation)' | ||
- task: run-vcpkg@0 | ||
displayName: 'Run vcpkg' | ||
inputs: | ||
vcpkgArguments: '@$(vcpkgResponseFile)' | ||
vcpkgDirectory: '$(vcpkgLocation)' | ||
vcpkgTriplet: ${{ parameters.targetPlatform }}-windows | ||
- task: run-cmake@0 | ||
displayName: 'Run CMake with Ninja' | ||
enabled: true | ||
inputs: | ||
cmakeListsTxtPath: 'CMakeSettings.json' | ||
useVcpkgToolchainFile: true | ||
configurationRegexFilter: '.*${{ parameters.targetPlatform }}.*' | ||
buildDirectory: $(Build.ArtifactStagingDirectory)/${{ parameters.targetPlatform }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,21 @@ | ||
# Copyright (c) Microsoft Corporation. | ||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
pool: 'STL' | ||
|
||
steps: | ||
- task: BatchScript@1 | ||
inputs: | ||
filename: 'azure-devops/enforce-clang-format.cmd' | ||
failOnStandardError: true | ||
displayName: 'Enforce clang-format' | ||
# Copyright (c) Microsoft Corporation. | ||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
||
# Build STL targeting x64, arm64, x86, arm. | ||
|
||
jobs: | ||
- template: azure-devops/run_build.yml | ||
parameters: | ||
targetPlatform: x64 | ||
|
||
- template: azure-devops/run_build.yml | ||
parameters: | ||
targetPlatform: arm64 | ||
|
||
- template: azure-devops/run_build.yml | ||
parameters: | ||
targetPlatform: x86 | ||
|
||
- template: azure-devops/run_build.yml | ||
parameters: | ||
targetPlatform: arm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
boost-build:x86-windows | ||
boost-math:x64-windows | ||
boost-math:x86-windows | ||
boost-math:arm-windows | ||
boost-math:arm64-windows |