From 6d259d9a21bbf2defaffba9103470006a4182501 Mon Sep 17 00:00:00 2001 From: Billy Robert O'Neal III Date: Thu, 11 Jul 2024 20:13:59 -0700 Subject: [PATCH 01/16] Add Azure CLI. --- .../azure-pipelines/linux/managed-image.json | 3 +++ .../azure-pipelines/linux/provision-image.sh | 20 +++++++++++++++++-- scripts/azure-pipelines/osx/setup-box.sh | 2 +- .../azure-pipelines/windows/create-image.ps1 | 5 ++++- .../windows/deploy-azure-cli.ps1 | 18 +++++++++++++++++ .../windows/provision-entire-image.ps1 | 1 + 6 files changed, 45 insertions(+), 4 deletions(-) create mode 100644 scripts/azure-pipelines/windows/deploy-azure-cli.ps1 diff --git a/scripts/azure-pipelines/linux/managed-image.json b/scripts/azure-pipelines/linux/managed-image.json index 54c78023261ac7..7b65bcc09df430 100644 --- a/scripts/azure-pipelines/linux/managed-image.json +++ b/scripts/azure-pipelines/linux/managed-image.json @@ -11,6 +11,9 @@ }, { "name": "linux-install-powershell" + }, + { + "name": "linux-azcli" } ] } diff --git a/scripts/azure-pipelines/linux/provision-image.sh b/scripts/azure-pipelines/linux/provision-image.sh index f197b270b08c99..7aa3d634554d7a 100755 --- a/scripts/azure-pipelines/linux/provision-image.sh +++ b/scripts/azure-pipelines/linux/provision-image.sh @@ -19,6 +19,20 @@ dpkg -i packages-microsoft-prod.deb rm -f packages-microsoft-prod.deb add-apt-repository universe +## Azure CLI +apt-get -qq update +apt-get -qq install ca-certificates curl apt-transport-https lsb-release gnupg + +mkdir -p /etc/apt/keyrings +curl -sLS https://packages.microsoft.com/keys/microsoft.asc | + gpg --dearmor | + tee /etc/apt/keyrings/microsoft.gpg > /dev/null +chmod go+r /etc/apt/keyrings/microsoft.gpg + +AZ_DIST=$(lsb_release -cs) +echo "deb [arch=`dpkg --print-architecture` signed-by=/etc/apt/keyrings/microsoft.gpg] https://packages.microsoft.com/repos/azure-cli/ $AZ_DIST main" | + tee /etc/apt/sources.list.d/azure-cli.list + apt-get -y update apt-get -y dist-upgrade @@ -99,8 +113,8 @@ APT_PACKAGES="$APT_PACKAGES cuda-compiler-12-1 cuda-libraries-dev-12-1 cuda-driv cuda-cudart-dev-12-1 libcublas-12-1 libcurand-dev-12-1 cuda-nvml-dev-12-1 libcudnn8-dev libnccl2 \ libnccl-dev" -## PowerShell -APT_PACKAGES="$APT_PACKAGES powershell" +## PowerShell + Azure +APT_PACKAGES="$APT_PACKAGES powershell azure-cli" ## Additionally required/installed by Azure DevOps Scale Set Agents, skip on WSL if [[ $(grep microsoft /proc/version) ]]; then @@ -110,3 +124,5 @@ APT_PACKAGES="$APT_PACKAGES libkrb5-3 zlib1g libicu70 debsums liblttng-ust1" fi apt-get -y --no-install-recommends install $APT_PACKAGES + +az --version diff --git a/scripts/azure-pipelines/osx/setup-box.sh b/scripts/azure-pipelines/osx/setup-box.sh index 64182e5526280e..41e9742888537f 100644 --- a/scripts/azure-pipelines/osx/setup-box.sh +++ b/scripts/azure-pipelines/osx/setup-box.sh @@ -16,7 +16,7 @@ else (echo; echo 'eval "$(/usr/local/bin/brew shellenv)"') >> /Users/vcpkg/.zprofile eval "$(/usr/local/bin/brew shellenv)" fi -brew install autoconf-archive autoconf automake bison cmake gettext gfortran gperf gtk-doc libtool meson mono nasm ninja pkg-config powershell python-setuptools texinfo yasm +brew install autoconf-archive autoconf automake azure-cli bison cmake gettext gfortran gperf gtk-doc libtool meson mono nasm ninja pkg-config powershell python-setuptools texinfo yasm mkdir ~/Data if [ `uname -m` = 'arm64' ]; then curl -s -o ~/Downloads/azure-agent.tar.gz https://vstsagentpackage.azureedge.net/agent/3.239.1/vsts-agent-osx-arm64-3.239.1.tar.gz diff --git a/scripts/azure-pipelines/windows/create-image.ps1 b/scripts/azure-pipelines/windows/create-image.ps1 index 03a0ee89348696..c77e4f701180ec 100644 --- a/scripts/azure-pipelines/windows/create-image.ps1 +++ b/scripts/azure-pipelines/windows/create-image.ps1 @@ -24,7 +24,7 @@ $WindowsServerSku = '2022-datacenter-azure-edition' $ErrorActionPreference = 'Stop' $ProgressActivity = 'Creating Windows Image' -$TotalProgress = 17 +$TotalProgress = 18 $CurrentProgress = 1 # Assigning this to another variable helps when running the commands in this script manually for @@ -236,6 +236,9 @@ Invoke-ScriptWithPrefix -ScriptName 'deploy-inteloneapi.ps1' #################################################################################################### Invoke-ScriptWithPrefix -ScriptName 'deploy-pwsh.ps1' +#################################################################################################### +Invoke-ScriptWithPrefix -ScriptName 'deploy-azure-cli.ps1' + #################################################################################################### Invoke-ScriptWithPrefix -ScriptName 'deploy-settings.txt' -SkipSas Restart-AzVM -ResourceGroupName 'vcpkg-image-minting' -Name $ProtoVMName diff --git a/scripts/azure-pipelines/windows/deploy-azure-cli.ps1 b/scripts/azure-pipelines/windows/deploy-azure-cli.ps1 new file mode 100644 index 00000000000000..3320531a9c7d04 --- /dev/null +++ b/scripts/azure-pipelines/windows/deploy-azure-cli.ps1 @@ -0,0 +1,18 @@ +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: MIT + +param([string]$SasToken) + +if (Test-Path "$PSScriptRoot/utility-prefix.ps1") { + . "$PSScriptRoot/utility-prefix.ps1" +} + +[string]$AzCliUrl +if ([string]::IsNullOrEmpty($SasToken)) { + $AzCliUrl = 'https://azcliprod.blob.core.windows.net/msi/azure-cli-2.62.0-x64.msi' +} else { + $SasToken = $SasToken.Replace('"', '') + $AzCliUrl = "https://vcpkgimageminting.blob.core.windows.net/assets/azure-cli-2.62.0-x64.msi$SasToken" +} + +DownloadAndInstall -Url $AzCliUrl -Name 'Azure CLI' -Args @('/quiet', '/norestart') diff --git a/scripts/azure-pipelines/windows/provision-entire-image.ps1 b/scripts/azure-pipelines/windows/provision-entire-image.ps1 index d6ba6a4500787c..9974cd8bf6be24 100644 --- a/scripts/azure-pipelines/windows/provision-entire-image.ps1 +++ b/scripts/azure-pipelines/windows/provision-entire-image.ps1 @@ -12,6 +12,7 @@ . "$PSScriptRoot\deploy-cudnn.ps1" . "$PSScriptRoot\deploy-inteloneapi.ps1" . "$PSScriptRoot\deploy-pwsh.ps1" +. "$PSScriptRoot\deploy-azure-cli.ps1" try { Copy-Item "$PSScriptRoot\deploy-settings.txt" "$PSScriptRoot\deploy-settings.ps1" . "$PSScriptRoot\deploy-settings.ps1" From f4b8789d94b521dbec65c2e10391c12c4e31da8d Mon Sep 17 00:00:00 2001 From: Billy Robert O'Neal III Date: Thu, 11 Jul 2024 20:26:28 -0700 Subject: [PATCH 02/16] Update PowerShell. --- scripts/azure-pipelines/windows/deploy-pwsh.ps1 | 4 ++-- scripts/vcpkgTools.xml | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/azure-pipelines/windows/deploy-pwsh.ps1 b/scripts/azure-pipelines/windows/deploy-pwsh.ps1 index 10c9a16184fe62..f5216ce2e8cc8b 100644 --- a/scripts/azure-pipelines/windows/deploy-pwsh.ps1 +++ b/scripts/azure-pipelines/windows/deploy-pwsh.ps1 @@ -9,10 +9,10 @@ if (Test-Path "$PSScriptRoot/utility-prefix.ps1") { [string]$PwshUrl if ([string]::IsNullOrEmpty($SasToken)) { - $PwshUrl = 'https://github.com/PowerShell/PowerShell/releases/download/v7.4.2/PowerShell-7.4.2-win-x64.msi' + $PwshUrl = 'https://github.com/PowerShell/PowerShell/releases/download/v7.4.3/PowerShell-7.4.3-win-x64.msi' } else { $SasToken = $SasToken.Replace('"', '') - $PwshUrl = "https://vcpkgimageminting.blob.core.windows.net/assets/PowerShell-7.4.2-win-x64.msi?$SasToken" + $PwshUrl = "https://vcpkgimageminting.blob.core.windows.net/assets/PowerShell-7.4.3-win-x64.msi?$SasToken" } DownloadAndInstall -Url $PwshUrl -Name 'PowerShell Core' -Args @('/quiet', '/norestart') diff --git a/scripts/vcpkgTools.xml b/scripts/vcpkgTools.xml index 77db673183c69b..a98554b4620bb5 100644 --- a/scripts/vcpkgTools.xml +++ b/scripts/vcpkgTools.xml @@ -180,11 +180,11 @@ ninja-mac-1.11.1.zip - 7.2.16 + 7.2.21 pwsh.exe - https://github.com/PowerShell/PowerShell/releases/download/v7.2.16/PowerShell-7.2.16-win-x64.zip - de246b7719337ff0c16ef46cf1df2e0fb5e39f7d2754cb28422cf455df276be6e35e9efa9d2bac81c383df1d2d97c9281a24e86ec84af7c395b7671149111ca9 - PowerShell-7.2.16-win-x64.zip + https://github.com/PowerShell/PowerShell/releases/download/v7.2.21/PowerShell-7.2.21-win-x64.zip + 6323c84b4e55982525184948333a1c564bbb421e965cc5c076b1276cd00fe56cec1113f3634d65af6188571ca45da44c5eca6b4acd1f1e80c51142be90067590 + PowerShell-7.2.21-win-x64.zip 16.15.1 From 108cfffb5864fc23424e464e970861287feb56ff Mon Sep 17 00:00:00 2001 From: Billy Robert O'Neal III Date: Thu, 11 Jul 2024 21:03:58 -0700 Subject: [PATCH 03/16] Update Visual Studio --- scripts/azure-pipelines/windows/deploy-visual-studio.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/azure-pipelines/windows/deploy-visual-studio.ps1 b/scripts/azure-pipelines/windows/deploy-visual-studio.ps1 index ea21e46174d5f3..46685e5e93586b 100644 --- a/scripts/azure-pipelines/windows/deploy-visual-studio.ps1 +++ b/scripts/azure-pipelines/windows/deploy-visual-studio.ps1 @@ -8,8 +8,8 @@ if (Test-Path "$PSScriptRoot/utility-prefix.ps1") { } # See https://learn.microsoft.com/en-us/visualstudio/releases/2022/release-history -# 17.8.11 -$VisualStudioBootstrapperUrl = 'https://download.visualstudio.microsoft.com/download/pr/107aa087-4efd-4262-87ee-dc15a68f8e76/873485fe8715c7d3f8f81dc2d6288dcba12400bc560e265e470cf34da50581af/vs_Enterprise.exe' +# 17.8.12 +$VisualStudioBootstrapperUrl = 'https://download.visualstudio.microsoft.com/download/pr/c4c405a4-3a8f-4448-9543-4bd65c213937/6ba856e30a7b2cbb42c034ff9b93fe0424855d05cc217556c54d7f9f5b8f7007/vs_Enterprise.exe' $Workloads = @( 'Microsoft.VisualStudio.Workload.NativeDesktop', 'Microsoft.VisualStudio.Workload.Universal', From 63bb4e60e600850b4aa8c475538f3123dc4eda52 Mon Sep 17 00:00:00 2001 From: Billy Robert O'Neal III Date: Thu, 11 Jul 2024 21:27:20 -0700 Subject: [PATCH 04/16] Remove android-ndk-r25c --- scripts/azure-pipelines/android/Dockerfile | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/scripts/azure-pipelines/android/Dockerfile b/scripts/azure-pipelines/android/Dockerfile index 5a935697ef1384..3b67c4a3cd9eb1 100644 --- a/scripts/azure-pipelines/android/Dockerfile +++ b/scripts/azure-pipelines/android/Dockerfile @@ -3,7 +3,6 @@ FROM ubuntu:focal-20240530 ADD https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb /packages-microsoft-prod.deb -ADD https://dl.google.com/android/repository/android-ndk-r25c-linux.zip /android-ndk-r25c-linux.zip ADD https://dl.google.com/android/repository/android-ndk-r26d-linux.zip /android-ndk-r26d-linux.zip # Add apt packages @@ -61,12 +60,10 @@ apt-get -y dist-upgrade apt-get -y --no-install-recommends install $APT_PACKAGES # Android NDK -unzip /android-ndk-r25c-linux.zip -rm -f android-ndk-r25c-linux.zip unzip /android-ndk-r26d-linux.zip rm -f android-ndk-r26d-linux.zip END_OF_SCRIPT -ENV ANDROID_NDK_HOME /android-ndk-r25c +ENV ANDROID_NDK_HOME /android-ndk-r26d WORKDIR /vcpkg From c95ac8462edd62236d489e4a037e88ceaecf7e38 Mon Sep 17 00:00:00 2001 From: Billy Robert O'Neal III Date: Thu, 11 Jul 2024 21:31:08 -0700 Subject: [PATCH 05/16] Update android pool. --- scripts/azure-pipelines/android/azure-pipelines.yml | 2 -- scripts/azure-pipelines/azure-pipelines.yml | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/azure-pipelines/android/azure-pipelines.yml b/scripts/azure-pipelines/android/azure-pipelines.yml index 85922e2f184366..208f9d9d200800 100644 --- a/scripts/azure-pipelines/android/azure-pipelines.yml +++ b/scripts/azure-pipelines/android/azure-pipelines.yml @@ -21,8 +21,6 @@ jobs: condition: and(succeeded(), contains('^${{ replace(parameters.jobName, '_', '-') }}$', '${{ parameters.tripletPattern }}')) pool: name: 'PrAnd-1ES-Pool' - demands: - - ImageOverride -equals vcpkg-mariner-docker-gen1 workspace: clean: resources timeoutInMinutes: 1440 # 1 day diff --git a/scripts/azure-pipelines/azure-pipelines.yml b/scripts/azure-pipelines/azure-pipelines.yml index e1fcdb72158994..9be51a7a9b28ab 100644 --- a/scripts/azure-pipelines/azure-pipelines.yml +++ b/scripts/azure-pipelines/azure-pipelines.yml @@ -2,7 +2,7 @@ # SPDX-License-Identifier: MIT # variables: - linux-docker-image: 'vcpkgandroidwus3.azurecr.io/vcpkg-android:2024-06-07' + linux-docker-image: 'vcpkgandroidwus3.azurecr.io/vcpkg-android:2024-07-11' parameters: - name: vcpkgToolSha From 5ef540a8396802c94818017b003815aa8d96e639 Mon Sep 17 00:00:00 2001 From: Billy Robert O'Neal III Date: Fri, 12 Jul 2024 12:28:43 -0700 Subject: [PATCH 06/16] Update Windows pool to 2024-07-11 --- .../windows-unstable/azure-pipelines.yml | 95 ++++++++++++++++++- .../azure-pipelines/windows-unstable/job.yml | 95 ------------------- .../windows/azure-pipelines.yml | 2 +- 3 files changed, 91 insertions(+), 101 deletions(-) delete mode 100644 scripts/azure-pipelines/windows-unstable/job.yml diff --git a/scripts/azure-pipelines/windows-unstable/azure-pipelines.yml b/scripts/azure-pipelines/windows-unstable/azure-pipelines.yml index 86c515e6b6868d..5b735a27d7faff 100644 --- a/scripts/azure-pipelines/windows-unstable/azure-pipelines.yml +++ b/scripts/azure-pipelines/windows-unstable/azure-pipelines.yml @@ -1,10 +1,95 @@ # Copyright (c) Microsoft Corporation. # SPDX-License-Identifier: MIT # -variables: - unstable-pool: 'vcpkg-testing-msvc' jobs: -- template: job.yml - parameters: - jobName: x64_windows +- job: x64_windows + pool: + name: vcpkg-testing-msvc + workspace: + clean: resources + timeoutInMinutes: 5760 # 4 days + variables: + - name: WORKING_ROOT + value: D:\ + - name: VCPKG_DOWNLOADS + value: D:\downloads + - name: Codeql.Enabled + value: false + steps: + - task: PowerShell@2 + name: mintsasstep + displayName: 'Generate Asset Cache SAS tokens' + inputs: + targetType: inline + script: | + if ($Null -eq (Get-PackageProvider -Name NuGet -ErrorAction Ignore)) { + Install-PackageProvider -Name NuGet -Force -Scope CurrentUser; + } + if ($Null -eq (Get-InstalledModule -Name PowerShellGet -MinimumVersion 2.2.1 -ErrorAction Ignore)) { + Install-Module PowerShellGet -MinimumVersion 2.2.1 -Scope CurrentUser -Force -AllowClobber + } + Install-Module -Name Az -Repository PSGallery -Scope CurrentUser -Force -AllowClobber + Connect-AzAccount -AccountId 'a81b4cd3-9d8d-4cb9-9a74-f2038f24f224' -Identity + $ctx = New-AzStorageContext -StorageAccountName 'vcpkgassetcachewus3' -UseConnectedAccount + $StartTime = Get-Date + $EndTime = $StartTime.AddDays(2) + $sas = New-AzStorageContainerSASToken -Name 'cache' -Permission rwd -StartTime $StartTime -ExpiryTime $EndTime -Context $ctx + Write-Host "##vso[task.setvariable variable=X_VCPKG_ASSET_SOURCES;isSecret=true;isOutput=true;isreadonly=true]x-azurl,https://vcpkgassetcachewus3.blob.core.windows.net/cache,$sas,readwrite" + - task: DownloadBuildArtifacts@0 + displayName: 'Download DropBuildNumber if not specified' + inputs: + buildType: specific + project: '0bdbc590-a062-4c3f-b0f6-9383f67865ee' + pipeline: 16549 + buildVersionToDownload: latestFromBranch + branchName: 'refs/heads/$(MSVCBranchName)' + artifactName: BuildNumber + downloadPath: 'D:\msvc-drops' + condition: eq(variables['DropBuildNumber'], '') + - task: PowerShell@2 + displayName: 'Set DropBuildNumber if not specified' + inputs: + targetType: inline + script: | + $DropBuildNumber = Get-Content -Path D:\msvc-drops\BuildNumber\Build.BuildNumber.txt + Write-Host "##vso[task.setvariable variable=DropBuildNumber]$DropBuildNumber" + Write-Host "Build Number set to: $DropBuildNumber" + pwsh: true + condition: eq(variables['DropBuildNumber'], '') + - task: ms-vscs-artifact.build-tasks.artifactDropDownloadTask-1.artifactDropDownloadTask@0 + displayName: 'Download msvc x86 ret' + inputs: + dropServiceURI: 'https://devdiv.artifacts.visualstudio.com/DefaultCollection' + buildNumber: 'msvc/builds/$(DropBuildNumber)/x86ret' + destinationPath: 'D:\msvc-drops\$(DropBuildNumber)\binaries.x86ret' + - task: ms-vscs-artifact.build-tasks.artifactDropDownloadTask-1.artifactDropDownloadTask@0 + displayName: 'Download msvc amd64 ret' + inputs: + dropServiceURI: 'https://devdiv.artifacts.visualstudio.com/DefaultCollection' + buildNumber: 'msvc/builds/$(DropBuildNumber)/amd64ret' + destinationPath: 'D:\msvc-drops\$(DropBuildNumber)\binaries.amd64ret' + - task: PowerShell@2 + displayName: 'Rearrange MSVC Drop Layout' + inputs: + targetType: filePath + filePath: 'scripts/azure-pipelines/windows-unstable/rearrange-msvc-drop-layout.ps1' + arguments: '-DropRoot "D:\msvc-drops\$(DropBuildNumber)" -BuildType ret' + pwsh: true + - script: .\bootstrap-vcpkg.bat + displayName: 'Bootstrap vcpkg' + - task: PowerShell@2 + displayName: '*** Test Modified Ports' + env: + X_VCPKG_ASSET_SOURCES: $(mintsasstep.X_VCPKG_ASSET_SOURCES) + inputs: + failOnStderr: true + filePath: 'scripts/azure-pipelines/test-modified-ports.ps1' + arguments: "-Triplet ${{ replace(parameters.jobName, '_', '-') }} -BuildReason $(Build.Reason) -WorkingRoot ${{ variables.WORKING_ROOT }} -ArtifactStagingDirectory $(Build.ArtifactStagingDirectory) -PassingIsPassing" + pwsh: true + - task: PublishBuildArtifacts@1 + displayName: "Publish Artifact: failure logs for ${{ replace(parameters.jobName, '_', '-') }}" + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)\failure-logs' + ArtifactName: "failure logs for ${{ replace(parameters.jobName, '_', '-') }}" + condition: ne(variables['FAILURE_LOGS_EMPTY'], 'True') diff --git a/scripts/azure-pipelines/windows-unstable/job.yml b/scripts/azure-pipelines/windows-unstable/job.yml deleted file mode 100644 index 556c6064f0dcd6..00000000000000 --- a/scripts/azure-pipelines/windows-unstable/job.yml +++ /dev/null @@ -1,95 +0,0 @@ -# Copyright (c) Microsoft Corporation. -# SPDX-License-Identifier: MIT -# - -jobs: -- job: ${{ parameters.jobName }} - pool: - name: $(unstable-pool) - workspace: - clean: resources - timeoutInMinutes: 5760 # 4 days - variables: - - name: WORKING_ROOT - value: D:\ - - name: VCPKG_DOWNLOADS - value: D:\downloads - - name: Codeql.Enabled - value: false - steps: - - task: PowerShell@2 - name: mintsasstep - displayName: 'Generate Asset Cache SAS tokens' - inputs: - targetType: inline - script: | - if ($Null -eq (Get-PackageProvider -Name NuGet -ErrorAction Ignore)) { - Install-PackageProvider -Name NuGet -Force -Scope CurrentUser; - } - if ($Null -eq (Get-InstalledModule -Name PowerShellGet -MinimumVersion 2.2.1 -ErrorAction Ignore)) { - Install-Module PowerShellGet -MinimumVersion 2.2.1 -Scope CurrentUser -Force -AllowClobber - } - Install-Module -Name Az -Repository PSGallery -Scope CurrentUser -Force -AllowClobber - Connect-AzAccount -AccountId 'a81b4cd3-9d8d-4cb9-9a74-f2038f24f224' -Identity - $ctx = New-AzStorageContext -StorageAccountName 'vcpkgassetcachewus3' -UseConnectedAccount - $StartTime = Get-Date - $EndTime = $StartTime.AddDays(2) - $sas = New-AzStorageContainerSASToken -Name 'cache' -Permission rwd -StartTime $StartTime -ExpiryTime $EndTime -Context $ctx - Write-Host "##vso[task.setvariable variable=X_VCPKG_ASSET_SOURCES;isSecret=true;isOutput=true;isreadonly=true]x-azurl,https://vcpkgassetcachewus3.blob.core.windows.net/cache,$sas,readwrite" - - task: DownloadBuildArtifacts@0 - displayName: 'Download DropBuildNumber if not specified' - inputs: - buildType: specific - project: '0bdbc590-a062-4c3f-b0f6-9383f67865ee' - pipeline: 16549 - buildVersionToDownload: latestFromBranch - branchName: 'refs/heads/$(MSVCBranchName)' - artifactName: BuildNumber - downloadPath: 'D:\msvc-drops' - condition: eq(variables['DropBuildNumber'], '') - - task: PowerShell@2 - displayName: 'Set DropBuildNumber if not specified' - inputs: - targetType: inline - script: | - $DropBuildNumber = Get-Content -Path D:\msvc-drops\BuildNumber\Build.BuildNumber.txt - Write-Host "##vso[task.setvariable variable=DropBuildNumber]$DropBuildNumber" - Write-Host "Build Number set to: $DropBuildNumber" - pwsh: true - condition: eq(variables['DropBuildNumber'], '') - - task: ms-vscs-artifact.build-tasks.artifactDropDownloadTask-1.artifactDropDownloadTask@0 - displayName: 'Download msvc x86 ret' - inputs: - dropServiceURI: 'https://devdiv.artifacts.visualstudio.com/DefaultCollection' - buildNumber: 'msvc/builds/$(DropBuildNumber)/x86ret' - destinationPath: 'D:\msvc-drops\$(DropBuildNumber)\binaries.x86ret' - - task: ms-vscs-artifact.build-tasks.artifactDropDownloadTask-1.artifactDropDownloadTask@0 - displayName: 'Download msvc amd64 ret' - inputs: - dropServiceURI: 'https://devdiv.artifacts.visualstudio.com/DefaultCollection' - buildNumber: 'msvc/builds/$(DropBuildNumber)/amd64ret' - destinationPath: 'D:\msvc-drops\$(DropBuildNumber)\binaries.amd64ret' - - task: PowerShell@2 - displayName: 'Rearrange MSVC Drop Layout' - inputs: - targetType: filePath - filePath: 'scripts/azure-pipelines/windows-unstable/rearrange-msvc-drop-layout.ps1' - arguments: '-DropRoot "D:\msvc-drops\$(DropBuildNumber)" -BuildType ret' - pwsh: true - - script: .\bootstrap-vcpkg.bat - displayName: 'Bootstrap vcpkg' - - task: PowerShell@2 - displayName: '*** Test Modified Ports' - env: - X_VCPKG_ASSET_SOURCES: $(mintsasstep.X_VCPKG_ASSET_SOURCES) - inputs: - failOnStderr: true - filePath: 'scripts/azure-pipelines/test-modified-ports.ps1' - arguments: "-Triplet ${{ replace(parameters.jobName, '_', '-') }} -BuildReason $(Build.Reason) -WorkingRoot ${{ variables.WORKING_ROOT }} -ArtifactStagingDirectory $(Build.ArtifactStagingDirectory) -PassingIsPassing" - pwsh: true - - task: PublishBuildArtifacts@1 - displayName: "Publish Artifact: failure logs for ${{ replace(parameters.jobName, '_', '-') }}" - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)\failure-logs' - ArtifactName: "failure logs for ${{ replace(parameters.jobName, '_', '-') }}" - condition: ne(variables['FAILURE_LOGS_EMPTY'], 'True') diff --git a/scripts/azure-pipelines/windows/azure-pipelines.yml b/scripts/azure-pipelines/windows/azure-pipelines.yml index b670862cccf412..ad67b36091920f 100644 --- a/scripts/azure-pipelines/windows/azure-pipelines.yml +++ b/scripts/azure-pipelines/windows/azure-pipelines.yml @@ -20,7 +20,7 @@ jobs: condition: and(succeeded(), contains('^${{ replace(parameters.jobName, '_', '-') }}$', '${{ parameters.tripletPattern }}')) pool: name: PrWin-1ES - demands: ImageVersionOverride -equals 2024.06.18 + demands: ImageVersionOverride -equals 2024.07.11 workspace: clean: resources timeoutInMinutes: 2880 # 2 days From 2900b2882fbaa99f00005f2cbd7875e1cfec8462 Mon Sep 17 00:00:00 2001 From: Billy Robert O'Neal III Date: Fri, 12 Jul 2024 16:33:31 -0700 Subject: [PATCH 07/16] Update macOS pool. --- scripts/azure-pipelines/azure-pipelines.yml | 4 +-- scripts/azure-pipelines/osx/README.md | 25 ++++++++----------- scripts/azure-pipelines/osx/register-guest.sh | 2 +- scripts/azure-pipelines/osx/setup-box.sh | 4 +-- 4 files changed, 16 insertions(+), 19 deletions(-) diff --git a/scripts/azure-pipelines/azure-pipelines.yml b/scripts/azure-pipelines/azure-pipelines.yml index 9be51a7a9b28ab..9319615078ea2e 100644 --- a/scripts/azure-pipelines/azure-pipelines.yml +++ b/scripts/azure-pipelines/azure-pipelines.yml @@ -75,14 +75,14 @@ jobs: - template: osx/azure-pipelines.yml parameters: jobName: x64_osx - poolName: 'PrOsx-2024-05-20' + poolName: 'PrOsx-2024-07-12' vcpkgToolSha: ${{ parameters.vcpkgToolSha }} tripletPattern: ${{ parameters.tripletPattern }} - template: osx/azure-pipelines.yml parameters: jobName: arm64_osx - poolName: 'PrOsx-2024-05-20-arm64' + poolName: 'PrOsx-2024-07-12-arm64' vcpkgToolSha: ${{ parameters.vcpkgToolSha }} tripletPattern: ${{ parameters.tripletPattern }} diff --git a/scripts/azure-pipelines/osx/README.md b/scripts/azure-pipelines/osx/README.md index c3966f6879ba72..e51e15cf22cae6 100644 --- a/scripts/azure-pipelines/osx/README.md +++ b/scripts/azure-pipelines/osx/README.md @@ -12,10 +12,6 @@ This is the checklist for what the vcpkg team does when updating the macOS machi - [ ] An Xcode installer - you can get this from Apple's developer website, although you'll need to sign in first: If you are doing this from a local macos box, you can skip to the "update the macos host" step. - If copying from a local box to one of the macOS machines, you can use scp: - ```sh - scp Command_Line_Tools_for_Xcode_15.dmg vcpkg@:/Users/vcpkg/clt.dmg - ``` ### Instructions (AMD64) @@ -29,7 +25,7 @@ This is the checklist for what the vcpkg team does when updating the macOS machi Note: This portion of the instructions is that which breaks most often depending on what Parallels and macOS are doing. You might need to use `softwareupdate --fetch-full-installer --full-installer-version 14.5` and point Parallels at that resulting installer in 'Applications' instead. -- [ ] Run parallels, and select that installer you just downloaded. Name the VM "vcpkg-osx--amd64", for example "vcpkg-osx-2024-05-20-amd64". +- [ ] Run parallels, and select that installer you just downloaded. Name the VM "vcpkg-osx--amd64", for example "vcpkg-osx-2024-07-12-amd64". - [ ] When creating the VM, customize the hardware to the following: * 12 processors * 24000 MB of memory @@ -44,7 +40,7 @@ This is the checklist for what the vcpkg team does when updating the macOS machi - [ ] Restart the VM - [ ] Change the desktop background to a solid color - [ ] Enable remote login in System Settings -> General -> Sharing -> Remote Login -- [ ] Update the Azure Agent URI in setup-box.sh to the current version. You can find this by going to the agent pool, selecting "New agent", picking macOS, and copying the link. For example https://vstsagentpackage.azureedge.net/agent/3.239.1/vsts-agent-osx-x64-3.239.1.tar.gz +- [ ] Update the Azure Agent URI in setup-box.sh to the current version. You can find this by going to the agent pool, selecting "New agent", picking macOS, and copying the link. For example https://vstsagentpackage.azureedge.net/agent/3.241.0/vsts-agent-osx-x64-3.241.0.tar.gz - [ ] Start the VM. Change the screen resolution to not be teeny weeny eyestrain o vision. - [ ] In the guest, set the vcpkg user to be able to use sudo without a password: ```sh @@ -59,6 +55,7 @@ This is the checklist for what the vcpkg team does when updating the macOS machi ssh vcpkg@MACHINE rm ~/.ssh/known_hosts chmod +x setup-guest.sh + ./setup-guest.sh rm setup-guest.sh rm setup-box.sh rm clt.dmg @@ -76,8 +73,8 @@ This is the checklist for what the vcpkg team does when updating the macOS machi ```sh ssh vcpkg@MACHINE brew install azcopy - azcopy copy ~/Parallels/vcpkg-osx-2024-05-20-amd64.pvmp "https://vcpkgimageminting...../pvms?" - azcopy copy ~/Parallels/vcpkg-osx-2024-05-20-amd64.sha256.txt "https://vcpkgimageminting...../pvms?" + azcopy copy ~/Parallels/vcpkg-osx-2024-07-12-amd64.pvmp "https://vcpkgimageminting...../pvms?" + azcopy copy ~/Parallels/vcpkg-osx-2024-07-12-amd64.sha256.txt "https://vcpkgimageminting...../pvms?" ``` - [ ] Go to https://dev.azure.com/vcpkg/public/_settings/agentqueues and create a new self hosted Agent pool named `PrOsx-YYYY-MM-DD` based on the current date. Check 'Grant access permission to all pipelines.' - [ ] Remove the macOS installer from Applications @@ -96,11 +93,11 @@ This is the checklist for what the vcpkg team does when updating the macOS machi rm macosvm-0.2-1-arm64-darwin21.tar.gz ``` - [ ] Download the matching `.ipsw` for the macOS copy to install. See https://mrmacintosh.com/apple-silicon-m1-full-macos-restore-ipsw-firmware-files-database/ ; links there to find the .ipsw. Example: https://updates.cdn-apple.com/2024SpringFCS/fullrestores/062-01897/C874907B-9F82-4109-87EB-6B3C9BF1507D/UniversalMac_14.5_23F79_Restore.ipsw -- [ ] Determine the VM name using the form "vcpkg-osx--arm64", for example "vcpkg-osx-2024-05-20-arm64". -- [ ] Open a terminal and run the following commands to create the VM with vcpkg-osx-2024-05-20-arm64 and UniversalMac_14.5_23F79_Restore.ipsw replaced as appropriate. +- [ ] Determine the VM name using the form "vcpkg-osx--arm64", for example "vcpkg-osx-2024-07-12-arm64". +- [ ] Open a terminal and run the following commands to create the VM with vcpkg-osx-2024-07-12-arm64 and UniversalMac_14.5_23F79_Restore.ipsw replaced as appropriate. ```sh - mkdir -p ~/Parallels/vcpkg-osx-2024-05-20-arm64 - cd ~/Parallels/vcpkg-osx-2024-05-20-arm64 + mkdir -p ~/Parallels/vcpkg-osx-2024-07-12-arm64 + cd ~/Parallels/vcpkg-osx-2024-07-12-arm64 ~/macosvm --disk disk.img,size=500g --aux aux.img -c 8 -r 12g --restore ~/UniversalMac_14.5_23F79_Restore.ipsw ./vm.json ~/macosvm -g ./vm.json ``` @@ -114,13 +111,12 @@ This is the checklist for what the vcpkg team does when updating the macOS machi - [ ] Enable remote login in the VM: Settings -> General -> Sharing -> Remote Login - [ ] Set the vcpkg user to be able to use sudo without a password: ```sh - rm ~/.ssh/known_hosts ssh vcpkg@vcpkgs-Virtual-Machine.local printf 'vcpkg\tALL=(ALL)\tNOPASSWD:\tALL\n' | sudo tee -a '/etc/sudoers.d/vcpkg' sudo chmod 0440 '/etc/sudoers.d/vcpkg' exit ``` -- [ ] Update the Azure Agent URI in setup-box.sh to the current version. You can find this by going to the agent pool, selecting "New agent", picking macOS, and copying the link. For example https://vstsagentpackage.azureedge.net/agent/3.239.1/vsts-agent-osx-arm64-3.239.1.tar.gz +- [ ] Update the Azure Agent URI in setup-box.sh to the current version. You can find this by going to the agent pool, selecting "New agent", picking macOS, and copying the link. For example https://vstsagentpackage.azureedge.net/agent/3.241.0/vsts-agent-osx-arm64-3.241.0.tar.gz - [ ] Copy setup-box.sh and the xcode installer renamed to 'clt.dmg' to the host. For example from a dev workstation: ```sh scp ./setup-guest.sh vcpkg@MACHINE:/Users/vcpkg @@ -128,6 +124,7 @@ This is the checklist for what the vcpkg team does when updating the macOS machi scp path/to/console/tools.dmg vcpkg@MACHINE:/Users/vcpkg/clt.dmg ssh vcpkg@MACHINE chmod +x setup-guest.sh + rm ~/.ssh/known_hosts ./setup-guest.sh rm setup-guest.sh rm setup-box.sh diff --git a/scripts/azure-pipelines/osx/register-guest.sh b/scripts/azure-pipelines/osx/register-guest.sh index 360b14ad2a7d5f..eadba44de650e0 100644 --- a/scripts/azure-pipelines/osx/register-guest.sh +++ b/scripts/azure-pipelines/osx/register-guest.sh @@ -3,7 +3,7 @@ if [ -z "$1" ]; then echo "PAT missing" exit 1 fi -export AGENT=`hostname | sed -nr 's/([^.]+).+/\1/p'` +export AGENT=`hostname | sed -nr 's/([^.]+).*/\1/p'` if [ `uname -m` = 'arm64' ]; then export POOL=`echo ~/Parallels/* | sed -nr 's/\/Users\/vcpkg\/Parallels\/vcpkg-osx-([0-9]{4}-[0-9]{2}-[0-9]{2})-arm64/PrOsx-\1-arm64/p'` # on arm64, DNS works diff --git a/scripts/azure-pipelines/osx/setup-box.sh b/scripts/azure-pipelines/osx/setup-box.sh index 41e9742888537f..1a23a8b8b48db1 100644 --- a/scripts/azure-pipelines/osx/setup-box.sh +++ b/scripts/azure-pipelines/osx/setup-box.sh @@ -19,9 +19,9 @@ fi brew install autoconf-archive autoconf automake azure-cli bison cmake gettext gfortran gperf gtk-doc libtool meson mono nasm ninja pkg-config powershell python-setuptools texinfo yasm mkdir ~/Data if [ `uname -m` = 'arm64' ]; then -curl -s -o ~/Downloads/azure-agent.tar.gz https://vstsagentpackage.azureedge.net/agent/3.239.1/vsts-agent-osx-arm64-3.239.1.tar.gz +curl -s -o ~/Downloads/azure-agent.tar.gz https://vstsagentpackage.azureedge.net/agent/3.241.0/vsts-agent-osx-arm64-3.241.0.tar.gz else -curl -s -o ~/Downloads/azure-agent.tar.gz https://vstsagentpackage.azureedge.net/agent/3.239.1/vsts-agent-osx-x64-3.239.1.tar.gz +curl -s -o ~/Downloads/azure-agent.tar.gz https://vstsagentpackage.azureedge.net/agent/3.241.0/vsts-agent-osx-x64-3.241.0.tar.gz fi mkdir ~/myagent tar xf ~/Downloads/azure-agent.tar.gz -C ~/myagent From fbd23cbb373797ba07f46e21334c828d0fcb7339 Mon Sep 17 00:00:00 2001 From: Billy Robert O'Neal III Date: Fri, 12 Jul 2024 21:57:34 -0700 Subject: [PATCH 08/16] Get rid of the mintsas job and Managed Identity in favor of Workload Identity Federation --- .../android/azure-pipelines.yml | 40 ++++++++++--------- scripts/azure-pipelines/azure-pipelines.yml | 15 ------- .../azure-pipelines/linux/azure-pipelines.yml | 27 +++++++------ .../azure-pipelines/osx/azure-pipelines.yml | 32 +++++++-------- .../windows/azure-pipelines.yml | 27 +++++++------ 5 files changed, 67 insertions(+), 74 deletions(-) diff --git a/scripts/azure-pipelines/android/azure-pipelines.yml b/scripts/azure-pipelines/android/azure-pipelines.yml index 208f9d9d200800..d8e1449c145efa 100644 --- a/scripts/azure-pipelines/android/azure-pipelines.yml +++ b/scripts/azure-pipelines/android/azure-pipelines.yml @@ -25,24 +25,15 @@ jobs: clean: resources timeoutInMinutes: 1440 # 1 day cancelTimeoutInMinutes: 1 - dependsOn: mintsas variables: - name: WORKING_ROOT value: /mnt/vcpkg-ci - name: VCPKG_DOWNLOADS value: /mnt/vcpkg-ci/downloads - - name: X_VCPKG_ASSET_SOURCES - value: $[ dependencies.mintsas.outputs['mintsasstep.X_VCPKG_ASSET_SOURCES'] ] - - name: X_VCPKG_BINARY_SOURCE_STUB - value: $[ dependencies.mintsas.outputs['mintsasstep.X_VCPKG_BINARY_SOURCE_STUB'] ] - name: ANDROID_NDK_HOME value: /android-ndk-r26d steps: # Note: /mnt is the Azure machines' temporary disk. - - bash: | - az login --identity - az acr login --name vcpkgandroidwus3 - displayName: 'Set up managed identity' - bash: | sudo mkdir /home/agent -m=777 sudo chown `id -u` /home/agent @@ -58,9 +49,16 @@ jobs: docker rm -f $CONTAINERS fi displayName: 'Stop and remove all docker containers' - - bash: | - docker pull ${{ parameters.dockerImage }} + - task: AzureCLI@2 displayName: 'Pull Docker Container' + inputs: + azureSubscription: 'VcpkgPrFleet' + scriptType: bash + failOnStandardError: true + scriptLocation: 'inlineScript' + inlineScript: | + az acr login --name vcpkgandroidwus3 + docker pull ${{ parameters.dockerImage }} - bash: | docker run --rm \ --mount type=bind,source=$(Build.Repository.LocalPath),target=/vcpkg \ @@ -75,10 +73,18 @@ jobs: ./scripts/azure-pipelines/bootstrap-from-source.sh ${{ parameters.vcpkgToolSha }} displayName: "Build vcpkg with CMake" condition: ne('use default', '${{ parameters.vcpkgToolSha }}') - - task: Bash@3 + - task: AzureCLI@2 + displayName: '*** Test Modified Ports' inputs: - targetType: inline - script: | + azureSubscription: 'VcpkgPrFleet' + scriptType: bash + failOnStandardError: true + scriptLocation: 'inlineScript' + inlineScript: | + end=`date -u -d "2 days" '+%Y-%m-%dT%H:%MZ'` + assetSas=`az storage container generate-sas --name cache --account-name vcpkgassetcachewus3 --as-user --auth-mode login --https-only --permissions rcl --expiry $end -o tsv` + binarySas=`az storage container generate-sas --name cache --account-name vcpkgbinarycachewus3 --as-user --auth-mode login --https-only --permissions rclw --expiry $end -o tsv` + echo Minting SAS tokens valid through $end USER=$(id --user) docker run --init -i \ -a stderr \ @@ -87,17 +93,15 @@ jobs: --mount type=bind,source=$(Build.Repository.LocalPath),target=/vcpkg \ --mount type=bind,source=$(WORKING_ROOT)/failure-logs,target=/vcpkg/failure-logs \ --mount type=bind,source=/mnt/vcpkg-ci,target=/mnt/vcpkg-ci \ - --env X_VCPKG_ASSET_SOURCES="$(X_VCPKG_ASSET_SOURCES)" \ + --env X_VCPKG_ASSET_SOURCES="x-azurl,https://vcpkgassetcachewus3.blob.core.windows.net/cache,$assetSas,readwrite" \ --env ANDROID_NDK_HOME="${{ variables.ANDROID_NDK_HOME }}" \ ${{ parameters.dockerImage }} \ pwsh \ -File /vcpkg/scripts/azure-pipelines/test-modified-ports.ps1 \ -Triplet ${{ replace(parameters.jobName, '_', '-') }} \ -BuildReason $(Build.Reason) \ - -BinarySourceStub "$(X_VCPKG_BINARY_SOURCE_STUB)" \ + -BinarySourceStub "x-azblob,https://vcpkgbinarycachewus3.blob.core.windows.net/cache,$binarySas" \ -WorkingRoot ${{ variables.WORKING_ROOT }} - failOnStderr: true - displayName: '*** Test Modified Ports' - bash: | CONTAINERS=$(docker ps -a -q) if [ -n "$CONTAINERS" ]; then diff --git a/scripts/azure-pipelines/azure-pipelines.yml b/scripts/azure-pipelines/azure-pipelines.yml index 9319615078ea2e..e728f92850a1b1 100644 --- a/scripts/azure-pipelines/azure-pipelines.yml +++ b/scripts/azure-pipelines/azure-pipelines.yml @@ -15,21 +15,6 @@ parameters: default: '-' jobs: -- job: mintsas - displayName: 'Mint SAS token for Asset and Binary Caches' - pool: - name: PrToken-1ES - steps: - - checkout: none - - script: | - az login --identity --username a81b4cd3-9d8d-4cb9-9a74-f2038f24f224 - end=`date -u -d "2 days" '+%Y-%m-%dT%H:%MZ'` - echo Minting SAS tokens valid through $end - echo "##vso[task.setvariable variable=X_VCPKG_ASSET_SOURCES;isSecret=true;isOutput=true;isreadonly=true]x-azurl,https://vcpkgassetcachewus3.blob.core.windows.net/cache,`az storage container generate-sas --name cache --account-name vcpkgassetcachewus3 --as-user --auth-mode login --https-only --permissions rcl --expiry $end -o tsv`,readwrite" - echo "##vso[task.setvariable variable=X_VCPKG_BINARY_SOURCE_STUB;isSecret=true;isOutput=true;isreadonly=true]x-azblob,https://vcpkgbinarycachewus3.blob.core.windows.net/cache,`az storage container generate-sas --name cache --account-name vcpkgbinarycachewus3 --as-user --auth-mode login --https-only --permissions rclw --expiry $end -o tsv`" - name: mintsasstep - displayName: 'Mint Tokens' - - template: windows/azure-pipelines.yml parameters: jobName: x86_windows diff --git a/scripts/azure-pipelines/linux/azure-pipelines.yml b/scripts/azure-pipelines/linux/azure-pipelines.yml index dbd857ef72921a..508b1a090de821 100644 --- a/scripts/azure-pipelines/linux/azure-pipelines.yml +++ b/scripts/azure-pipelines/linux/azure-pipelines.yml @@ -23,16 +23,11 @@ jobs: workspace: clean: resources timeoutInMinutes: 1440 # 1 day - dependsOn: mintsas variables: - name: WORKING_ROOT value: /mnt/vcpkg-ci - name: VCPKG_DOWNLOADS value: /mnt/vcpkg-ci/downloads - - name: X_VCPKG_ASSET_SOURCES - value: $[ dependencies.mintsas.outputs['mintsasstep.X_VCPKG_ASSET_SOURCES'] ] - - name: X_VCPKG_BINARY_SOURCE_STUB - value: $[ dependencies.mintsas.outputs['mintsasstep.X_VCPKG_BINARY_SOURCE_STUB'] ] steps: # Note: /mnt is the Azure machines' temporary disk. - bash: | @@ -48,15 +43,23 @@ jobs: - bash: ./scripts/azure-pipelines/bootstrap-from-source.sh ${{ parameters.vcpkgToolSha }} displayName: "Build vcpkg with CMake" condition: ne('use default', '${{ parameters.vcpkgToolSha }}') - - task: PowerShell@2 + - task: AzureCLI@2 displayName: '*** Test Modified Ports' - env: - X_VCPKG_ASSET_SOURCES: $(X_VCPKG_ASSET_SOURCES) inputs: - failOnStderr: true - filePath: 'scripts/azure-pipelines/test-modified-ports.ps1' - arguments: "-Triplet ${{ replace(parameters.jobName, '_', '-') }} -BuildReason $(Build.Reason) -BinarySourceStub \"$(X_VCPKG_BINARY_SOURCE_STUB)\" -WorkingRoot ${{ variables.WORKING_ROOT }} -ArtifactStagingDirectory $(Build.ArtifactStagingDirectory)" - pwsh: true + azureSubscription: 'VcpkgPrFleet' + scriptType: 'pscore' + failOnStandardError: true + scriptLocation: 'inlineScript' + inlineScript: | + $current = Get-Date -AsUtc + $endDate = $current.AddDays(2) + $end = Get-Date -Date $endDate -UFormat '+%Y-%m-%dT%H:%MZ' + $assetSas = az storage container generate-sas --name cache --account-name vcpkgassetcachewus3 --as-user --auth-mode login --https-only --permissions rcl --expiry $end -o tsv | Out-String + $assetSas = $assetSas.Trim() + $binarySas = az storage container generate-sas --name cache --account-name vcpkgbinarycachewus3 --as-user --auth-mode login --https-only --permissions rclw --expiry $end -o tsv | Out-String + $binarySas = $binarySas.Trim() + $env:X_VCPKG_ASSET_SOURCES = "x-azurl,https://vcpkgassetcachewus3.blob.core.windows.net/cache,$assetSas,readwrite" + & scripts/azure-pipelines/test-modified-ports.ps1 -Triplet ${{ replace(parameters.jobName, '_', '-') }} -BuildReason $(Build.Reason) -BinarySourceStub "x-azblob,https://vcpkgbinarycachewus3.blob.core.windows.net/cache,$binarySas" -WorkingRoot $env:WORKING_ROOT -ArtifactStagingDirectory $(Build.ArtifactStagingDirectory) - task: PublishBuildArtifacts@1 displayName: "Publish Artifact: failure logs for ${{ replace(parameters.jobName, '_', '-') }}" inputs: diff --git a/scripts/azure-pipelines/osx/azure-pipelines.yml b/scripts/azure-pipelines/osx/azure-pipelines.yml index a46ceeb5f29826..aa46ec4c561e0b 100644 --- a/scripts/azure-pipelines/osx/azure-pipelines.yml +++ b/scripts/azure-pipelines/osx/azure-pipelines.yml @@ -25,16 +25,11 @@ jobs: workspace: clean: resources timeoutInMinutes: 2880 # 2 days - dependsOn: mintsas variables: - name: WORKING_ROOT value: /Users/vcpkg/Data - name: VCPKG_DOWNLOADS value: /Users/vcpkg/Data/downloads - - name: X_VCPKG_ASSET_SOURCES - value: $[ dependencies.mintsas.outputs['mintsasstep.X_VCPKG_ASSET_SOURCES'] ] - - name: X_VCPKG_BINARY_SOURCE_STUB - value: $[ dependencies.mintsas.outputs['mintsasstep.X_VCPKG_BINARY_SOURCE_STUB'] ] steps: - bash: | sudo mkdir ${{ variables.VCPKG_DOWNLOADS }} || 0 @@ -47,20 +42,23 @@ jobs: - bash: ./scripts/azure-pipelines/bootstrap-from-source.sh ${{ parameters.vcpkgToolSha }} displayName: "Build vcpkg with CMake" condition: ne('use default', '${{ parameters.vcpkgToolSha }}') - - task: PowerShell@2 + - task: AzureCLI@2 displayName: '*** Test Modified Ports' - env: - X_VCPKG_ASSET_SOURCES: $(X_VCPKG_ASSET_SOURCES) inputs: - failOnStderr: true - filePath: 'scripts/azure-pipelines/test-modified-ports.ps1' - arguments: > - -Triplet ${{ replace(parameters.jobName, '_', '-') }} - -BuildReason "$(Build.Reason)" - -BinarySourceStub "$(X_VCPKG_BINARY_SOURCE_STUB)" - -WorkingRoot "$(WORKING_ROOT)" - -ArtifactStagingDirectory "$(Build.ArtifactStagingDirectory)" - pwsh: true + azureSubscription: 'VcpkgPrFleet' + scriptType: 'pscore' + failOnStandardError: true + scriptLocation: 'inlineScript' + inlineScript: | + $current = Get-Date -AsUtc + $endDate = $current.AddDays(2) + $end = Get-Date -Date $endDate -UFormat '+%Y-%m-%dT%H:%MZ' + $assetSas = az storage container generate-sas --name cache --account-name vcpkgassetcachewus3 --as-user --auth-mode login --https-only --permissions rcl --expiry $end -o tsv | Out-String + $assetSas = $assetSas.Trim() + $binarySas = az storage container generate-sas --name cache --account-name vcpkgbinarycachewus3 --as-user --auth-mode login --https-only --permissions rclw --expiry $end -o tsv | Out-String + $binarySas = $binarySas.Trim() + $env:X_VCPKG_ASSET_SOURCES = "x-azurl,https://vcpkgassetcachewus3.blob.core.windows.net/cache,$assetSas,readwrite" + & scripts/azure-pipelines/test-modified-ports.ps1 -Triplet ${{ replace(parameters.jobName, '_', '-') }} -BuildReason $(Build.Reason) -BinarySourceStub "x-azblob,https://vcpkgbinarycachewus3.blob.core.windows.net/cache,$binarySas" -WorkingRoot $env:WORKING_ROOT -ArtifactStagingDirectory $(Build.ArtifactStagingDirectory) - task: PublishBuildArtifacts@1 displayName: 'Publish Artifact: failure logs for x64-osx' inputs: diff --git a/scripts/azure-pipelines/windows/azure-pipelines.yml b/scripts/azure-pipelines/windows/azure-pipelines.yml index ad67b36091920f..b4e950a056e468 100644 --- a/scripts/azure-pipelines/windows/azure-pipelines.yml +++ b/scripts/azure-pipelines/windows/azure-pipelines.yml @@ -24,7 +24,6 @@ jobs: workspace: clean: resources timeoutInMinutes: 2880 # 2 days - dependsOn: mintsas variables: - name: WORKING_ROOT value: D:\ @@ -34,10 +33,6 @@ jobs: value: $(Build.ArtifactStagingDirectory)\format.diff - name: ExtraChecksTriplet value: x86-windows - - name: X_VCPKG_ASSET_SOURCES - value: $[ dependencies.mintsas.outputs['mintsasstep.X_VCPKG_ASSET_SOURCES'] ] - - name: X_VCPKG_BINARY_SOURCE_STUB - value: $[ dependencies.mintsas.outputs['mintsasstep.X_VCPKG_BINARY_SOURCE_STUB'] ] steps: - script: .\bootstrap-vcpkg.bat displayName: 'Bootstrap vcpkg' @@ -61,15 +56,23 @@ jobs: inputs: PathtoPublish: '$(DiffFile)' ArtifactName: 'format.diff' - - task: PowerShell@2 + - task: AzureCLI@2 displayName: '*** Test Modified Ports' - env: - X_VCPKG_ASSET_SOURCES: $(X_VCPKG_ASSET_SOURCES) inputs: - failOnStderr: true - filePath: 'scripts/azure-pipelines/test-modified-ports.ps1' - arguments: "-Triplet ${{ replace(parameters.jobName, '_', '-') }} -BuildReason $(Build.Reason) -BinarySourceStub \"$(X_VCPKG_BINARY_SOURCE_STUB)\" -WorkingRoot ${{ variables.WORKING_ROOT }} -ArtifactStagingDirectory $(Build.ArtifactStagingDirectory)" - pwsh: true + azureSubscription: 'VcpkgPrFleet' + scriptType: 'pscore' + failOnStandardError: true + scriptLocation: 'inlineScript' + inlineScript: | + $current = Get-Date -AsUtc + $endDate = $current.AddDays(2) + $end = Get-Date -Date $endDate -UFormat '+%Y-%m-%dT%H:%MZ' + $assetSas = az storage container generate-sas --name cache --account-name vcpkgassetcachewus3 --as-user --auth-mode login --https-only --permissions rcl --expiry $end -o tsv | Out-String + $assetSas = $assetSas.Trim() + $binarySas = az storage container generate-sas --name cache --account-name vcpkgbinarycachewus3 --as-user --auth-mode login --https-only --permissions rclw --expiry $end -o tsv | Out-String + $binarySas = $binarySas.Trim() + $env:X_VCPKG_ASSET_SOURCES = "x-azurl,https://vcpkgassetcachewus3.blob.core.windows.net/cache,$assetSas,readwrite" + & scripts/azure-pipelines/test-modified-ports.ps1 -Triplet ${{ replace(parameters.jobName, '_', '-') }} -BuildReason $(Build.Reason) -BinarySourceStub "x-azblob,https://vcpkgbinarycachewus3.blob.core.windows.net/cache,$binarySas" -WorkingRoot $env:WORKING_ROOT -ArtifactStagingDirectory $(Build.ArtifactStagingDirectory) - task: PowerShell@2 displayName: 'Validate version files' condition: eq('${{ replace(parameters.jobName, '_', '-') }}', '${{ variables.ExtraChecksTriplet }}') From 14c5518c58424e4b40b24182e50ddf6ffefca2ed Mon Sep 17 00:00:00 2001 From: Billy Robert O'Neal III Date: Fri, 12 Jul 2024 22:16:29 -0700 Subject: [PATCH 09/16] Add Southeast Asia replica to Windows. --- scripts/azure-pipelines/windows/create-image.ps1 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/azure-pipelines/windows/create-image.ps1 b/scripts/azure-pipelines/windows/create-image.ps1 index c77e4f701180ec..4c6026d760e14b 100644 --- a/scripts/azure-pipelines/windows/create-image.ps1 +++ b/scripts/azure-pipelines/windows/create-image.ps1 @@ -270,6 +270,9 @@ Set-AzVM ` -Name $ProtoVMName ` -Generalized +$westus3Location = @{Name = 'West US 3';} +$southEastAsiaLocation = @{Name = 'Southeast Asia';} + New-AzGalleryImageVersion ` -ResourceGroupName 'vcpkg-image-minting' ` -GalleryName 'vcpkg_gallery_wus3' ` @@ -279,7 +282,8 @@ New-AzGalleryImageVersion ` -SourceImageId $VMCreated.ID ` -ReplicaCount 1 ` -StorageAccountType 'Premium_LRS' ` - -PublishingProfileExcludeFromLatest + -PublishingProfileExcludeFromLatest ` + -TargetExtendedLocation @($westus3Location, $southEastAsiaLocation) #################################################################################################### Write-Progress ` From 9c2780d0e7c64fa2f8bc06947cc734afab4e73b4 Mon Sep 17 00:00:00 2001 From: Billy Robert O'Neal III Date: Sat, 13 Jul 2024 00:03:20 -0700 Subject: [PATCH 10/16] Add missing SAS question mark --- scripts/azure-pipelines/windows/deploy-azure-cli.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/azure-pipelines/windows/deploy-azure-cli.ps1 b/scripts/azure-pipelines/windows/deploy-azure-cli.ps1 index 3320531a9c7d04..6ec6173b2be8af 100644 --- a/scripts/azure-pipelines/windows/deploy-azure-cli.ps1 +++ b/scripts/azure-pipelines/windows/deploy-azure-cli.ps1 @@ -12,7 +12,7 @@ if ([string]::IsNullOrEmpty($SasToken)) { $AzCliUrl = 'https://azcliprod.blob.core.windows.net/msi/azure-cli-2.62.0-x64.msi' } else { $SasToken = $SasToken.Replace('"', '') - $AzCliUrl = "https://vcpkgimageminting.blob.core.windows.net/assets/azure-cli-2.62.0-x64.msi$SasToken" + $AzCliUrl = "https://vcpkgimageminting.blob.core.windows.net/assets/azure-cli-2.62.0-x64.msi?$SasToken" } DownloadAndInstall -Url $AzCliUrl -Name 'Azure CLI' -Args @('/quiet', '/norestart') From 80def7c266d4dc84d50787371f500b99bd0f5351 Mon Sep 17 00:00:00 2001 From: Billy Robert O'Neal III Date: Sat, 13 Jul 2024 00:09:31 -0700 Subject: [PATCH 11/16] Fix target region typo. --- scripts/azure-pipelines/windows/create-image.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/azure-pipelines/windows/create-image.ps1 b/scripts/azure-pipelines/windows/create-image.ps1 index 4c6026d760e14b..18474c78315d18 100644 --- a/scripts/azure-pipelines/windows/create-image.ps1 +++ b/scripts/azure-pipelines/windows/create-image.ps1 @@ -283,7 +283,7 @@ New-AzGalleryImageVersion ` -ReplicaCount 1 ` -StorageAccountType 'Premium_LRS' ` -PublishingProfileExcludeFromLatest ` - -TargetExtendedLocation @($westus3Location, $southEastAsiaLocation) + -TargetRegion @($westus3Location, $southEastAsiaLocation) #################################################################################################### Write-Progress ` From c2a8b43cdbfc1fba30606b42c4f5fdc4dd061640 Mon Sep 17 00:00:00 2001 From: Billy Robert O'Neal III Date: Sat, 13 Jul 2024 00:28:01 -0700 Subject: [PATCH 12/16] Update Windows pool to VMs with Azure CLI fixed. --- scripts/azure-pipelines/windows/azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/azure-pipelines/windows/azure-pipelines.yml b/scripts/azure-pipelines/windows/azure-pipelines.yml index b4e950a056e468..bfe2c9cdaf808a 100644 --- a/scripts/azure-pipelines/windows/azure-pipelines.yml +++ b/scripts/azure-pipelines/windows/azure-pipelines.yml @@ -20,7 +20,7 @@ jobs: condition: and(succeeded(), contains('^${{ replace(parameters.jobName, '_', '-') }}$', '${{ parameters.tripletPattern }}')) pool: name: PrWin-1ES - demands: ImageVersionOverride -equals 2024.07.11 + demands: ImageVersionOverride -equals 2024.07.12 workspace: clean: resources timeoutInMinutes: 2880 # 2 days From e175a0ba25463801c0e7115c1466c919787308b6 Mon Sep 17 00:00:00 2001 From: Billy Robert O'Neal III Date: Mon, 15 Jul 2024 10:29:52 -0700 Subject: [PATCH 13/16] [arg-router] Always depend on Boost. Submitted upstream as https://github.com/cmannett85/arg_router/pull/398 --- ports/arg-router/always-depend-on-boost.patch | 22 +++++++++++++++++++ ports/arg-router/portfile.cmake | 2 ++ ports/arg-router/vcpkg.json | 1 + versions/a-/arg-router.json | 5 +++++ versions/baseline.json | 2 +- 5 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 ports/arg-router/always-depend-on-boost.patch diff --git a/ports/arg-router/always-depend-on-boost.patch b/ports/arg-router/always-depend-on-boost.patch new file mode 100644 index 00000000000000..233443069ea92a --- /dev/null +++ b/ports/arg-router/always-depend-on-boost.patch @@ -0,0 +1,22 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 2828e64..7b84de3 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -40,6 +40,8 @@ endif() + include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/build_types/documentation.cmake") + + set(BOOST_VERSION 1.74) ++find_package(Boost ${BOOST_VERSION} REQUIRED) ++ + if(NOT INSTALLATION_ONLY) + include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/versioning/version.cmake") + include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/copyright_checker.cmake") +@@ -48,8 +50,6 @@ if(NOT INSTALLATION_ONLY) + include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/sanitizers.cmake") + include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/ccache.cmake") + +- find_package(Boost ${BOOST_VERSION} REQUIRED) +- + find_package(span-lite QUIET) + if (NOT span-lite_FOUND) + message(WARNING "span-lite package not found, you will need to compile against C++20 or higher") diff --git a/ports/arg-router/portfile.cmake b/ports/arg-router/portfile.cmake index b09f250bcc55d3..e70e85c3ef8742 100644 --- a/ports/arg-router/portfile.cmake +++ b/ports/arg-router/portfile.cmake @@ -4,6 +4,8 @@ vcpkg_from_github( REF v${VERSION} HEAD_REF main SHA512 0348a39c0e091b1b0d6887528f6d48372162ed2526fb81935761cf93ff006fc685bbf834d44cea60cdaf4d8b2e947b6cb1a81c901c02aaba68a0dfd16a12ca20 + PATCHES + always-depend-on-boost.patch # https://github.com/cmannett85/arg_router/pull/398 ) set(VCPKG_BUILD_TYPE release) # header-only port diff --git a/ports/arg-router/vcpkg.json b/ports/arg-router/vcpkg.json index c86dd1b9cd02cc..09a57046d044f0 100644 --- a/ports/arg-router/vcpkg.json +++ b/ports/arg-router/vcpkg.json @@ -1,6 +1,7 @@ { "name": "arg-router", "version": "1.4.0", + "port-version": 1, "description": "C++ command line argument parsing and routing.", "homepage": "https://github.com/cmannett85/arg_router", "documentation": "https://cmannett85.github.io/arg_router/", diff --git a/versions/a-/arg-router.json b/versions/a-/arg-router.json index 2cb30d9c0a8b52..39b5e77287866a 100644 --- a/versions/a-/arg-router.json +++ b/versions/a-/arg-router.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "1e8ee2b4774091c604ac1ff4242710234b20b7bd", + "version": "1.4.0", + "port-version": 1 + }, { "git-tree": "b0415ac98a98ec00c2c579c6925588b089bdc158", "version": "1.4.0", diff --git a/versions/baseline.json b/versions/baseline.json index ac43c1cfaddc13..e4bbe8696e9953 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -190,7 +190,7 @@ }, "arg-router": { "baseline": "1.4.0", - "port-version": 0 + "port-version": 1 }, "argagg": { "baseline": "0.4.7", From df19a7c3557de1f99ae7be0e3279ec25f29cbf07 Mon Sep 17 00:00:00 2001 From: Billy Robert O'Neal III Date: Mon, 15 Jul 2024 10:51:57 -0700 Subject: [PATCH 14/16] [wg21-linear-algebra] Use external mdspan --- ports/wg21-linear-algebra/portfile.cmake | 5 +++-- .../use-external-mdspan.patch | 17 +++++++++++++++++ ports/wg21-linear-algebra/vcpkg.json | 1 + versions/baseline.json | 2 +- versions/w-/wg21-linear-algebra.json | 5 +++++ 5 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 ports/wg21-linear-algebra/use-external-mdspan.patch diff --git a/ports/wg21-linear-algebra/portfile.cmake b/ports/wg21-linear-algebra/portfile.cmake index ef9d98a1686a20..d4f9799aaac381 100644 --- a/ports/wg21-linear-algebra/portfile.cmake +++ b/ports/wg21-linear-algebra/portfile.cmake @@ -1,10 +1,10 @@ -vcpkg_minimum_required(VERSION 2022-10-12) # for ${VERSION} - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO BobSteagall/wg21 REF "v${VERSION}" SHA512 ab1db0cff476d2f63a5d1fcc1d3b40acbceeacae61a99d7ad0b8d8abe21413da97b71c088a331b70c0d0c3dc4615953485c68af46698ec7f0013e14bea5f9452 + PATCHES + use-external-mdspan.patch # https://github.com/BobSteagall/wg21/pull/80 ) vcpkg_cmake_configure( @@ -13,6 +13,7 @@ vcpkg_cmake_configure( -DLA_INSTALL=ON -DLA_BUILD_PACKAGE=OFF -DLA_ENABLE_TESTS=OFF + -DUSE_EXTERNAL_MDSPAN=ON ) vcpkg_cmake_install() diff --git a/ports/wg21-linear-algebra/use-external-mdspan.patch b/ports/wg21-linear-algebra/use-external-mdspan.patch new file mode 100644 index 00000000000000..a5a70c19c9c5d3 --- /dev/null +++ b/ports/wg21-linear-algebra/use-external-mdspan.patch @@ -0,0 +1,17 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7821b27..723a1a9 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -12,7 +12,11 @@ include(GNUInstallDirs) + include(CMakeDependentOption) + include(CMakePackageConfigHelpers) + +-if(EXISTS ${CMAKE_BINARY_DIR}/conanbuildinfo_multi.cmake) ++option(USE_EXTERNAL_MDSPAN "Use external copy of mdspan" OFF) ++ ++if(${USE_EXTERNAL_MDSPAN}) ++ find_package(mdspan CONFIG REQUIRED) ++elseif(EXISTS ${CMAKE_BINARY_DIR}/conanbuildinfo_multi.cmake) + include(${CMAKE_BINARY_DIR}/conanbuildinfo_multi.cmake) + conan_basic_setup() + find_package(mdspan CONFIG REQUIRED) diff --git a/ports/wg21-linear-algebra/vcpkg.json b/ports/wg21-linear-algebra/vcpkg.json index a0e6264c385a88..4379168ea05988 100644 --- a/ports/wg21-linear-algebra/vcpkg.json +++ b/ports/wg21-linear-algebra/vcpkg.json @@ -1,6 +1,7 @@ { "name": "wg21-linear-algebra", "version": "0.7.3", + "port-version": 1, "description": "A linear algebra proposal for the C++ standard library", "license": "NCSA", "dependencies": [ diff --git a/versions/baseline.json b/versions/baseline.json index e4bbe8696e9953..77b00ecc8cc8d8 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -9410,7 +9410,7 @@ }, "wg21-linear-algebra": { "baseline": "0.7.3", - "port-version": 0 + "port-version": 1 }, "wg21-sg14": { "baseline": "2019-08-13", diff --git a/versions/w-/wg21-linear-algebra.json b/versions/w-/wg21-linear-algebra.json index 8889f6a60ffd2c..3694ce33176131 100644 --- a/versions/w-/wg21-linear-algebra.json +++ b/versions/w-/wg21-linear-algebra.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "ae6b649275fdfaa2eba5520e9a2dd6b45c1b8db2", + "version": "0.7.3", + "port-version": 1 + }, { "git-tree": "85073707ba15d2e60bdcf7e7f0c513d6bebe6332", "version": "0.7.3", From 288b4c5a2c4bd1babf9fc95aa83ab90bfdc73451 Mon Sep 17 00:00:00 2001 From: Billy Robert O'Neal III Date: Mon, 15 Jul 2024 12:27:14 -0700 Subject: [PATCH 15/16] [ztd-cuneicode,ztd-text] Fix referring to nonexistent target and out of source contents. --- ports/ztd-cuneicode/fix-cmake-install.patch | 9 +++++--- ports/ztd-cuneicode/portfile.cmake | 4 +++- ports/ztd-cuneicode/vcpkg.json | 1 + ports/ztd-text/fix-cmake-install.patch | 24 ++++++++++++++++----- ports/ztd-text/portfile.cmake | 17 +++++++++++++-- ports/ztd-text/vcpkg.json | 2 ++ versions/baseline.json | 4 ++-- versions/z-/ztd-cuneicode.json | 5 +++++ versions/z-/ztd-text.json | 5 +++++ 9 files changed, 58 insertions(+), 13 deletions(-) diff --git a/ports/ztd-cuneicode/fix-cmake-install.patch b/ports/ztd-cuneicode/fix-cmake-install.patch index 431530bfba154f..75d5576c064a59 100644 --- a/ports/ztd-cuneicode/fix-cmake-install.patch +++ b/ports/ztd-cuneicode/fix-cmake-install.patch @@ -77,10 +77,10 @@ index 00aa8b6..d49889b 100644 add_subdirectory(single) endif() diff --git a/cmake/ztd.cuneicode-config.cmake.in b/cmake/ztd.cuneicode-config.cmake.in -index 4bfb041..823d50b 100644 +index 4bfb041..1b28918 100644 --- a/cmake/ztd.cuneicode-config.cmake.in +++ b/cmake/ztd.cuneicode-config.cmake.in -@@ -1,6 +1,11 @@ +@@ -1,8 +1,13 @@ @PACKAGE_INIT@ +include(CMakeFindDependencyMacro) +find_dependency(ztd.encoding_tables CONFIG) @@ -91,5 +91,8 @@ index 4bfb041..823d50b 100644 +if (TARGET ztd.cuneicode) + add_library(ztd::cuneicode ALIAS ztd.cuneicode) get_target_property(ZTD_CUNEICODE_INCLUDE_DIRS - ztd.cuneicode.single INTERFACE_INCLUDE_DIRECTORIES) +- ztd.cuneicode.single INTERFACE_INCLUDE_DIRECTORIES) ++ ztd.cuneicode INTERFACE_INCLUDE_DIRECTORIES) set_and_check(ZTD_CUNEICODE_INCLUDE_DIRS "${ZTD_CUNEICODE_INCLUDE_DIRS}") + endif() + diff --git a/ports/ztd-cuneicode/portfile.cmake b/ports/ztd-cuneicode/portfile.cmake index 0bff550409f1f2..0650284f383b9a 100644 --- a/ports/ztd-cuneicode/portfile.cmake +++ b/ports/ztd-cuneicode/portfile.cmake @@ -1,13 +1,15 @@ if (VCPKG_TARGET_IS_WINDOWS) vcpkg_check_linkage(ONLY_STATIC_LIBRARY) endif() + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO soasis/cuneicode REF 093041aa934b7b09e7ee7300abdc3f54bb57e389 SHA512 0066fee5cf75fa07dc97934153e4206e4add69f15602526c1953b0302d5a6f8b56256e837a73acee187b0e02e676fba1350ad39b162c4901c624b12fa4e0fb03 HEAD_REF main - PATCHES fix-cmake-install.patch + PATCHES + fix-cmake-install.patch # Also contains https://github.com/soasis/cuneicode/pull/12 ) vcpkg_cmake_configure( diff --git a/ports/ztd-cuneicode/vcpkg.json b/ports/ztd-cuneicode/vcpkg.json index dc1d8fd0f5287c..250331684015ae 100644 --- a/ports/ztd-cuneicode/vcpkg.json +++ b/ports/ztd-cuneicode/vcpkg.json @@ -1,6 +1,7 @@ { "name": "ztd-cuneicode", "version-date": "2023-11-03", + "port-version": 1, "description": "Shared tables between C and C++ for encoding infrastructure", "homepage": "http://ztdcuneicode.rtfd.io/", "license": "Apache-2.0", diff --git a/ports/ztd-text/fix-cmake-install.patch b/ports/ztd-text/fix-cmake-install.patch index f053e76efadacb..4496825fd0eb72 100644 --- a/ports/ztd-text/fix-cmake-install.patch +++ b/ports/ztd-text/fix-cmake-install.patch @@ -1,8 +1,21 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index fd8e1c8..c92aaa5 100644 +index 607394b..d80fb23 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -51,6 +51,8 @@ project(ztd.text +@@ -34,12 +34,6 @@ cmake_policy(VERSION 3.21) + # # Project kickstart + # Includes a bunch of basic flags and utilities shared across projects + # See more at the github repository link below +-include(FetchContent) +-FetchContent_Declare(ztd.cmake +- GIT_REPOSITORY https://github.com/soasis/cmake +- GIT_SHALLOW ON +- GIT_TAG main) +-FetchContent_MakeAvailable(ztd.cmake) + set(CMAKE_PROJECT_INCLUDE ${ZTD_CMAKE_PROJECT_PRELUDE}) + + # # Project declaration +@@ -51,6 +45,8 @@ project(ztd.text HOMEPAGE_URL "https://ztdtext.readthedocs.io/en/latest/" LANGUAGES C CXX) @@ -11,7 +24,7 @@ index fd8e1c8..c92aaa5 100644 if(ZTD_TEXT_READTHEDOCS) # ReadTheDocs seems unable to handle the include at the project level: something must be going wrong? include(CheckCXXCompilerFlag) -@@ -139,40 +141,17 @@ option(ZTD_TEXT_BOOST.TEXT "Enable usage of Boost.Text benchmarks and examples" +@@ -139,40 +135,18 @@ option(ZTD_TEXT_BOOST.TEXT "Enable usage of Boost.Text benchmarks and examples" # # Dependencies # ztd.idk @@ -37,6 +50,7 @@ index fd8e1c8..c92aaa5 100644 -FetchContent_MakeAvailable(ztd.encoding_tables) # ztd.cuneicode ++find_package(ztd.cuneicode CONFIG REQUIRED) set(ZTD_CUNEICODE_SIMDUTF_SHARED ${ZTD_TEXT_BENCHMARKS}) -FetchContent_Declare(ztd.cuneicode - GIT_REPOSITORY https://github.com/soasis/cuneicode.git @@ -54,7 +68,7 @@ index fd8e1c8..c92aaa5 100644 if (ZTD_TEXT_BENCHAMRKS OR ZTD_TEXT_GENERATE_SINGLE OR ZTD_TEXT_DOCUMENTATION) find_package(Python3 REQUIRED COMPONENTS Interpreter) -@@ -187,16 +166,17 @@ target_include_directories(ztd.text +@@ -187,16 +161,17 @@ target_include_directories(ztd.text INTERFACE $ $) @@ -74,7 +88,7 @@ index fd8e1c8..c92aaa5 100644 # # Config / Version packaging # Version configurations configure_package_config_file( -@@ -213,6 +193,15 @@ export(TARGETS ztd.text +@@ -213,6 +188,15 @@ export(TARGETS ztd.text FILE "${CMAKE_CURRENT_BINARY_DIR}/cmake/ztd.text/ztd.text-targets.cmake") diff --git a/ports/ztd-text/portfile.cmake b/ports/ztd-text/portfile.cmake index 600221a966b89d..85297267a4fd92 100644 --- a/ports/ztd-text/portfile.cmake +++ b/ports/ztd-text/portfile.cmake @@ -1,16 +1,29 @@ +vcpkg_from_github( + OUT_SOURCE_PATH ZTD_CMAKE_SOURCE_PATH + REPO soasis/cmake + REF c29df2f0b006f8b24214ccea0a7e2f8fbbe135ce + SHA512 5dda06c1ba6422eb0d4392dee962e731505ec93ac90de0129a8b8519e376cc53e24177791e7fed373ca1b3f4377b450a65922ad37b612f29330e6f81d65ff463 +) + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO soasis/text REF c07fba735ee8389d328103c10ce9a8d49f345060 SHA512 ca9ecacf3260f3915b7d2d90fb1d84f4083775043d592ac5d869a15debf5512d42488d43bd0d3d981180519359a423314e563f2065fa3effe2749904706f483a HEAD_REF main - PATCHES fix-cmake-install.patch + PATCHES + fix-cmake-install.patch ) set(VCPKG_BUILD_TYPE release) # header-only vcpkg_cmake_configure( - SOURCE_PATH ${SOURCE_PATH} + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + # See https://github.com/soasis/cmake/blob/c29df2f0b006f8b24214ccea0a7e2f8fbbe135ce/CMakeLists.txt#L43 + "-DZTD_CMAKE_PACKAGES=${ZTD_CMAKE_SOURCE_PATH}/Packages" + "-DZTD_CMAKE_MODULES=${ZTD_CMAKE_SOURCE_PATH}/Modules" + "-DZTD_CMAKE_PROJECT_PRELUDE=${ZTD_CMAKE_SOURCE_PATH}/Includes/Project.cmake" ) vcpkg_cmake_install() diff --git a/ports/ztd-text/vcpkg.json b/ports/ztd-text/vcpkg.json index 965edd81922a55..c0719af3e277b1 100644 --- a/ports/ztd-text/vcpkg.json +++ b/ports/ztd-text/vcpkg.json @@ -1,6 +1,7 @@ { "name": "ztd-text", "version-date": "2023-11-03", + "port-version": 1, "description": "A spicy text library.", "homepage": "https://github.com/soasis/text", "license": "Apache-2.0", @@ -10,6 +11,7 @@ "name": "vcpkg-cmake", "host": true }, + "ztd-cuneicode", "ztd-platform", "ztd-static-containers" ] diff --git a/versions/baseline.json b/versions/baseline.json index 77b00ecc8cc8d8..ab88eee009a9f9 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -9790,7 +9790,7 @@ }, "ztd-cuneicode": { "baseline": "2023-11-03", - "port-version": 0 + "port-version": 1 }, "ztd-encoding-tables": { "baseline": "2023-06-10", @@ -9810,7 +9810,7 @@ }, "ztd-text": { "baseline": "2023-11-03", - "port-version": 0 + "port-version": 1 }, "zug": { "baseline": "2021-04-23", diff --git a/versions/z-/ztd-cuneicode.json b/versions/z-/ztd-cuneicode.json index 57913fa286e83e..5e2aab99a85124 100644 --- a/versions/z-/ztd-cuneicode.json +++ b/versions/z-/ztd-cuneicode.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "a726ae260ced8b8478d778f5e7008a4614e097e5", + "version-date": "2023-11-03", + "port-version": 1 + }, { "git-tree": "2730f0379c0ef98a286d57784b01649d5bb59d52", "version-date": "2023-11-03", diff --git a/versions/z-/ztd-text.json b/versions/z-/ztd-text.json index af5e5b0ecc8db7..e7dfe5614f81e8 100644 --- a/versions/z-/ztd-text.json +++ b/versions/z-/ztd-text.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "3f17a0d3b12f26513a00c38c977b2549330fc318", + "version-date": "2023-11-03", + "port-version": 1 + }, { "git-tree": "e9d678e835ff88ff81c3fb1e6273d247f1ec33bd", "version-date": "2023-11-03", From 4835baa15d0a47fe27e0e0724611f995a3c2daa5 Mon Sep 17 00:00:00 2001 From: Billy Robert O'Neal III Date: Mon, 15 Jul 2024 13:09:37 -0700 Subject: [PATCH 16/16] [qtwebchannel] Fix qml installed but disabled builds. Co-authored by: Alexander Neumann <30894796+Neumann-A@users.noreply.github.com> --- ports/qtwebchannel/portfile.cmake | 1 + ports/qtwebchannel/vcpkg.json | 1 + versions/baseline.json | 2 +- versions/q-/qtwebchannel.json | 5 +++++ 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ports/qtwebchannel/portfile.cmake b/ports/qtwebchannel/portfile.cmake index f07e0c6e2e9fe5..18f9512b119b1e 100644 --- a/ports/qtwebchannel/portfile.cmake +++ b/ports/qtwebchannel/portfile.cmake @@ -9,6 +9,7 @@ FEATURES "qml" CMAKE_REQUIRE_FIND_PACKAGE_Qt6Quick INVERTED_FEATURES "qml" CMAKE_DISABLE_FIND_PACKAGE_Qt6Quick + "qml" CMAKE_DISABLE_FIND_PACKAGE_Qt6Qml ) qt_install_submodule(PATCHES ${${PORT}_PATCHES} diff --git a/ports/qtwebchannel/vcpkg.json b/ports/qtwebchannel/vcpkg.json index 77c1d074659f63..10dde6365e3096 100644 --- a/ports/qtwebchannel/vcpkg.json +++ b/ports/qtwebchannel/vcpkg.json @@ -1,6 +1,7 @@ { "name": "qtwebchannel", "version": "6.7.2", + "port-version": 1, "description": "Qt WebChannel enables peer-to-peer communication between a server (QML/C++ application) and a client (HTML/JavaScript or QML application).", "homepage": "https://www.qt.io/", "license": null, diff --git a/versions/baseline.json b/versions/baseline.json index ab88eee009a9f9..71de0ca667514c 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -7542,7 +7542,7 @@ }, "qtwebchannel": { "baseline": "6.7.2", - "port-version": 0 + "port-version": 1 }, "qtwebengine": { "baseline": "6.7.2", diff --git a/versions/q-/qtwebchannel.json b/versions/q-/qtwebchannel.json index 17d70224161022..efe13b4e81d3a0 100644 --- a/versions/q-/qtwebchannel.json +++ b/versions/q-/qtwebchannel.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "231069d8c523d97debb2dcbe5b2d448407634c35", + "version": "6.7.2", + "port-version": 1 + }, { "git-tree": "fea23356981b7538404464245501f15df5aaaefe", "version": "6.7.2",