diff options
| author | Billy O'Neal <bion@microsoft.com> | 2021-02-04 10:15:44 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-04 10:15:44 -0800 |
| commit | aa60b7efa56a83ead743718941d8b320ef4a05af (patch) | |
| tree | db9f9ebd6fa37598b2f5f2ad564eb858cdeddcb0 /scripts/azure-pipelines | |
| parent | f226416d2eafc495dd03572cb61542fb1670ffdc (diff) | |
| download | vcpkg-aa60b7efa56a83ead743718941d8b320ef4a05af.tar.gz vcpkg-aa60b7efa56a83ead743718941d8b320ef4a05af.zip | |
[vcpkg] Download vcpkg.exe rather than building it in bootstrap on Windows. (#15474)
This reduces bootstrap cost for Windows customers, resolving the issue initially submitted as #12502 .
The `toolsrc` tree was extracted to https://github.com/microsoft/vcpkg-tool. `bootstrap.sh` was changed to download the right source tarball, extract, and build it. This was chosen over the previous attempt, a submodule, over concerns of accidentally destroying people's local modifications.
Diffstat (limited to 'scripts/azure-pipelines')
23 files changed, 6 insertions, 1002 deletions
diff --git a/scripts/azure-pipelines/Create-FormatDiff.ps1 b/scripts/azure-pipelines/Create-PRDiff.ps1 index 599118089..599118089 100644 --- a/scripts/azure-pipelines/Create-FormatDiff.ps1 +++ b/scripts/azure-pipelines/Create-PRDiff.ps1 diff --git a/scripts/azure-pipelines/Format-CxxCode.ps1 b/scripts/azure-pipelines/Format-CxxCode.ps1 deleted file mode 100644 index 2653562a7..000000000 --- a/scripts/azure-pipelines/Format-CxxCode.ps1 +++ /dev/null @@ -1,50 +0,0 @@ -[CmdletBinding()] -Param( - [Parameter(Mandatory=$True)] - [string]$Root -) - -$Root = Resolve-Path -LiteralPath $Root - -$clangFormat = Get-Command 'clang-format' -ErrorAction 'SilentlyContinue' -if ($null -ne $clangFormat) -{ - $clangFormat = $clangFormat.Source -} - -if ($IsWindows) -{ - if ([String]::IsNullOrEmpty($clangFormat) -or -not (Test-Path $clangFormat)) - { - $clangFormat = 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\Llvm\x64\bin\clang-format.exe' - } - if (-not (Test-Path $clangFormat)) - { - $clangFormat = 'C:\Program Files\LLVM\bin\clang-format.exe' - } -} - -if ([String]::IsNullOrEmpty($clangFormat) -or -not (Test-Path $clangFormat)) -{ - Write-Error 'clang-format not found; is it installed?' - throw -} - -$toolsrc = Get-Item "$Root/toolsrc" -Push-Location $toolsrc - -try -{ - $files = Get-ChildItem -Recurse -LiteralPath "$toolsrc/src" -Filter '*.cpp' - $files += Get-ChildItem -Recurse -LiteralPath "$toolsrc/src" -Filter '*.c' - $files += Get-ChildItem -Recurse -LiteralPath "$toolsrc/include/vcpkg" -Filter '*.h' - $files += Get-ChildItem -Recurse -LiteralPath "$toolsrc/include/vcpkg-test" -Filter '*.h' - $files += Get-Item "$toolsrc/include/pch.h" - $fileNames = $files.FullName - - & $clangFormat -style=file -i @fileNames -} -finally -{ - Pop-Location -} diff --git a/scripts/azure-pipelines/azure-pipelines.yml b/scripts/azure-pipelines/azure-pipelines.yml index 7fce6a5c1..27db6a93d 100644 --- a/scripts/azure-pipelines/azure-pipelines.yml +++ b/scripts/azure-pipelines/azure-pipelines.yml @@ -21,30 +21,24 @@ stages: value: $(Build.ArtifactStagingDirectory)\format.diff
steps:
- task: Powershell@2
- displayName: 'Format C++'
- inputs:
- filePath: 'scripts/azure-pipelines/Format-CxxCode.ps1'
- arguments: '-Root .'
- pwsh: true
- - task: Powershell@2
displayName: 'Generate Documentation'
inputs:
filePath: 'docs/regenerate.ps1'
arguments: '-VcpkgRoot . -WarningAction Stop'
pwsh: true
- script: .\bootstrap-vcpkg.bat
- displayName: 'Build vcpkg'
- - script: '.\vcpkg format-manifest --all'
+ displayName: 'Bootstrap vcpkg'
+ - script: '.\vcpkg.exe format-manifest --all'
displayName: 'Format Manifests'
- task: Powershell@2
displayName: 'Create Diff'
inputs:
- filePath: scripts/azure-pipelines/Create-FormatDiff.ps1
+ filePath: scripts/azure-pipelines/Create-PRDiff.ps1
arguments: '-DiffFile $(DiffFile)'
pwsh: true
- task: PublishBuildArtifacts@1
condition: failed()
- displayName: 'Publish C++ Diff'
+ displayName: 'Publish Format and Documentation Diff'
inputs:
PathtoPublish: '$(DiffFile)'
ArtifactName: 'format.diff'
diff --git a/scripts/azure-pipelines/end-to-end-tests-dir/backcompat-helpers.ps1 b/scripts/azure-pipelines/end-to-end-tests-dir/backcompat-helpers.ps1 deleted file mode 100644 index 704b52752..000000000 --- a/scripts/azure-pipelines/end-to-end-tests-dir/backcompat-helpers.ps1 +++ /dev/null @@ -1,24 +0,0 @@ -. $PSScriptRoot/../end-to-end-tests-prelude.ps1
-
-# Test that prohibiting backcompat features actually prohibits
-$backcompatFeaturePorts = @('vcpkg-uses-test-cmake', 'vcpkg-uses-vcpkg-common-functions')
-foreach ($backcompatFeaturePort in $backcompatFeaturePorts) {
- $succeedArgs = $commonArgs + @('install',$backcompatFeaturePort,'--no-binarycaching')
- $failArgs = $succeedArgs + @('--x-prohibit-backcompat-features')
- $CurrentTest = "Should fail: ./vcpkg $($failArgs -join ' ')"
- Run-Vcpkg @failArgs
- if ($LastExitCode -ne 0) {
- Write-Host "... failed (this is good!)."
- } else {
- throw $CurrentTest
- }
-
- # Install failed when prohibiting backcompat features, so it should succeed if we allow them
- $CurrentTest = "Should succeeed: ./vcpkg $($succeedArgs -join ' ')"
- Run-Vcpkg @succeedArgs
- if ($LastExitCode -ne 0) {
- throw $CurrentTest
- } else {
- Write-Host "... succeeded."
- }
-}
diff --git a/scripts/azure-pipelines/end-to-end-tests-dir/binarycaching.ps1 b/scripts/azure-pipelines/end-to-end-tests-dir/binarycaching.ps1 deleted file mode 100644 index e4ee6e698..000000000 --- a/scripts/azure-pipelines/end-to-end-tests-dir/binarycaching.ps1 +++ /dev/null @@ -1,86 +0,0 @@ -if ($IsLinux) {
- # The tests below need a mono installation not currently available on the Linux agents.
- return
-}
-
-. $PSScriptRoot/../end-to-end-tests-prelude.ps1
-
-# Test simple installation
-Run-Vcpkg -TestArgs ($commonArgs + @("install", "rapidjson", "--binarycaching", "--x-binarysource=clear;files,$ArchiveRoot,write;nuget,$NuGetRoot,readwrite"))
-Throw-IfFailed
-Require-FileExists "$installRoot/$Triplet/include/rapidjson/rapidjson.h"
-
-# Test simple removal
-Run-Vcpkg -TestArgs ($commonArgs + @("remove", "rapidjson"))
-Throw-IfFailed
-Require-FileNotExists "$installRoot/$Triplet/include/rapidjson/rapidjson.h"
-
-# Test restoring from files archive
-Remove-Item -Recurse -Force $installRoot
-Remove-Item -Recurse -Force $buildtreesRoot
-Run-Vcpkg -TestArgs ($commonArgs + @("install","rapidjson","--binarycaching","--x-binarysource=clear;files,$ArchiveRoot,read"))
-Throw-IfFailed
-Require-FileExists "$installRoot/$Triplet/include/rapidjson/rapidjson.h"
-Require-FileNotExists "$buildtreesRoot/rapidjson/src"
-Require-FileExists "$buildtreesRoot/detect_compiler"
-
-# Test --no-binarycaching
-Remove-Item -Recurse -Force $installRoot
-Remove-Item -Recurse -Force $buildtreesRoot
-Run-Vcpkg -TestArgs ($commonArgs + @("install","rapidjson","--no-binarycaching","--x-binarysource=clear;files,$ArchiveRoot,read"))
-Throw-IfFailed
-Require-FileExists "$installRoot/$Triplet/include/rapidjson/rapidjson.h"
-Require-FileExists "$buildtreesRoot/rapidjson/src"
-Require-FileExists "$buildtreesRoot/detect_compiler"
-
-# Test --editable
-Remove-Item -Recurse -Force $installRoot
-Remove-Item -Recurse -Force $buildtreesRoot
-Run-Vcpkg -TestArgs ($commonArgs + @("install","rapidjson","--editable","--x-binarysource=clear;files,$ArchiveRoot,read"))
-Throw-IfFailed
-Require-FileExists "$installRoot/$Triplet/include/rapidjson/rapidjson.h"
-Require-FileExists "$buildtreesRoot/rapidjson/src"
-Require-FileNotExists "$buildtreesRoot/detect_compiler"
-
-# Test restoring from nuget
-Remove-Item -Recurse -Force $installRoot
-Remove-Item -Recurse -Force $buildtreesRoot
-Run-Vcpkg -TestArgs ($commonArgs + @("install", "rapidjson", "--binarycaching", "--x-binarysource=clear;nuget,$NuGetRoot"))
-Throw-IfFailed
-Require-FileExists "$installRoot/$Triplet/include/rapidjson/rapidjson.h"
-Require-FileNotExists "$buildtreesRoot/rapidjson/src"
-
-# Test four-phase flow
-Remove-Item -Recurse -Force $installRoot -ErrorAction SilentlyContinue
-Run-Vcpkg -TestArgs ($commonArgs + @("install", "rapidjson", "--dry-run", "--x-write-nuget-packages-config=$TestingRoot/packages.config"))
-Throw-IfFailed
-Require-FileNotExists "$installRoot/$Triplet/include/rapidjson/rapidjson.h"
-Require-FileNotExists "$buildtreesRoot/rapidjson/src"
-Require-FileExists "$TestingRoot/packages.config"
-if ($IsLinux -or $IsMacOS) {
- mono $(./vcpkg fetch nuget) restore $TestingRoot/packages.config -OutputDirectory "$NuGetRoot2" -Source "$NuGetRoot"
-} else {
- & $(./vcpkg fetch nuget) restore $TestingRoot/packages.config -OutputDirectory "$NuGetRoot2" -Source "$NuGetRoot"
-}
-Throw-IfFailed
-Remove-Item -Recurse -Force $NuGetRoot -ErrorAction SilentlyContinue
-mkdir $NuGetRoot
-Run-Vcpkg -TestArgs ($commonArgs + @("install", "rapidjson", "tinyxml", "--binarycaching", "--x-binarysource=clear;nuget,$NuGetRoot2;nuget,$NuGetRoot,write"))
-Throw-IfFailed
-Require-FileExists "$installRoot/$Triplet/include/rapidjson/rapidjson.h"
-Require-FileExists "$installRoot/$Triplet/include/tinyxml.h"
-Require-FileNotExists "$buildtreesRoot/rapidjson/src"
-Require-FileExists "$buildtreesRoot/tinyxml/src"
-if ((Get-ChildItem $NuGetRoot -Filter '*.nupkg' | Measure-Object).Count -ne 1) {
- throw "In '$CurrentTest': did not create exactly 1 NuGet package"
-}
-
-# Test export
-$CurrentTest = 'Exporting'
-Require-FileNotExists "$TestingRoot/vcpkg-export-output"
-Require-FileNotExists "$TestingRoot/vcpkg-export.1.0.0.nupkg"
-Require-FileNotExists "$TestingRoot/vcpkg-export-output.zip"
-Run-Vcpkg -TestArgs ($commonArgs + @("export", "rapidjson", "tinyxml", "--nuget", "--nuget-id=vcpkg-export", "--nuget-version=1.0.0", "--output=vcpkg-export-output", "--raw", "--zip", "--output-dir=$TestingRoot"))
-Require-FileExists "$TestingRoot/vcpkg-export-output"
-Require-FileExists "$TestingRoot/vcpkg-export.1.0.0.nupkg"
-Require-FileExists "$TestingRoot/vcpkg-export-output.zip"
diff --git a/scripts/azure-pipelines/end-to-end-tests-dir/build-missing.ps1 b/scripts/azure-pipelines/end-to-end-tests-dir/build-missing.ps1 deleted file mode 100644 index 5f318e6af..000000000 --- a/scripts/azure-pipelines/end-to-end-tests-dir/build-missing.ps1 +++ /dev/null @@ -1,18 +0,0 @@ -. $PSScriptRoot/../end-to-end-tests-prelude.ps1
-
-$CurrentTest = "Build Missing tests"
-
-Run-Vcpkg -TestArgs ($commonArgs + @("install", "rapidjson", "--only-binarycaching","--x-binarysource=clear;files,$ArchiveRoot,read"))
-Throw-IfNotFailed
-Require-FileNotExists "$installRoot/$Triplet/include/rapidjson/rapidjson.h"
-
-# Create the rapidjson archive
-Remove-Item -Recurse -Force $installRoot
-Run-Vcpkg -TestArgs ($commonArgs + @("install", "rapidjson","--x-binarysource=clear;files,$ArchiveRoot,write"))
-Throw-IfFailed
-Require-FileExists "$installRoot/$Triplet/include/rapidjson/rapidjson.h"
-
-Remove-Item -Recurse -Force $installRoot
-Run-Vcpkg -TestArgs ($commonArgs + @("install", "rapidjson", "--only-binarycaching","--x-binarysource=clear;files,$ArchiveRoot,read"))
-Throw-IfFailed
-Require-FileExists "$installRoot/$Triplet/include/rapidjson/rapidjson.h"
diff --git a/scripts/azure-pipelines/end-to-end-tests-dir/cli.ps1 b/scripts/azure-pipelines/end-to-end-tests-dir/cli.ps1 deleted file mode 100644 index 47f624fa8..000000000 --- a/scripts/azure-pipelines/end-to-end-tests-dir/cli.ps1 +++ /dev/null @@ -1,11 +0,0 @@ -. $PSScriptRoot/../end-to-end-tests-prelude.ps1
-
-# Test bad command lines
-Run-Vcpkg -TestArgs ($commonArgs + @("install", "zlib", "--vcpkg-rootttttt", "C:\"))
-Throw-IfNotFailed
-
-Run-Vcpkg -TestArgs ($commonArgs + @("install", "zlib", "--vcpkg-rootttttt=C:\"))
-Throw-IfNotFailed
-
-Run-Vcpkg -TestArgs ($commonArgs + @("install", "zlib", "--fast")) # NB: --fast is not a switch
-Throw-IfNotFailed
diff --git a/scripts/azure-pipelines/end-to-end-tests-dir/create.ps1 b/scripts/azure-pipelines/end-to-end-tests-dir/create.ps1 deleted file mode 100644 index 9d59da539..000000000 --- a/scripts/azure-pipelines/end-to-end-tests-dir/create.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -. $PSScriptRoot/../end-to-end-tests-prelude.ps1
-
-# Test vcpkg create
-$Script:CurrentTest = "create zlib"
-Write-Host $Script:CurrentTest
-./vcpkg --x-builtin-ports-root=$TestingRoot/ports create zlib https://github.com/madler/zlib/archive/v1.2.11.tar.gz zlib-1.2.11.tar.gz
-Throw-IfFailed
-
-Require-FileExists "$TestingRoot/ports/zlib/portfile.cmake"
-Require-FileExists "$TestingRoot/ports/zlib/vcpkg.json"
diff --git a/scripts/azure-pipelines/end-to-end-tests-dir/disable-metrics.ps1 b/scripts/azure-pipelines/end-to-end-tests-dir/disable-metrics.ps1 deleted file mode 100644 index 5ad7616b4..000000000 --- a/scripts/azure-pipelines/end-to-end-tests-dir/disable-metrics.ps1 +++ /dev/null @@ -1,67 +0,0 @@ -. $PSScriptRoot/../end-to-end-tests-prelude.ps1
-
-# Test that metrics are on by default
-$metricsTagName = 'vcpkg.disable-metrics'
-$metricsAreDisabledMessage = 'Warning: passed --sendmetrics, but metrics are disabled.'
-
-function Test-Metrics-Enabled() {
- Param(
- [Parameter(ValueFromRemainingArguments)]
- [string[]]$TestArgs
- )
-
- $actualArgs = @('version', '--sendmetrics')
- if ($TestArgs.Length -ne 0) {
- $actualArgs += $TestArgs
- }
-
- $vcpkgOutput = Run-Vcpkg $actualArgs
- if ($vcpkgOutput -contains $metricsAreDisabledMessage) {
- Write-Host 'Metrics are disabled'
- return $false
- }
-
- Write-Host 'Metrics are enabled'
- return $true
-}
-
-# By default, metrics are enabled.
-Require-FileNotExists $metricsTagName
-if (-Not (Test-Metrics-Enabled)) {
- throw "Metrics were not on by default."
-}
-
-if (Test-Metrics-Enabled '--disable-metrics') {
- throw "Metrics were not disabled by switch."
-}
-
-$env:VCPKG_DISABLE_METRICS = 'ON'
-try {
- if (Test-Metrics-Enabled) {
- throw "Environment variable did not disable metrics."
- }
-
- # Also test that you get no message without --sendmetrics
- $vcpkgOutput = Run-Vcpkg list
- if ($vcpkgOutput -contains $metricsAreDisabledMessage) {
- throw "Disabled metrics emit message even without --sendmetrics"
- }
-
- if (-Not (Test-Metrics-Enabled '--no-disable-metrics')) {
- throw "Environment variable to disable metrics could not be overridden by switch."
- }
-} finally {
- Remove-Item env:VCPKG_DISABLE_METRICS
-}
-
-# If the disable-metrics tag file exists, metrics are disabled even if attempted to be enabled on
-# the command line.
-Set-Content -Path $metricsTagName -Value ""
-try {
- if (Test-Metrics-Enabled '--disable-metrics') {
- throw "Metrics were not force-disabled by the disable-metrics tag file."
- }
-}
-finally {
- Remove-Item $metricsTagName
-}
diff --git a/scripts/azure-pipelines/end-to-end-tests-dir/env-passthrough.ps1 b/scripts/azure-pipelines/end-to-end-tests-dir/env-passthrough.ps1 deleted file mode 100644 index 6de1335d7..000000000 --- a/scripts/azure-pipelines/end-to-end-tests-dir/env-passthrough.ps1 +++ /dev/null @@ -1,21 +0,0 @@ -if (-not $IsLinux -and -not $IsMacOS) {
- . $PSScriptRoot/../end-to-end-tests-prelude.ps1
-
- $env:_VCPKG_TEST_TRACKED = "a"
- $env:_VCPKG_TEST_UNTRACKED = "b"
-
- $x = ./vcpkg "--overlay-triplets=$PSScriptRoot/../../testing/env-passthrough" env "echo %_VCPKG_TEST_TRACKED% %_VCPKG_TEST_TRACKED2% %_VCPKG_TEST_UNTRACKED% %_VCPKG_TEST_UNTRACKED2%"
- if ($x -ne "%_VCPKG_TEST_TRACKED% %_VCPKG_TEST_TRACKED2% %_VCPKG_TEST_UNTRACKED% %_VCPKG_TEST_UNTRACKED2%")
- {
- throw "env should have cleaned the environment ($x)"
- }
-
- $y = ./vcpkg "--overlay-triplets=$PSScriptRoot/../../testing/env-passthrough" env --triplet passthrough "echo %_VCPKG_TEST_TRACKED% %_VCPKG_TEST_TRACKED2% %_VCPKG_TEST_UNTRACKED% %_VCPKG_TEST_UNTRACKED2%"
- if ($y -ne "a %_VCPKG_TEST_TRACKED2% b %_VCPKG_TEST_UNTRACKED2%")
- {
- throw "env should have kept the environment ($y)"
- }
-
- rm env:_VCPKG_TEST_TRACKED
- rm env:_VCPKG_TEST_UNTRACKED
-}
\ No newline at end of file diff --git a/scripts/azure-pipelines/end-to-end-tests-dir/integrate-install.ps1 b/scripts/azure-pipelines/end-to-end-tests-dir/integrate-install.ps1 deleted file mode 100644 index 38362ba8c..000000000 --- a/scripts/azure-pipelines/end-to-end-tests-dir/integrate-install.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -if (-not $IsLinux -and -not $IsMacOS) {
- . $PSScriptRoot/../end-to-end-tests-prelude.ps1
-
- # Test msbuild props and targets
- $Script:CurrentTest = "zlib:x86-windows-static msbuild scripts\testing\integrate-install\..."
- Write-Host $Script:CurrentTest
- ./vcpkg $commonArgs install zlib:x86-windows-static --x-binarysource=clear
- Throw-IfFailed
- foreach ($project in @("VcpkgTriplet", "VcpkgTriplet2", "VcpkgUseStatic", "VcpkgUseStatic2")) {
- $Script:CurrentTest = "msbuild scripts\testing\integrate-install\$project.vcxproj"
- ./vcpkg $commonArgs env "msbuild scripts\testing\integrate-install\$project.vcxproj /p:VcpkgRoot=$TestingRoot /p:IntDir=$TestingRoot\int\ /p:OutDir=$TestingRoot\out\ "
- Throw-IfFailed
- Remove-Item -Recurse -Force $TestingRoot\int
- Remove-Item -Recurse -Force $TestingRoot\out
- }
- $Script:CurrentTest = "zlib:x86-windows msbuild scripts\testing\integrate-install\..."
- Write-Host $Script:CurrentTest
- ./vcpkg $commonArgs install zlib:x86-windows --x-binarysource=clear
- Throw-IfFailed
- foreach ($project in @("Project1", "NoProps")) {
- $Script:CurrentTest = "msbuild scripts\testing\integrate-install\$project.vcxproj"
- Write-Host $Script:CurrentTest
- ./vcpkg $commonArgs env "msbuild scripts\testing\integrate-install\$project.vcxproj /p:VcpkgRoot=$TestingRoot /p:IntDir=$TestingRoot\int\ /p:OutDir=$TestingRoot\out\ "
- Throw-IfFailed
- Remove-Item -Recurse -Force $TestingRoot\int
- Remove-Item -Recurse -Force $TestingRoot\out
- }
-}
diff --git a/scripts/azure-pipelines/end-to-end-tests-dir/registries.ps1 b/scripts/azure-pipelines/end-to-end-tests-dir/registries.ps1 deleted file mode 100644 index bdeeb0a15..000000000 --- a/scripts/azure-pipelines/end-to-end-tests-dir/registries.ps1 +++ /dev/null @@ -1,192 +0,0 @@ -. "$PSScriptRoot/../end-to-end-tests-prelude.ps1" - - -$builtinRegistryArgs = $commonArgs + @("--x-builtin-registry-versions-dir=$PSScriptRoot/../../e2e_ports/versions") - -Run-Vcpkg install @builtinRegistryArgs 'vcpkg-internal-e2e-test-port' -Throw-IfNotFailed - -# We should not look into the versions directory unless we have a baseline, -# even if we pass the registries feature flag -Run-Vcpkg install @builtinRegistryArgs --feature-flags=registries 'vcpkg-internal-e2e-test-port' -Throw-IfNotFailed - -Run-Vcpkg install @builtinRegistryArgs --feature-flags=registries 'zlib' -Throw-IfFailed - -Write-Trace "Test git and filesystem registries" -Refresh-TestRoot -$filesystemRegistry = "$TestingRoot/filesystem-registry" -$gitRegistryUpstream = "$TestingRoot/git-registry-upstream" - -# build a filesystem registry -Write-Trace "build a filesystem registry" -New-Item -Path $filesystemRegistry -ItemType Directory -$filesystemRegistry = (Get-Item $filesystemRegistry).FullName - -Copy-Item -Recurse ` - -LiteralPath "$PSScriptRoot/../../e2e_ports/vcpkg-internal-e2e-test-port" ` - -Destination "$filesystemRegistry" -New-Item ` - -Path "$filesystemRegistry/versions" ` - -ItemType Directory -Copy-Item ` - -LiteralPath "$PSScriptRoot/../../e2e_ports/versions/baseline.json" ` - -Destination "$filesystemRegistry/versions/baseline.json" -New-Item ` - -Path "$filesystemRegistry/versions/v-" ` - -ItemType Directory - -$vcpkgInternalE2eTestPortJson = @{ - "versions" = @( - @{ - "version-string" = "1.0.0"; - "path" = "$/vcpkg-internal-e2e-test-port" - } - ) -} -New-Item ` - -Path "$filesystemRegistry/versions/v-/vcpkg-internal-e2e-test-port.json" ` - -ItemType File ` - -Value (ConvertTo-Json -Depth 5 -InputObject $vcpkgInternalE2eTestPortJson) - - -# build a git registry -Write-Trace "build a git registry" -New-Item -Path $gitRegistryUpstream -ItemType Directory -$gitRegistryUpstream = (Get-Item $gitRegistryUpstream).FullName - -Push-Location $gitRegistryUpstream -try -{ - $gitConfigOptions = @( - '-c', 'user.name=Nobody', - '-c', 'user.email=nobody@example.com', - '-c', 'core.autocrlf=false' - ) - - $CurrentTest = 'git init .' - git @gitConfigOptions init . - Throw-IfFailed - Copy-Item -Recurse -LiteralPath "$PSScriptRoot/../../e2e_ports/vcpkg-internal-e2e-test-port" -Destination . - New-Item -Path './vcpkg-internal-e2e-test-port/foobar' -Value 'this is just to get a distinct git tree' - - $CurrentTest = 'git add -A' - git @gitConfigOptions add -A - Throw-IfFailed - $CurrentTest = 'git commit' - git @gitConfigOptions commit -m 'initial commit' - Throw-IfFailed - - $vcpkgInternalE2eTestPortGitTree = git rev-parse 'HEAD:vcpkg-internal-e2e-test-port' - $vcpkgInternalE2eTestPortVersionsJson = @{ - "versions" = @( - @{ - "version-string" = "1.0.0"; - "git-tree" = $vcpkgInternalE2eTestPortGitTree - } - ) - } - $vcpkgBaseline = @{ - "default" = @{ - "vcpkg-internal-e2e-test-port" = @{ - "baseline" = "1.0.0" - } - } - } - - New-Item -Path './versions' -ItemType Directory - New-Item -Path './versions/v-' -ItemType Directory - - New-Item -Path './versions/baseline.json' -Value (ConvertTo-Json -Depth 5 -InputObject $vcpkgBaseline) - New-Item -Path './versions/v-/vcpkg-internal-e2e-test-port.json' -Value (ConvertTo-Json -Depth 5 -InputObject $vcpkgInternalE2eTestPortVersionsJson) - - $CurrentTest = 'git add -A' - git @gitConfigOptions add -A - Throw-IfFailed - $CurrentTest = 'git commit' - git @gitConfigOptions commit --amend --no-edit - Throw-IfFailed -} -finally -{ - Pop-Location -} - -# actually test the registries -Write-Trace "actually test the registries" -$vcpkgJson = @{ - "name" = "manifest-test"; - "version-string" = "1.0.0"; - "dependencies" = @( - "vcpkg-internal-e2e-test-port" - ) -} - -# test the filesystem registry -Write-Trace "test the filesystem registry" -$manifestDir = "$TestingRoot/filesystem-registry-test-manifest-dir" - -New-Item -Path $manifestDir -ItemType Directory -$manifestDir = (Get-Item $manifestDir).FullName - -Push-Location $manifestDir -try -{ - New-Item -Path 'vcpkg.json' -ItemType File ` - -Value (ConvertTo-Json -Depth 5 -InputObject $vcpkgJson) - - $vcpkgConfigurationJson = @{ - "default-registry" = $null; - "registries" = @( - @{ - "kind" = "filesystem"; - "path" = $filesystemRegistry; - "packages" = @( "vcpkg-internal-e2e-test-port" ) - } - ) - } - New-Item -Path 'vcpkg-configuration.json' -ItemType File ` - -Value (ConvertTo-Json -Depth 5 -InputObject $vcpkgConfigurationJson) - - Run-Vcpkg install @builtinRegistryArgs '--feature-flags=registries,manifests' - Throw-IfFailed -} -finally -{ - Pop-Location -} - -# test the git registry -Write-Trace "test the git registry" -$manifestDir = "$TestingRoot/git-registry-test-manifest-dir" - -New-Item -Path $manifestDir -ItemType Directory -$manifestDir = (Get-Item $manifestDir).FullName - -Push-Location $manifestDir -try -{ - New-Item -Path 'vcpkg.json' -ItemType File ` - -Value (ConvertTo-Json -Depth 5 -InputObject $vcpkgJson) - - $vcpkgConfigurationJson = @{ - "default-registry" = $null; - "registries" = @( - @{ - "kind" = "git"; - "repository" = $gitRegistryUpstream; - "packages" = @( "vcpkg-internal-e2e-test-port" ) - } - ) - } - New-Item -Path 'vcpkg-configuration.json' -ItemType File ` - -Value (ConvertTo-Json -Depth 5 -InputObject $vcpkgConfigurationJson) - - Run-Vcpkg install @builtinRegistryArgs '--feature-flags=registries,manifests' - Throw-IfFailed -} -finally -{ - Pop-Location -} diff --git a/scripts/azure-pipelines/end-to-end-tests-dir/spaces.ps1 b/scripts/azure-pipelines/end-to-end-tests-dir/spaces.ps1 deleted file mode 100644 index b7aaf6462..000000000 --- a/scripts/azure-pipelines/end-to-end-tests-dir/spaces.ps1 +++ /dev/null @@ -1,11 +0,0 @@ -. $PSScriptRoot/../end-to-end-tests-prelude.ps1
-
-##### Test spaces in the path
-$Script:CurrentTest = "zlib with spaces in path"
-Write-Host $Script:CurrentTest
-./vcpkg install zlib "--triplet" $Triplet `
- "--no-binarycaching" `
- "--x-buildtrees-root=$TestingRoot/build Trees" `
- "--x-install-root=$TestingRoot/instalL ed" `
- "--x-packages-root=$TestingRoot/packaG es"
-Throw-IfFailed
diff --git a/scripts/azure-pipelines/end-to-end-tests-dir/vcpkg-minimum-required.ps1 b/scripts/azure-pipelines/end-to-end-tests-dir/vcpkg-minimum-required.ps1 deleted file mode 100644 index 8f512ae7a..000000000 --- a/scripts/azure-pipelines/end-to-end-tests-dir/vcpkg-minimum-required.ps1 +++ /dev/null @@ -1,22 +0,0 @@ -. $PSScriptRoot/../end-to-end-tests-prelude.ps1 - -$successCases = @('vcpkg-requires-current-date', 'vcpkg-requires-old-date') -foreach ($successCase in $successCases) { - $CurrentTest = "Should succeeed: ./vcpkg install $successCase" - Write-Host $CurrentTest - Run-Vcpkg install $successCase @commonArgs - if ($LastExitCode -ne 0) { - throw $CurrentTest - } else { - Write-Host "... succeeded." - } -} - -$CurrentTest = "Should fail: ./vcpkg install vcpkg-requires-future-date" -Write-Host $CurrentTest -Run-Vcpkg install vcpkg-requires-future-date @commonArgs -if ($LastExitCode -ne 0) { - Write-Host "... failed (this is good!)." -} else { - throw $CurrentTest -} diff --git a/scripts/azure-pipelines/end-to-end-tests-dir/versions.ps1 b/scripts/azure-pipelines/end-to-end-tests-dir/versions.ps1 deleted file mode 100644 index 7f927759f..000000000 --- a/scripts/azure-pipelines/end-to-end-tests-dir/versions.ps1 +++ /dev/null @@ -1,98 +0,0 @@ -. $PSScriptRoot/../end-to-end-tests-prelude.ps1
-
-# Test verify versions
-mkdir $VersionFilesRoot
-Copy-Item -Recurse "scripts/testing/version-files/versions_incomplete" $VersionFilesRoot
-$portsRedirectArgsOK = @(
- "--feature-flags=versions",
- "--x-builtin-ports-root=scripts/testing/version-files/ports",
- "--x-builtin-registry-versions-dir=scripts/testing/version-files/versions"
-)
-$portsRedirectArgsIncomplete = @(
- "--feature-flags=versions",
- "--x-builtin-ports-root=scripts/testing/version-files/ports_incomplete",
- "--x-builtin-registry-versions-dir=$VersionFilesRoot/versions_incomplete"
-)
-$CurrentTest = "x-verify-ci-versions (All files OK)"
-Write-Host $CurrentTest
-./vcpkg $portsRedirectArgsOK x-ci-verify-versions --verbose
-Throw-IfFailed
-
-$CurrentTest = "x-verify-ci-versions (Incomplete)"
-./vcpkg $portsRedirectArgsIncomplete x-ci-verify-versions --verbose
-Throw-IfNotFailed
-
-$CurrentTest = "x-add-version cat"
-# Do not fail if there's nothing to update
-./vcpkg $portsRedirectArgsIncomplete x-add-version cat
-Throw-IfFailed
-
-$CurrentTest = "x-add-version dog"
-# Local version is not in baseline and versions file
-./vcpkg $portsRedirectArgsIncomplete x-add-version dog
-Throw-IfFailed
-
-$CurrentTest = "x-add-version duck"
-# Missing versions file
-./vcpkg $portsRedirectArgsIncomplete x-add-version duck
-Throw-IfFailed
-
-$CurrentTest = "x-add-version ferret"
-# Missing versions file and missing baseline entry
-./vcpkg $portsRedirectArgsIncomplete x-add-version ferret
-Throw-IfFailed
-
-$CurrentTest = "x-add-version fish (must fail)"
-# Discrepancy between local SHA and SHA in fish.json. Requires --overwrite-version.
-$out = ./vcpkg $portsRedirectArgsIncomplete x-add-version fish
-Throw-IfNotFailed
-$CurrentTest = "x-add-version fish --overwrite-version"
-./vcpkg $portsRedirectArgsIncomplete x-add-version fish --overwrite-version
-Throw-IfFailed
-
-$CurrentTest = "x-add-version mouse"
-# Missing baseline entry
-./vcpkg $portsRedirectArgsIncomplete x-add-version mouse
-Throw-IfFailed
-# Validate changes
-./vcpkg $portsRedirectArgsIncomplete x-ci-verify-versions --verbose
-Throw-IfFailed
-
-$CurrentTest = "default baseline"
-$out = ./vcpkg $commonArgs "--feature-flags=versions" install --x-manifest-root=scripts/testing/version-files/default-baseline-1 2>&1 | Out-String
-Throw-IfNotFailed
-if ($out -notmatch ".*Error: while checking out baseline.*")
-{
- $out
- throw "Expected to fail due to missing baseline"
-}
-
-git fetch https://github.com/vicroms/test-registries
-foreach ($opt_registries in @("",",registries"))
-{
- Write-Trace "testing baselines: $opt_registries"
- Refresh-TestRoot
- $CurrentTest = "without default baseline 2 -- enabling versions should not change behavior"
- Remove-Item -Recurse $buildtreesRoot/versioning -ErrorAction SilentlyContinue
- ./vcpkg $commonArgs "--feature-flags=versions$opt_registries" install `
- "--dry-run" `
- "--x-manifest-root=scripts/testing/version-files/without-default-baseline-2" `
- "--x-builtin-registry-versions-dir=scripts/testing/version-files/default-baseline-2/versions"
- Throw-IfFailed
- Require-FileNotExists $buildtreesRoot/versioning
-
- $CurrentTest = "default baseline 2"
- ./vcpkg $commonArgs "--feature-flags=versions$opt_registries" install `
- "--dry-run" `
- "--x-manifest-root=scripts/testing/version-files/default-baseline-2" `
- "--x-builtin-registry-versions-dir=scripts/testing/version-files/default-baseline-2/versions"
- Throw-IfFailed
- Require-FileExists $buildtreesRoot/versioning
-
- $CurrentTest = "using version features fails without flag"
- ./vcpkg $commonArgs "--feature-flags=-versions$opt_registries" install `
- "--dry-run" `
- "--x-manifest-root=scripts/testing/version-files/default-baseline-2" `
- "--x-builtin-registry-versions-dir=scripts/testing/version-files/default-baseline-2/versions"
- Throw-IfNotFailed
-}
diff --git a/scripts/azure-pipelines/end-to-end-tests-prelude.ps1 b/scripts/azure-pipelines/end-to-end-tests-prelude.ps1 deleted file mode 100644 index 29718bf76..000000000 --- a/scripts/azure-pipelines/end-to-end-tests-prelude.ps1 +++ /dev/null @@ -1,80 +0,0 @@ -$TestingRoot = Join-Path $WorkingRoot 'testing'
-$buildtreesRoot = Join-Path $TestingRoot 'buildtrees'
-$installRoot = Join-Path $TestingRoot 'installed'
-$packagesRoot = Join-Path $TestingRoot 'packages'
-$NuGetRoot = Join-Path $TestingRoot 'nuget'
-$NuGetRoot2 = Join-Path $TestingRoot 'nuget2'
-$ArchiveRoot = Join-Path $TestingRoot 'archives'
-$VersionFilesRoot = Join-Path $TestingRoot 'version-test'
-$commonArgs = @(
- "--triplet",
- $Triplet,
- "--x-buildtrees-root=$buildtreesRoot",
- "--x-install-root=$installRoot",
- "--x-packages-root=$packagesRoot",
- "--overlay-ports=$PSScriptRoot/../e2e_ports/overlays"
-)
-$Script:CurrentTest = 'unassigned'
-
-if ($IsWindows)
-{
- $VcpkgExe = Get-Item './vcpkg.exe'
-}
-else
-{
- $VcpkgExe = Get-Item './vcpkg'
-}
-
-function Refresh-TestRoot {
- Remove-Item -Recurse -Force $TestingRoot -ErrorAction SilentlyContinue
- mkdir $TestingRoot | Out-Null
- mkdir $NuGetRoot | Out-Null
-}
-
-function Require-FileExists {
- [CmdletBinding()]
- Param(
- [string]$File
- )
- if (-Not (Test-Path $File)) {
- throw "'$Script:CurrentTest' failed to create file '$File'"
- }
-}
-
-function Require-FileNotExists {
- [CmdletBinding()]
- Param(
- [string]$File
- )
- if (Test-Path $File) {
- throw "'$Script:CurrentTest' should not have created file '$File'"
- }
-}
-
-function Throw-IfFailed {
- if ($LASTEXITCODE -ne 0) {
- throw "'$Script:CurrentTest' had a step with a nonzero exit code"
- }
-}
-
-function Throw-IfNotFailed {
- if ($LASTEXITCODE -eq 0) {
- throw "'$Script:CurrentTest' had a step with an unexpectedly zero exit code"
- }
-}
-
-function Write-Trace ([string]$text) {
- Write-Host (@($MyInvocation.ScriptName, ":", $MyInvocation.ScriptLineNumber, ": ", $text) -join "")
-}
-
-function Run-Vcpkg {
- Param(
- [Parameter(ValueFromRemainingArguments)]
- [string[]]$TestArgs
- )
- $Script:CurrentTest = "vcpkg $($testArgs -join ' ')"
- Write-Host $Script:CurrentTest
- & $VcpkgExe @testArgs
-}
-
-Refresh-TestRoot
diff --git a/scripts/azure-pipelines/end-to-end-tests.ps1 b/scripts/azure-pipelines/end-to-end-tests.ps1 deleted file mode 100644 index 8858b362e..000000000 --- a/scripts/azure-pipelines/end-to-end-tests.ps1 +++ /dev/null @@ -1,55 +0,0 @@ -# Copyright (c) Microsoft Corporation.
-# SPDX-License-Identifier: MIT
-#
-<#
-.SYNOPSIS
-End-to-End tests for the vcpkg executable.
-
-.DESCRIPTION
-These tests cover the command line interface and broad functions of vcpkg, including `install`, `remove` and certain
-binary caching scenarios. They use the vcpkg executable in the current directory.
-
-.PARAMETER Triplet
-The triplet to use for testing purposes.
-
-.PARAMETER WorkingRoot
-The location used as scratch space for testing.
-
-#>
-
-[CmdletBinding()]
-Param(
- [Parameter(Mandatory = $true)]
- [ValidateNotNullOrEmpty()]
- [string]$Triplet,
- [Parameter(Mandatory = $true)]
- [ValidateNotNullOrEmpty()]
- [string]$WorkingRoot,
- [Parameter(Mandatory = $false)]
- [ValidateNotNullOrEmpty()]
- [string]$Filter
-)
-
-$ErrorActionPreference = "Stop"
-
-if (-Not (Test-Path $WorkingRoot)) {
- New-Item -Path $WorkingRoot -ItemType Directory
-}
-
-$WorkingRoot = (Get-Item $WorkingRoot).FullName
-
-$AllTests = Get-ChildItem $PSScriptRoot/end-to-end-tests-dir/*.ps1
-if ($Filter -ne $Null) {
- $AllTests = $AllTests | ? { $_.Name -match $Filter }
-}
-$n = 1
-$m = $AllTests.Count
-
-$AllTests | % {
- Write-Host "[end-to-end-tests.ps1] [$n/$m] Running suite $_"
- & $_
- $n += 1
-}
-
-Write-Host "[end-to-end-tests.ps1] All tests passed."
-$LASTEXITCODE = 0
diff --git a/scripts/azure-pipelines/linux/azure-pipelines.yml b/scripts/azure-pipelines/linux/azure-pipelines.yml index b20908f97..df5cceda6 100644 --- a/scripts/azure-pipelines/linux/azure-pipelines.yml +++ b/scripts/azure-pipelines/linux/azure-pipelines.yml @@ -30,20 +30,9 @@ jobs: exit 0
displayName: 'Create ${{ variables.VCPKG_DOWNLOADS }}'
- task: Bash@3
- displayName: 'Build vcpkg'
+ displayName: 'Bootstrap vcpkg'
inputs:
filePath: bootstrap-vcpkg.sh
- arguments: '-buildTests'
- - bash: toolsrc/build.rel/vcpkg-test
- displayName: 'Run vcpkg tests'
- env:
- VCPKG_DEBUG: 1
- - task: PowerShell@2
- displayName: 'Run vcpkg end-to-end tests'
- inputs:
- filePath: 'scripts/azure-pipelines/end-to-end-tests.ps1'
- arguments: '-Triplet x64-linux -WorkingRoot ${{ variables.WORKING_ROOT }}'
- pwsh: true
- task: PowerShell@2
displayName: '*** Test Modified Ports and Prepare Test Logs ***'
inputs:
diff --git a/scripts/azure-pipelines/osx/azure-pipelines.yml b/scripts/azure-pipelines/osx/azure-pipelines.yml index 50bba080f..52e974c93 100644 --- a/scripts/azure-pipelines/osx/azure-pipelines.yml +++ b/scripts/azure-pipelines/osx/azure-pipelines.yml @@ -30,17 +30,6 @@ jobs: displayName: 'Build vcpkg'
inputs:
filePath: bootstrap-vcpkg.sh
- arguments: '-buildTests'
- - bash: toolsrc/build.rel/vcpkg-test
- displayName: 'Run vcpkg tests'
- env:
- VCPKG_DEBUG: 1
- - task: PowerShell@2
- displayName: 'Run vcpkg end-to-end tests'
- inputs:
- filePath: 'scripts/azure-pipelines/end-to-end-tests.ps1'
- arguments: '-Triplet x64-osx -WorkingRoot ${{ variables.WORKING_ROOT }}'
- pwsh: true
- task: PowerShell@2
displayName: '*** Test Modified Ports and Prepare Test Logs ***'
inputs:
diff --git a/scripts/azure-pipelines/signing.yml b/scripts/azure-pipelines/signing.yml deleted file mode 100644 index b7a3137d9..000000000 --- a/scripts/azure-pipelines/signing.yml +++ /dev/null @@ -1,125 +0,0 @@ -# This script is used internally to produce signed vcpkg builds.
-# It uses machines / tasks that are not exposed here on GitHub, as
-# the hardware on which we allow signing is restricted.
-
-trigger: none
-
-variables:
- TeamName: vcpkg
-jobs:
- - job: windows
- displayName: "Windows"
- dependsOn:
- pool:
- name: 'VSEng-MicroBuildVS2019'
- demands:
- - CMAKE
- steps:
- - task: PoliCheck@1
- inputs:
- inputType: 'Basic'
- targetType: 'F'
- targetArgument: '$(Build.SourcesDirectory)'
- result: 'PoliCheck.xml'
- - task: CmdLine@2
- displayName: "Build vcpkg with CMake"
- inputs:
- failOnStderr: true
- script: |
- call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=x86 -host_arch=x86
- cmake.exe -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DVCPKG_DEVELOPMENT_WARNINGS=ON -DVCPKG_WARNINGS_AS_ERRORS=ON -DVCPKG_BUILD_FUZZING=OFF -B "$(Build.StagingDirectory)" -S toolsrc
- ninja.exe -C "$(Build.StagingDirectory)"
- - task: MicroBuildSigningPlugin@2
- inputs:
- signType: 'real'
- feedSource: 'https://devdiv.pkgs.visualstudio.com/DefaultCollection/_packaging/MicroBuildToolset/nuget/v3/index.json'
- - task: NuGetToolInstaller@1
- inputs:
- versionSpec: 5.7
- - task: NuGetCommand@2
- displayName: 'NuGet Restore MicroBuild Signing Extension'
- inputs:
- command: 'restore'
- restoreSolution: 'scripts/azure-pipelines/windows/signing.signproj'
- feedsToUse: 'config'
- restoreDirectory: '$(Build.SourcesDirectory)\scripts\azure-pipelines\packages'
- - task: MSBuild@1
- displayName: 'Sign vcpkg.exe'
- inputs:
- solution: 'scripts\azure-pipelines\windows\signing.signproj'
- msbuildArguments: '/p:OutDir=$(Build.ArtifactStagingDirectory)\ /p:IntermediateOutputPath=$(Build.StagingDirectory)\'
- - task: BinSkim@3
- inputs:
- InputType: 'CommandLine'
- arguments: 'analyze "$(Build.StagingDirectory)\vcpkg.exe"'
- - task: BinSkim@3
- inputs:
- InputType: 'CommandLine'
- arguments: 'analyze "$(Build.StagingDirectory)\tls12-download.exe"'
- - task: PublishBuildArtifacts@1
- displayName: 'Publish vcpkg.exe'
- inputs:
- PathtoPublish: '$(Build.ArtifactStagingDirectory)\vcpkg.exe'
- ArtifactName: 'Windows'
- publishLocation: 'Container'
- - task: PublishBuildArtifacts@1
- displayName: 'Publish vcpkg.pdb'
- inputs:
- PathtoPublish: '$(Build.ArtifactStagingDirectory)\vcpkg.pdb'
- ArtifactName: 'Windows'
- publishLocation: 'Container'
- - task: PublishBuildArtifacts@1
- displayName: 'Publish tls12-download.exe'
- inputs:
- PathtoPublish: '$(Build.ArtifactStagingDirectory)\tls12-download.exe'
- ArtifactName: 'Windows'
- publishLocation: 'Container'
- - task: PublishBuildArtifacts@1
- displayName: 'Publish tls12-download.pdb'
- inputs:
- PathtoPublish: '$(Build.ArtifactStagingDirectory)\tls12-download.pdb'
- ArtifactName: 'Windows'
- publishLocation: 'Container'
- - task: MicroBuildCleanup@1
- condition: succeededOrFailed()
- displayName: MicroBuild Cleanup
- - job: macos_build
- displayName: 'MacOS Build'
- pool:
- vmImage: macOS-10.15
- steps:
- - task: CmdLine@2
- displayName: "Build vcpkg with CMake"
- inputs:
- failOnStderr: true
- script: |
- cmake -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DVCPKG_DEVELOPMENT_WARNINGS=ON -DVCPKG_WARNINGS_AS_ERRORS=ON -DVCPKG_BUILD_FUZZING=OFF -B "$(Build.StagingDirectory)" -S toolsrc
- make -j 8 -C "$(Build.StagingDirectory)"
- zip "$(Build.StagingDirectory)/vcpkg.zip" "$(Build.StagingDirectory)/vcpkg"
- - task: PublishBuildArtifacts@1
- displayName: "Publish Unsigned MacOS Binary"
- inputs:
- PathtoPublish: '$(Build.StagingDirectory)/vcpkg.zip'
- ArtifactName: 'staging'
- publishLocation: 'Container'
- - job: macos_sign
- displayName: 'MacOS Sign'
- dependsOn: macos_build
- pool:
- name: VSEng-MicroBuildVS2019
- steps:
- - checkout: none
- - task: DownloadBuildArtifacts@0
- displayName: 'Download Unsigned Binary'
- inputs:
- artifactName: staging
- - task: ms-vseng.MicroBuildTasks.7973a23b-33e3-4b00-a7d9-c06d90f8297f.MicroBuildSignMacFiles@1
- displayName: 'Sign Mac Files'
- inputs:
- SigningTarget: '$(Build.ArtifactStagingDirectory)\staging\vcpkg.zip'
- SigningCert: 8003
- - task: PublishBuildArtifacts@1
- displayName: 'Publish Signed Binary'
- inputs:
- PathtoPublish: '$(Build.ArtifactStagingDirectory)\staging\vcpkg.zip'
- ArtifactName: 'MacOS'
diff --git a/scripts/azure-pipelines/windows/azure-pipelines.yml b/scripts/azure-pipelines/windows/azure-pipelines.yml index 4c46e86a7..c2d74b8bc 100644 --- a/scripts/azure-pipelines/windows/azure-pipelines.yml +++ b/scripts/azure-pipelines/windows/azure-pipelines.yml @@ -24,34 +24,7 @@ jobs: pwsh: true
# Note: D: is the Azure machines' temporary disk.
- script: .\bootstrap-vcpkg.bat
- displayName: 'Build vcpkg'
- - task: PowerShell@2
- displayName: 'Run vcpkg end-to-end tests'
- condition: eq('${{ parameters.triplet }}', 'x86-windows')
- inputs:
- filePath: 'scripts/azure-pipelines/end-to-end-tests.ps1'
- arguments: '-Triplet ${{ parameters.triplet }} -WorkingRoot ${{ variables.WORKING_ROOT }}'
- pwsh: true
- - task: CmdLine@2
- displayName: "Build vcpkg with CMake, with older VS, and Run Tests"
- condition: eq('${{ parameters.triplet }}', 'x86-windows')
- inputs:
- script: |
- :: TRANSITION, get these tools on the VMs next time we roll them
- .\vcpkg.exe fetch cmake
- .\vcpkg.exe fetch ninja
- set PATH=${{ variables.VCPKG_DOWNLOADS }}\tools\cmake-3.19.2-windows\cmake-3.19.2-win32-x86\bin;${{ variables.VCPKG_DOWNLOADS }}\tools\ninja-1.10.1-windows;%PATH%
- call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=x86 -host_arch=x86
- rmdir /s /q build.x86.debug > nul 2> nul
- cmake.exe -G Ninja -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=ON -DVCPKG_DEVELOPMENT_WARNINGS=ON -DVCPKG_WARNINGS_AS_ERRORS=ON -DVCPKG_BUILD_FUZZING=ON -B build.x86.debug -S toolsrc
- ninja.exe -C build.x86.debug
- set VCPKG_DEBUG=1
- build.x86.debug\vcpkg-test.exe
- cmake -G "Visual Studio 16 2019" -A Win32 -T v140 -DBUILD_TESTING=OFF -DVCPKG_DEVELOPMENT_WARNINGS=OFF -DVCPKG_WARNINGS_AS_ERRORS=ON -DVCPKG_BUILD_FUZZING=OFF -B build.x86.vs2015 -S toolsrc
- cmake --build build.x86.vs2015
- cmake -G "Visual Studio 16 2019" -A Win32 -T v141 -DBUILD_TESTING=OFF -DVCPKG_DEVELOPMENT_WARNINGS=OFF -DVCPKG_WARNINGS_AS_ERRORS=ON -DVCPKG_BUILD_FUZZING=OFF -B build.x86.vs2017 -S toolsrc
- cmake --build build.x86.vs2017
- failOnStderr: true
+ displayName: 'Bootstrap vcpkg'
- task: PowerShell@2
displayName: '*** Test Modified Ports and Prepare Test Logs ***'
inputs:
diff --git a/scripts/azure-pipelines/windows/packages.config b/scripts/azure-pipelines/windows/packages.config deleted file mode 100644 index d48977f79..000000000 --- a/scripts/azure-pipelines/windows/packages.config +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-<packages>
- <package id="Microsoft.VisualStudioEng.MicroBuild.Core" version="0.4.1" targetFramework="native" developmentDependency="true" />
-</packages>
\ No newline at end of file diff --git a/scripts/azure-pipelines/windows/signing.signproj b/scripts/azure-pipelines/windows/signing.signproj deleted file mode 100644 index 9382e0a0e..000000000 --- a/scripts/azure-pipelines/windows/signing.signproj +++ /dev/null @@ -1,39 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-
- <Import Project="$(MSBuildThisFileDirectory)..\packages\Microsoft.VisualStudioEng.MicroBuild.Core.0.4.1\build\Microsoft.VisualStudioEng.MicroBuild.Core.props" Condition="Exists('..\packages\Microsoft.VisualStudioEng.MicroBuild.Core.0.4.1\build\Microsoft.VisualStudioEng.MicroBuild.Core.props')" />
-
- <ItemGroup>
- <PackageReference Include="Microsoft.VisualStudioEng.MicroBuild.Core" Version="0.4.1">
- <PrivateAssets>all</PrivateAssets>
- <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
- </PackageReference>
- </ItemGroup>
-
- <ItemGroup>
- <FilesToSign Include="$(IntermediateOutputPath)\vcpkg.exe">
- <Authenticode>Microsoft400</Authenticode>
- </FilesToSign>
- <FilesToSign Include="$(IntermediateOutputPath)\tls12-download.exe">
- <Authenticode>Microsoft400</Authenticode>
- </FilesToSign>
- </ItemGroup>
-
- <ImportGroup Label="ExtensionTargets">
- <Import Project="$(MSBuildThisFileDirectory)..\packages\Microsoft.VisualStudioEng.MicroBuild.Core.0.4.1\build\Microsoft.VisualStudioEng.MicroBuild.Core.targets" Condition="Exists('..\packages\Microsoft.VisualStudioEng.MicroBuild.Core.0.4.1\build\Microsoft.VisualStudioEng.MicroBuild.Core.targets')" />
- </ImportGroup>
- <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="Build">
- <PropertyGroup>
- <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
- </PropertyGroup>
- <Error Condition="!Exists('$(MSBuildThisFileDirectory)..\packages\Microsoft.VisualStudioEng.MicroBuild.Core.0.4.1\build\Microsoft.VisualStudioEng.MicroBuild.Core.props')" Text="$([System.String]::Format('$(ErrorText)', '$(MSBuildThisFileDirectory)..\packages\Microsoft.VisualStudioEng.MicroBuild.Core.0.4.1\build\Microsoft.VisualStudioEng.MicroBuild.Core.props'))" />
- <Error Condition="!Exists('$(MSBuildThisFileDirectory)..\packages\Microsoft.VisualStudioEng.MicroBuild.Core.0.4.1\build\Microsoft.VisualStudioEng.MicroBuild.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(MSBuildThisFileDirectory)..\packages\Microsoft.VisualStudioEng.MicroBuild.Core.0.4.1\build\Microsoft.VisualStudioEng.MicroBuild.Core.targets'))" />
- </Target>
-
- <!-- Define an empty build target as we don't really build anything -->
- <Target Name="Build" />
-
- <!-- Target AfterBuild is required to trigger signing -->
- <Target Name="AfterBuild" AfterTargets="Build" />
-
-</Project>
|
