From 55c719b1b2ae03c79509c85327dfba6291f612d3 Mon Sep 17 00:00:00 2001 From: Billy Robert O'Neal III Date: Tue, 11 Mar 2025 16:42:04 -0700 Subject: [PATCH 01/20] Remove ImageOverride now that January- image is gone. --- scripts/azure-pipelines/linux/azure-pipelines.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/azure-pipelines/linux/azure-pipelines.yml b/scripts/azure-pipelines/linux/azure-pipelines.yml index daef6437bbd7fc..41a20ac2646c3f 100644 --- a/scripts/azure-pipelines/linux/azure-pipelines.yml +++ b/scripts/azure-pipelines/linux/azure-pipelines.yml @@ -20,7 +20,6 @@ jobs: condition: and(succeeded(), contains('^${{ replace(parameters.jobName, '_', '-') }}$', '${{ parameters.tripletPattern }}')) pool: name: PrLin-WUS - demands: ImageOverride -equals PrLin-WUS-Ubuntu-22-04 workspace: clean: resources timeoutInMinutes: 1440 # 1 day From a1ded03886bc0721c7c2b02407c85e91e249e2a7 Mon Sep 17 00:00:00 2001 From: Billy Robert O'Neal III Date: Wed, 12 Mar 2025 18:45:50 -0700 Subject: [PATCH 02/20] Add Dockerfile for Linux --- scripts/azure-pipelines/android/Dockerfile | 2 +- .../android/create-docker-image.ps1 | 32 ------------- .../azure-pipelines/create-docker-images.ps1 | 45 +++++++++++++++++++ scripts/azure-pipelines/linux/Dockerfile | 7 +++ .../linux/changing-linux-packages.md | 5 --- .../azure-pipelines/linux/managed-image.json | 31 ------------- .../azure-pipelines/linux/provision-image.sh | 17 ++++--- 7 files changed, 61 insertions(+), 78 deletions(-) delete mode 100644 scripts/azure-pipelines/android/create-docker-image.ps1 create mode 100644 scripts/azure-pipelines/create-docker-images.ps1 create mode 100644 scripts/azure-pipelines/linux/Dockerfile delete mode 100644 scripts/azure-pipelines/linux/changing-linux-packages.md delete mode 100644 scripts/azure-pipelines/linux/managed-image.json diff --git a/scripts/azure-pipelines/android/Dockerfile b/scripts/azure-pipelines/android/Dockerfile index bd4dbd4086626c..47fc64c923ba33 100644 --- a/scripts/azure-pipelines/android/Dockerfile +++ b/scripts/azure-pipelines/android/Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1.4 # DisableDockerDetector "Used to build the container deployed to Azure Container Registry" -FROM ubuntu:noble-20241118.1 +FROM ubuntu:noble-20250127 ADD https://packages.microsoft.com/config/ubuntu/24.04/packages-microsoft-prod.deb /packages-microsoft-prod.deb ADD https://builds.openlogic.com/downloadJDK/openlogic-openjdk/11.0.25+9/openlogic-openjdk-11.0.25+9-linux-x64.tar.gz /openlogic-openjdk-11.0.25+9-linux-x64.tar.gz diff --git a/scripts/azure-pipelines/android/create-docker-image.ps1 b/scripts/azure-pipelines/android/create-docker-image.ps1 deleted file mode 100644 index dcf83580a7ebfe..00000000000000 --- a/scripts/azure-pipelines/android/create-docker-image.ps1 +++ /dev/null @@ -1,32 +0,0 @@ -# Create Docker image for Android - -$Date = (Get-Date -Format 'yyyy-MM-dd') -$ResourceGroupName = "PrAnd-WUS" -$ContainerRegistryName = "vcpkgandroidwus" -$ErrorActionPreference = 'Stop' - -$registry = Get-AzContainerRegistry -ResourceGroupName $ResourceGroupName -Name $ContainerRegistryName -Connect-AzContainerRegistry -Name $registry.Name - -$imageName = "vcpkg-android" -Push-Location $PSScriptRoot -try { - docker builder prune -f --filter "until=24h" - - docker build . -t $imageName - - $remote = [string]::Format('{0}.azurecr.io/{1}:{2}', $ContainerRegistryName, $imageName, $Date) - docker tag $imageName $remote - - docker push $remote - - #removes from local environment - docker rmi --force $remote $imageName - - # pulls and runs ... - docker logout -} finally { - Pop-Location -} - -Write-Host "Remote: $remote" diff --git a/scripts/azure-pipelines/create-docker-images.ps1 b/scripts/azure-pipelines/create-docker-images.ps1 new file mode 100644 index 00000000000000..61faa6046f3c2e --- /dev/null +++ b/scripts/azure-pipelines/create-docker-images.ps1 @@ -0,0 +1,45 @@ +# Create Docker images for vcpkg + +function Build-Image { + param( + [string]$Location, + [string]$ImageName, + [string]$ContainerRegistryName, + [string]$Date + ) + + Push-Location $Location + try { + + docker build . -t $ImageName + + $remote = [string]::Format('{0}.azurecr.io/{1}:{2}', $ContainerRegistryName, $ImageName, $Date) + docker tag $ImageName $remote + + docker push $remote + + Write-Host "Remote: $remote" + } finally { + Pop-Location + } +} + +$Date = (Get-Date -Format 'yyyy-MM-dd') +$ResourceGroupName = "PrAnd-WUS" +$ContainerRegistryName = "vcpkgandroidwus" +$ErrorActionPreference = 'Stop' + +$registry = Get-AzContainerRegistry -ResourceGroupName $ResourceGroupName -Name $ContainerRegistryName +Connect-AzContainerRegistry -Name $registry.Name + +docker builder prune -f --filter "until=24h" +Build-Image -Location "$PSScriptRoot/android" ` + -ImageName "vcpkg-android" ` + -ContainerRegistryName $ContainerRegistryName ` + -Date $Date +Build-Image -Location "$PSScriptRoot/linux" ` + -ImageName "vcpkg-linux" ` + -ContainerRegistryName $ContainerRegistryName ` + -Date $Date + +docker logout diff --git a/scripts/azure-pipelines/linux/Dockerfile b/scripts/azure-pipelines/linux/Dockerfile new file mode 100644 index 00000000000000..0370c3cd059f5a --- /dev/null +++ b/scripts/azure-pipelines/linux/Dockerfile @@ -0,0 +1,7 @@ +# syntax=docker/dockerfile:1.4 +# DisableDockerDetector "Used to build the container deployed to Azure Container Registry" +FROM ubuntu:jammy-20250126 +ADD provision-image.sh /provision-image.sh +RUN apt-get update && \ + apt-get install --no-install-recommends -y curl gnupg ca-certificates +RUN chmod +x /provision-image.sh && /provision-image.sh diff --git a/scripts/azure-pipelines/linux/changing-linux-packages.md b/scripts/azure-pipelines/linux/changing-linux-packages.md deleted file mode 100644 index b0a3e9d90551e9..00000000000000 --- a/scripts/azure-pipelines/linux/changing-linux-packages.md +++ /dev/null @@ -1,5 +0,0 @@ -- [ ] Update `provision-image.sh` to add the new apt package. -- [ ] Update `managed-image.json` to add the new apt package to the very long line of packages. -- [ ] Create a new managed image CPP_GITHUB\PrLin-WUS\name it, choose the base image you want and copy the contents of managed-image.json into the Settings\Artifacts text box. -- [ ] Change the 1ES Hosted Pool for Linux to add that image to it. -- [ ] Change ImageOverride in $/scripts/azure-pipelines/linux/azure-pipelines.yml to the name you picked. diff --git a/scripts/azure-pipelines/linux/managed-image.json b/scripts/azure-pipelines/linux/managed-image.json deleted file mode 100644 index 5827b5fb3bfc2c..00000000000000 --- a/scripts/azure-pipelines/linux/managed-image.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "artifacts": [ - { - "name": "linux-ubuntu-nvidia-repo" - }, - { - "name": "linux-install-packages", - "parameters": { - "packages": "git curl zip unzip tar at libxt-dev gperf libxaw7-dev cifs-utils build-essential g++ gfortran libx11-dev libxkbcommon-x11-dev libxi-dev libgl1-mesa-dev libglu1-mesa-dev mesa-common-dev libxinerama-dev libxxf86vm-dev libxcursor-dev yasm libnuma1 libnuma-dev libtool-bin libltdl-dev flex bison libbison-dev autoconf libudev-dev libncurses5-dev libtool libxrandr-dev xutils-dev dh-autoreconf autoconf-archive libgles2-mesa-dev ruby-full pkg-config meson nasm cmake ninja-build libxext-dev libxfixes-dev libxrender-dev libxcb1-dev libx11-xcb-dev libxcb-dri3-dev libxcb-present-dev libxcb-glx0-dev libxcb-util0-dev libxkbcommon-dev libxcb-keysyms1-dev libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-xinput-dev libxcb-cursor-dev libkrb5-dev libxcb-res0-dev libxcb-keysyms1-dev libxcb-xkb-dev libxcb-record0-dev python3-setuptools python3-mako python3-pip python3-venv python3-jinja2 nodejs libwayland-dev python-is-python3 guile-2.2-dev libxdamage-dev libxtst-dev haskell-stack golang-go wayland-protocols libbluetooth-dev cuda-compiler-12-8 cuda-libraries-dev-12-8 cuda-driver-dev-12-8 cuda-cudart-dev-12-8 libcublas-12-8 libcurand-dev-12-8 cuda-nvml-dev-12-8 libcudnn9-dev-cuda-12 libnccl2 libnccl-dev libkrb5-3 zlib1g libicu70 debsums liblttng-ust1" - } - }, - { - "name": "linux-install-powershell" - }, - { - "name": "linux-azcli" - }, - { - "name": "linux-bash-command", - "parameters": { - "command": "apt-get update -y" - } - }, - { - "name": "linux-bash-command", - "parameters": { - "command": "apt-get upgrade -y" - } - } - ] -} \ No newline at end of file diff --git a/scripts/azure-pipelines/linux/provision-image.sh b/scripts/azure-pipelines/linux/provision-image.sh index 06454be80ab1e5..edd168688017ce 100755 --- a/scripts/azure-pipelines/linux/provision-image.sh +++ b/scripts/azure-pipelines/linux/provision-image.sh @@ -11,22 +11,22 @@ export DEBIAN_FRONTEND=noninteractive UBUNTU_VERSION_ID=$(. /etc/os-release && echo "$VERSION_ID") NVIDIA_REPO_VERSION=$(echo "$UBUNTU_VERSION_ID" | sed 's/\.//') +# Apt dependencies; needed for add-apt-repository and curl downloads to work +apt-get -y update +apt-get --no-install-recommends -y install ca-certificates curl apt-transport-https lsb-release gnupg software-properties-common + ## CUDA -wget "https://developer.download.nvidia.com/compute/cuda/repos/ubuntu${NVIDIA_REPO_VERSION}/x86_64/cuda-ubuntu${NVIDIA_REPO_VERSION}.pin" -mv "cuda-ubuntu${NVIDIA_REPO_VERSION}.pin" /etc/apt/preferences.d/cuda-repository-pin-600 +curl -L -o /etc/apt/preferences.d/cuda-repository-pin-600 "https://developer.download.nvidia.com/compute/cuda/repos/ubuntu${NVIDIA_REPO_VERSION}/x86_64/cuda-ubuntu${NVIDIA_REPO_VERSION}.pin" apt-key adv --fetch-keys "https://developer.download.nvidia.com/compute/cuda/repos/ubuntu${NVIDIA_REPO_VERSION}/x86_64/3bf863cc.pub" add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu${NVIDIA_REPO_VERSION}/x86_64/ /" ## PowerShell -wget -q https://packages.microsoft.com/config/ubuntu/${UBUNTU_VERSION_ID}/packages-microsoft-prod.deb +curl -L -o packages-microsoft-prod.deb https://packages.microsoft.com/config/ubuntu/${UBUNTU_VERSION_ID}/packages-microsoft-prod.deb 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 | @@ -38,7 +38,7 @@ echo "deb [arch=`dpkg --print-architecture` signed-by=/etc/apt/keyrings/microsof tee /etc/apt/sources.list.d/azure-cli.list apt-get -y update -apt-get -y dist-upgrade +apt-get -y upgrade # Add apt packages @@ -127,7 +127,6 @@ else APT_PACKAGES="$APT_PACKAGES libkrb5-3 zlib1g libicu70 debsums liblttng-ust1" fi -# Put --no-install-recommends back next month -apt-get -y install $APT_PACKAGES +apt-get --no-install-recommends -y install $APT_PACKAGES az --version From 4048f0cbc12f36dab132da25eecdc612a70cfae0 Mon Sep 17 00:00:00 2001 From: Billy Robert O'Neal III Date: Wed, 12 Mar 2025 19:24:07 -0700 Subject: [PATCH 03/20] Update VS --- 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 ea393414c3c618..19a4d2a53d3674 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/visualstudio/releases/2022/release-history -# 17.13.0 -$VisualStudioBootstrapperUrl = 'https://download.visualstudio.microsoft.com/download/pr/45212da0-ea11-4612-bbff-cf4b802a1640/64a98e70906ade95e6a565687d6e92b3b37ed37633a029224cb2bde7cc073071/vs_Enterprise.exe' +# 17.13.3 +$VisualStudioBootstrapperUrl = 'https://download.visualstudio.microsoft.com/download/pr/9b2a4ec4-2233-4550-bb74-4e7facba2e03/fb4c578235d7e5cb0b1731772624fdd6cdfbb5ea0b6daf77f5988e70dfaf5615/vs_Enterprise.exe' $Workloads = @( 'Microsoft.VisualStudio.Workload.NativeDesktop', 'Microsoft.VisualStudio.Workload.Universal', From 6a635617b87240c0623e1fc1fdab2cff155cf454 Mon Sep 17 00:00:00 2001 From: Billy Robert O'Neal III Date: Wed, 12 Mar 2025 22:47:56 -0700 Subject: [PATCH 04/20] Move docker .sh out of android since we use it on Linux too. --- ...ubuntu-provision.sh => example-ubuntu-provision-for-docker.sh} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename scripts/azure-pipelines/{android/example-ubuntu-provision.sh => example-ubuntu-provision-for-docker.sh} (100%) diff --git a/scripts/azure-pipelines/android/example-ubuntu-provision.sh b/scripts/azure-pipelines/example-ubuntu-provision-for-docker.sh similarity index 100% rename from scripts/azure-pipelines/android/example-ubuntu-provision.sh rename to scripts/azure-pipelines/example-ubuntu-provision-for-docker.sh From 23f65650a77a3d8d050ef3c1d2b9af3ed7c1ceee Mon Sep 17 00:00:00 2001 From: Billy Robert O'Neal III Date: Wed, 12 Mar 2025 22:50:49 -0700 Subject: [PATCH 05/20] Remove clean: resources steps for runs which use blank VMs every time anyway. --- scripts/azure-pipelines/android/azure-pipelines.yml | 2 -- scripts/azure-pipelines/linux/azure-pipelines.yml | 2 -- scripts/azure-pipelines/windows-unstable/azure-pipelines.yml | 2 -- scripts/azure-pipelines/windows/azure-pipelines.yml | 2 -- 4 files changed, 8 deletions(-) diff --git a/scripts/azure-pipelines/android/azure-pipelines.yml b/scripts/azure-pipelines/android/azure-pipelines.yml index 5ad9e9a49ca8c9..1d578ce0e28099 100644 --- a/scripts/azure-pipelines/android/azure-pipelines.yml +++ b/scripts/azure-pipelines/android/azure-pipelines.yml @@ -15,8 +15,6 @@ jobs: condition: and(succeeded(), contains('^${{ replace(parameters.jobName, '_', '-') }}$', '${{ parameters.tripletPattern }}')) pool: name: PrAnd-WUS - workspace: - clean: resources timeoutInMinutes: 1440 # 1 day cancelTimeoutInMinutes: 1 variables: diff --git a/scripts/azure-pipelines/linux/azure-pipelines.yml b/scripts/azure-pipelines/linux/azure-pipelines.yml index 41a20ac2646c3f..1ec02ef0c77c9c 100644 --- a/scripts/azure-pipelines/linux/azure-pipelines.yml +++ b/scripts/azure-pipelines/linux/azure-pipelines.yml @@ -20,8 +20,6 @@ jobs: condition: and(succeeded(), contains('^${{ replace(parameters.jobName, '_', '-') }}$', '${{ parameters.tripletPattern }}')) pool: name: PrLin-WUS - workspace: - clean: resources timeoutInMinutes: 1440 # 1 day variables: - name: WORKING_ROOT diff --git a/scripts/azure-pipelines/windows-unstable/azure-pipelines.yml b/scripts/azure-pipelines/windows-unstable/azure-pipelines.yml index a4b603778ecc4f..66b137d4eba046 100644 --- a/scripts/azure-pipelines/windows-unstable/azure-pipelines.yml +++ b/scripts/azure-pipelines/windows-unstable/azure-pipelines.yml @@ -7,8 +7,6 @@ jobs: pool: name: vcpkg-testing-msvc demands: ImageVersionOverride -equals 2025.02.14 - workspace: - clean: resources timeoutInMinutes: 2880 # 2 days variables: - name: WORKING_ROOT diff --git a/scripts/azure-pipelines/windows/azure-pipelines.yml b/scripts/azure-pipelines/windows/azure-pipelines.yml index 2b9d993286e4db..f000783f18a1da 100644 --- a/scripts/azure-pipelines/windows/azure-pipelines.yml +++ b/scripts/azure-pipelines/windows/azure-pipelines.yml @@ -21,8 +21,6 @@ jobs: pool: name: PrWin-WUS demands: ImageVersionOverride -equals 2025.02.14 - workspace: - clean: resources timeoutInMinutes: 2880 # 2 days variables: - name: WORKING_ROOT From ea9e5f557e5ddb925d6da5568763774f5214c3fd Mon Sep 17 00:00:00 2001 From: Billy Robert O'Neal III Date: Wed, 12 Mar 2025 22:51:00 -0700 Subject: [PATCH 06/20] Update Android docker image. --- scripts/azure-pipelines/android/azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/azure-pipelines/android/azure-pipelines.yml b/scripts/azure-pipelines/android/azure-pipelines.yml index 1d578ce0e28099..4fcd9762087de4 100644 --- a/scripts/azure-pipelines/android/azure-pipelines.yml +++ b/scripts/azure-pipelines/android/azure-pipelines.yml @@ -25,7 +25,7 @@ jobs: - name: ANDROID_NDK_HOME value: /android-ndk-r27c - name: ANDROID_DOCKER_IMAGE - value: 'vcpkgandroidwus.azurecr.io/vcpkg-android:2025-02-14' + value: 'vcpkgandroidwus.azurecr.io/vcpkg-android:2025-03-12' steps: # Note: /mnt is the Azure machines' temporary disk. - bash: | From cee532e58442aa8e945c623fc6c6f2d91fcfea4f Mon Sep 17 00:00:00 2001 From: Billy Robert O'Neal III Date: Wed, 12 Mar 2025 22:54:25 -0700 Subject: [PATCH 07/20] Upgrade Android build to Gen2 VM. --- scripts/azure-pipelines/android/azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/azure-pipelines/android/azure-pipelines.yml b/scripts/azure-pipelines/android/azure-pipelines.yml index 4fcd9762087de4..b2baf6eb1bdb00 100644 --- a/scripts/azure-pipelines/android/azure-pipelines.yml +++ b/scripts/azure-pipelines/android/azure-pipelines.yml @@ -14,7 +14,7 @@ jobs: - job: ${{ parameters.jobName }} condition: and(succeeded(), contains('^${{ replace(parameters.jobName, '_', '-') }}$', '${{ parameters.tripletPattern }}')) pool: - name: PrAnd-WUS + name: PrAnd-WUS-Gen2 timeoutInMinutes: 1440 # 1 day cancelTimeoutInMinutes: 1 variables: From 06274f5383c65419702dd028f5cce56106bce8a7 Mon Sep 17 00:00:00 2001 From: Billy Robert O'Neal III Date: Wed, 12 Mar 2025 23:07:14 -0700 Subject: [PATCH 08/20] Save a docker invocation by running boostrap in mariner. --- .../android/azure-pipelines.yml | 11 ++--- scripts/bootstrap.sh | 44 +++++++++++-------- 2 files changed, 29 insertions(+), 26 deletions(-) diff --git a/scripts/azure-pipelines/android/azure-pipelines.yml b/scripts/azure-pipelines/android/azure-pipelines.yml index b2baf6eb1bdb00..a8387fe3b5b569 100644 --- a/scripts/azure-pipelines/android/azure-pipelines.yml +++ b/scripts/azure-pipelines/android/azure-pipelines.yml @@ -44,18 +44,15 @@ jobs: scriptType: bash scriptLocation: 'inlineScript' # Be very very careful that the exit code from the last pwsh is reported correctly inlineScript: | - az acr login --name vcpkgandroidwus - docker pull ${{ variables.ANDROID_DOCKER_IMAGE }} - docker run --rm \ - --mount type=bind,source=$(Build.Repository.LocalPath),target=/vcpkg \ - ${{ variables.ANDROID_DOCKER_IMAGE }} \ - ./bootstrap-vcpkg.sh + ./bootstrap-vcpkg.sh -skipDependencyChecks end=`date -u -d "2 days" '+%Y-%m-%dT%H:%MZ'` assetSas=`az storage container generate-sas --name cache --account-name vcpkgassetcachewus --as-user --auth-mode login --https-only --permissions rcl --expiry $end -o tsv` binarySas=`az storage container generate-sas --name cache --account-name vcpkgbinarycachewus --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 \ + az acr login --name vcpkgandroidwus + docker pull ${{ variables.ANDROID_DOCKER_IMAGE }} + docker run --init -i --rm \ -a stderr \ -a stdout \ --user $USER \ diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh index 7c6a20e2759f63..4bc2b4cdc43208 100644 --- a/scripts/bootstrap.sh +++ b/scripts/bootstrap.sh @@ -10,6 +10,7 @@ done vcpkgDisableMetrics="OFF" vcpkgUseSystem=false vcpkgUseMuslC="OFF" +vcpkgSkipDependencyChecks="OFF" for var in "$@" do if [ "$var" = "-disableMetrics" -o "$var" = "--disableMetrics" ]; then @@ -20,15 +21,18 @@ do echo "Warning: -allowAppleClang no longer has any effect; ignored." elif [ "$var" = "-buildTests" ]; then echo "Warning: -buildTests no longer has any effect; ignored." + elif [ "$var" = "-skipDependencyChecks" ]; then + vcpkgSkipDependencyChecks="OFF" elif [ "$var" = "-musl" ]; then vcpkgUseMuslC="ON" elif [ "$var" = "-help" -o "$var" = "--help" ]; then echo "Usage: ./bootstrap-vcpkg.sh [options]" echo echo "Options:" - echo " -help Display usage help" - echo " -disableMetrics Mark this vcpkg root to disable metrics." - echo " -musl Use the musl binary rather than the glibc binary on Linux." + echo " -help Display usage help" + echo " -disableMetrics Mark this vcpkg root to disable metrics." + echo " -skipDependencyChecks Skip checks for vcpkg prerequisites. vcpkg may not run." + echo " -musl Use the musl binary rather than the glibc binary on Linux." exit 1 else echo "Unknown argument $var. Use '-help' for help." @@ -66,22 +70,24 @@ fi vcpkgCheckRepoTool() { __tool=$1 - if ! command -v "$__tool" >/dev/null 2>&1 ; then - echo "Could not find $__tool. Please install it (and other dependencies) with:" - echo "On Debian and Ubuntu derivatives:" - echo " sudo apt-get install curl zip unzip tar" - echo "On recent Red Hat and Fedora derivatives:" - echo " sudo dnf install curl zip unzip tar" - echo "On older Red Hat and Fedora derivatives:" - echo " sudo yum install curl zip unzip tar" - echo "On SUSE Linux and derivatives:" - echo " sudo zypper install curl zip unzip tar" - echo "On Arch Linux and derivatives:" - echo " sudo pacman -Syu base-devel git curl zip unzip tar cmake ninja" - echo "On Alpine:" - echo " apk add build-base cmake ninja zip unzip curl git" - echo " (and export VCPKG_FORCE_SYSTEM_BINARIES=1)" - exit 1 + if [ "$vcpkgSkipDependencyChecks" = "ON" ]; then + if ! command -v "$__tool" >/dev/null 2>&1 ; then + echo "Could not find $__tool. Please install it (and other dependencies) with:" + echo "On Debian and Ubuntu derivatives:" + echo " sudo apt-get install curl zip unzip tar" + echo "On recent Red Hat and Fedora derivatives:" + echo " sudo dnf install curl zip unzip tar" + echo "On older Red Hat and Fedora derivatives:" + echo " sudo yum install curl zip unzip tar" + echo "On SUSE Linux and derivatives:" + echo " sudo zypper install curl zip unzip tar" + echo "On Arch Linux and derivatives:" + echo " sudo pacman -Syu base-devel git curl zip unzip tar cmake ninja" + echo "On Alpine:" + echo " apk add build-base cmake ninja zip unzip curl git" + echo " (and export VCPKG_FORCE_SYSTEM_BINARIES=1)" + exit 1 + fi fi } From c9c34f5b6b8aae0843c49883145b9728e63372d9 Mon Sep 17 00:00:00 2001 From: Billy Robert O'Neal III Date: Wed, 12 Mar 2025 23:56:51 -0700 Subject: [PATCH 09/20] Update Windows image. --- 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 f000783f18a1da..b812b8ed392198 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-WUS - demands: ImageVersionOverride -equals 2025.02.14 + demands: ImageVersionOverride -equals 2025.03.12 timeoutInMinutes: 2880 # 2 days variables: - name: WORKING_ROOT From 79ec960e7d0036c219936830a6bf8d087628e0ac Mon Sep 17 00:00:00 2001 From: Billy Robert O'Neal III Date: Thu, 13 Mar 2025 00:25:46 -0700 Subject: [PATCH 10/20] Dockerize Linux runs in AzDO. --- .../android/azure-pipelines.yml | 28 +++++++- .../azure-pipelines/linux/azure-pipelines.yml | 65 ++++++++++++++----- 2 files changed, 74 insertions(+), 19 deletions(-) diff --git a/scripts/azure-pipelines/android/azure-pipelines.yml b/scripts/azure-pipelines/android/azure-pipelines.yml index a8387fe3b5b569..5efbed0514f835 100644 --- a/scripts/azure-pipelines/android/azure-pipelines.yml +++ b/scripts/azure-pipelines/android/azure-pipelines.yml @@ -3,6 +3,10 @@ # parameters: + - name: vcpkgToolSha + displayName: 'Custom SHA of vcpkg-tool to use rather than bootstrap' + type: string + default: 'use default' - name: jobName type: string - name: tripletPattern @@ -16,7 +20,6 @@ jobs: pool: name: PrAnd-WUS-Gen2 timeoutInMinutes: 1440 # 1 day - cancelTimeoutInMinutes: 1 variables: - name: WORKING_ROOT value: /mnt/vcpkg-ci @@ -26,6 +29,8 @@ jobs: value: /android-ndk-r27c - name: ANDROID_DOCKER_IMAGE value: 'vcpkgandroidwus.azurecr.io/vcpkg-android:2025-03-12' + - name: LINUX_DOCKER_IMAGE + value: 'vcpkgandroidwus.azurecr.io/vcpkg-linux:2025-03-12' steps: # Note: /mnt is the Azure machines' temporary disk. - bash: | @@ -37,6 +42,26 @@ jobs: sudo mkdir ${{ variables.VCPKG_DOWNLOADS }} -m=777 exit 0 displayName: 'Create working directories' + - bash: ./bootstrap-vcpkg.sh -skipDependencyChecks + displayName: 'Bootstrap vcpkg' + condition: eq('use default', '${{ parameters.vcpkgToolSha }}') + - task: AzureCLI@2 + displayName: 'Build vcpkg with CMake' + condition: ne('use default', '${{ parameters.vcpkgToolSha }}') + inputs: + azureSubscription: 'VcpkgPrFleet' + scriptType: 'pscore' + scriptLocation: 'inlineScript' + inlineScript: | + # This is a second pull but the vcpkgToolSha setting is used rarely. + az acr login --name vcpkgandroidwus + docker pull ${{ variables.LINUX_DOCKER_IMAGE }} + docker run --init -i --rm \ + -a stderr \ + -a stdout \ + --user $USER \ + --mount type=bind,source=$(Build.Repository.LocalPath),target=/vcpkg \ + /vcpkg/scripts/azure-pipelines/bootstrap-from-source.sh ${{ parameters.vcpkgToolSha }} - task: AzureCLI@2 displayName: '*** Test Modified Ports' inputs: @@ -44,7 +69,6 @@ jobs: scriptType: bash scriptLocation: 'inlineScript' # Be very very careful that the exit code from the last pwsh is reported correctly inlineScript: | - ./bootstrap-vcpkg.sh -skipDependencyChecks end=`date -u -d "2 days" '+%Y-%m-%dT%H:%MZ'` assetSas=`az storage container generate-sas --name cache --account-name vcpkgassetcachewus --as-user --auth-mode login --https-only --permissions rcl --expiry $end -o tsv` binarySas=`az storage container generate-sas --name cache --account-name vcpkgbinarycachewus --as-user --auth-mode login --https-only --permissions rclw --expiry $end -o tsv` diff --git a/scripts/azure-pipelines/linux/azure-pipelines.yml b/scripts/azure-pipelines/linux/azure-pipelines.yml index 1ec02ef0c77c9c..a1c59614ea8e69 100644 --- a/scripts/azure-pipelines/linux/azure-pipelines.yml +++ b/scripts/azure-pipelines/linux/azure-pipelines.yml @@ -16,51 +16,82 @@ parameters: default: '' jobs: -- job: x64_linux +- job: ${{ parameters.jobName }} condition: and(succeeded(), contains('^${{ replace(parameters.jobName, '_', '-') }}$', '${{ parameters.tripletPattern }}')) pool: - name: PrLin-WUS + name: PrAnd-WUS-Gen2 # The "android" pool name is something of a misnomer; the pool is named that way due to Android being our first dockerized platform timeoutInMinutes: 1440 # 1 day variables: - name: WORKING_ROOT value: /mnt/vcpkg-ci - name: VCPKG_DOWNLOADS value: /mnt/vcpkg-ci/downloads + - name: LINUX_DOCKER_IMAGE + value: 'vcpkgandroidwus.azurecr.io/vcpkg-linux:2025-03-12' steps: # Note: /mnt is the Azure machines' temporary disk. - bash: | sudo mkdir /home/agent -m=777 sudo chown `id -u` /home/agent sudo mkdir ${{ variables.WORKING_ROOT }} -m=777 + sudo rm -rf ${{ variables.WORKING_ROOT }}/failure-logs + sudo mkdir ${{ variables.WORKING_ROOT }}/failure-logs -m=777 sudo mkdir ${{ variables.VCPKG_DOWNLOADS }} -m=777 exit 0 displayName: 'Create working directories' - - bash: ./bootstrap-vcpkg.sh + - bash: ./bootstrap-vcpkg.sh -skipDependencyChecks displayName: 'Bootstrap vcpkg' condition: eq('use default', '${{ parameters.vcpkgToolSha }}') - - bash: ./scripts/azure-pipelines/bootstrap-from-source.sh ${{ parameters.vcpkgToolSha }} - displayName: "Build vcpkg with CMake" - condition: ne('use default', '${{ parameters.vcpkgToolSha }}') - task: AzureCLI@2 - displayName: '*** Test Modified Ports' + displayName: 'Build vcpkg with CMake' + condition: ne('use default', '${{ parameters.vcpkgToolSha }}') inputs: azureSubscription: 'VcpkgPrFleet' scriptType: 'pscore' 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 vcpkgassetcachewus --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 vcpkgbinarycachewus --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://vcpkgassetcachewus.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://vcpkgbinarycachewus.blob.core.windows.net/cache,$binarySas" -WorkingRoot $env:WORKING_ROOT -ArtifactStagingDirectory $(Build.ArtifactStagingDirectory) + # This is a second pull but the vcpkgToolSha setting is used rarely. + az acr login --name vcpkgandroidwus + docker pull ${{ variables.LINUX_DOCKER_IMAGE }} + docker run --init -i --rm \ + -a stderr \ + -a stdout \ + --user $USER \ + --mount type=bind,source=$(Build.Repository.LocalPath),target=/vcpkg \ + /vcpkg/scripts/azure-pipelines/bootstrap-from-source.sh ${{ parameters.vcpkgToolSha }} + - task: AzureCLI@2 + displayName: '*** Test Modified Ports' + inputs: + azureSubscription: 'VcpkgPrFleet' + scriptType: bash + scriptLocation: 'inlineScript' # Be very very careful that the exit code from the last pwsh is reported correctly + inlineScript: | + end=`date -u -d "2 days" '+%Y-%m-%dT%H:%MZ'` + assetSas=`az storage container generate-sas --name cache --account-name vcpkgassetcachewus --as-user --auth-mode login --https-only --permissions rcl --expiry $end -o tsv` + binarySas=`az storage container generate-sas --name cache --account-name vcpkgbinarycachewus --as-user --auth-mode login --https-only --permissions rclw --expiry $end -o tsv` + echo Minting SAS tokens valid through $end + USER=$(id --user) + az acr login --name vcpkgandroidwus + docker pull ${{ variables.LINUX_DOCKER_IMAGE }} + docker run --init -i --rm \ + -a stderr \ + -a stdout \ + --user $USER \ + --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-azurl,https://vcpkgassetcachewus.blob.core.windows.net/cache,$assetSas,readwrite" \ + ${{ variables.LINUX_DOCKER_IMAGE }} \ + pwsh \ + -File /vcpkg/scripts/azure-pipelines/test-modified-ports.ps1 \ + -Triplet ${{ replace(parameters.jobName, '_', '-') }} \ + -BuildReason $(Build.Reason) \ + -BinarySourceStub "x-azblob,https://vcpkgbinarycachewus.blob.core.windows.net/cache,$binarySas" \ + -WorkingRoot ${{ variables.WORKING_ROOT }} - task: PublishPipelineArtifact@1 displayName: "Publish Artifact: failure logs for ${{ replace(parameters.jobName, '_', '-') }}" inputs: - targetPath: '$(Build.ArtifactStagingDirectory)/failure-logs' + targetPath: '$(WORKING_ROOT)/failure-logs' artifact: "failure logs for ${{ replace(parameters.jobName, '_', '-') }}" condition: ne(variables['FAILURE_LOGS_EMPTY'], 'True') - bash: | From 1a27801eee569b27d68569a43466f0df01518ef9 Mon Sep 17 00:00:00 2001 From: Billy Robert O'Neal III Date: Thu, 13 Mar 2025 00:36:07 -0700 Subject: [PATCH 11/20] Wire up tool SHA for Android. --- scripts/azure-pipelines/azure-pipelines.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/azure-pipelines/azure-pipelines.yml b/scripts/azure-pipelines/azure-pipelines.yml index ae3b3cb4dae3ca..fe6de219e79258 100644 --- a/scripts/azure-pipelines/azure-pipelines.yml +++ b/scripts/azure-pipelines/azure-pipelines.yml @@ -89,14 +89,17 @@ jobs: - template: android/azure-pipelines.yml parameters: jobName: arm_neon_android + vcpkgToolSha: ${{ parameters.vcpkgToolSha }} tripletPattern: ${{ parameters.tripletPattern }} - template: android/azure-pipelines.yml parameters: jobName: x64_android + vcpkgToolSha: ${{ parameters.vcpkgToolSha }} tripletPattern: ${{ parameters.tripletPattern }} - template: android/azure-pipelines.yml parameters: jobName: arm64_android + vcpkgToolSha: ${{ parameters.vcpkgToolSha }} tripletPattern: ${{ parameters.tripletPattern }} From 582b00a13f05f16b54b9e8a08f96918b91fc259a Mon Sep 17 00:00:00 2001 From: Billy Robert O'Neal III Date: Thu, 13 Mar 2025 10:54:26 -0700 Subject: [PATCH 12/20] Give up on the 'gen2' thing. I guess 1ES just really hates that --- scripts/azure-pipelines/android/azure-pipelines.yml | 2 +- scripts/azure-pipelines/linux/azure-pipelines.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/azure-pipelines/android/azure-pipelines.yml b/scripts/azure-pipelines/android/azure-pipelines.yml index 5efbed0514f835..0dd39b65539006 100644 --- a/scripts/azure-pipelines/android/azure-pipelines.yml +++ b/scripts/azure-pipelines/android/azure-pipelines.yml @@ -18,7 +18,7 @@ jobs: - job: ${{ parameters.jobName }} condition: and(succeeded(), contains('^${{ replace(parameters.jobName, '_', '-') }}$', '${{ parameters.tripletPattern }}')) pool: - name: PrAnd-WUS-Gen2 + name: PrAnd-WUS timeoutInMinutes: 1440 # 1 day variables: - name: WORKING_ROOT diff --git a/scripts/azure-pipelines/linux/azure-pipelines.yml b/scripts/azure-pipelines/linux/azure-pipelines.yml index a1c59614ea8e69..1d22f1307c3ff5 100644 --- a/scripts/azure-pipelines/linux/azure-pipelines.yml +++ b/scripts/azure-pipelines/linux/azure-pipelines.yml @@ -19,7 +19,7 @@ jobs: - job: ${{ parameters.jobName }} condition: and(succeeded(), contains('^${{ replace(parameters.jobName, '_', '-') }}$', '${{ parameters.tripletPattern }}')) pool: - name: PrAnd-WUS-Gen2 # The "android" pool name is something of a misnomer; the pool is named that way due to Android being our first dockerized platform + name: PrAnd-WUS # The "android" pool name is something of a misnomer; the pool is named that way due to Android being our first dockerized platform timeoutInMinutes: 1440 # 1 day variables: - name: WORKING_ROOT From 0a75939a1335fe7938260d7dee4a417a14062a48 Mon Sep 17 00:00:00 2001 From: Billy Robert O'Neal III Date: Thu, 13 Mar 2025 12:11:08 -0700 Subject: [PATCH 13/20] Try moving docker stuff to the temp disk --- scripts/azure-pipelines/linux/azure-pipelines.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/azure-pipelines/linux/azure-pipelines.yml b/scripts/azure-pipelines/linux/azure-pipelines.yml index 1d22f1307c3ff5..9853070dd14d02 100644 --- a/scripts/azure-pipelines/linux/azure-pipelines.yml +++ b/scripts/azure-pipelines/linux/azure-pipelines.yml @@ -37,6 +37,10 @@ jobs: sudo rm -rf ${{ variables.WORKING_ROOT }}/failure-logs sudo mkdir ${{ variables.WORKING_ROOT }}/failure-logs -m=777 sudo mkdir ${{ variables.VCPKG_DOWNLOADS }} -m=777 + # Move the docker layers to the temp disk. + sudo mkdir -p /etc/docker + echo '{"data-root": "/mnt/docker"}' | sudo tee /etc/docker/daemon.json + sudo systemctl restart docker exit 0 displayName: 'Create working directories' - bash: ./bootstrap-vcpkg.sh -skipDependencyChecks From 869d75ae861b8e566449546e00bc64e98053ccd7 Mon Sep 17 00:00:00 2001 From: Billy Robert O'Neal III Date: Thu, 13 Mar 2025 13:35:53 -0700 Subject: [PATCH 14/20] Fix building vcpkg-tool from source. --- scripts/azure-pipelines/android/azure-pipelines.yml | 12 ++++++++++-- scripts/azure-pipelines/linux/azure-pipelines.yml | 8 ++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/scripts/azure-pipelines/android/azure-pipelines.yml b/scripts/azure-pipelines/android/azure-pipelines.yml index 0dd39b65539006..401d41c9203677 100644 --- a/scripts/azure-pipelines/android/azure-pipelines.yml +++ b/scripts/azure-pipelines/android/azure-pipelines.yml @@ -40,6 +40,10 @@ jobs: sudo rm -rf ${{ variables.WORKING_ROOT }}/failure-logs sudo mkdir ${{ variables.WORKING_ROOT }}/failure-logs -m=777 sudo mkdir ${{ variables.VCPKG_DOWNLOADS }} -m=777 + # Move the docker layers to the temp disk. + sudo mkdir -p /etc/docker + echo '{"data-root": "/mnt/docker"}' | sudo tee /etc/docker/daemon.json + sudo systemctl restart docker exit 0 displayName: 'Create working directories' - bash: ./bootstrap-vcpkg.sh -skipDependencyChecks @@ -50,10 +54,11 @@ jobs: condition: ne('use default', '${{ parameters.vcpkgToolSha }}') inputs: azureSubscription: 'VcpkgPrFleet' - scriptType: 'pscore' + scriptType: bash scriptLocation: 'inlineScript' inlineScript: | # This is a second pull but the vcpkgToolSha setting is used rarely. + USER=$(id --user) az acr login --name vcpkgandroidwus docker pull ${{ variables.LINUX_DOCKER_IMAGE }} docker run --init -i --rm \ @@ -61,6 +66,8 @@ jobs: -a stdout \ --user $USER \ --mount type=bind,source=$(Build.Repository.LocalPath),target=/vcpkg \ + --workdir /vcpkg \ + ${{ variables.LINUX_DOCKER_IMAGE }} \ /vcpkg/scripts/azure-pipelines/bootstrap-from-source.sh ${{ parameters.vcpkgToolSha }} - task: AzureCLI@2 displayName: '*** Test Modified Ports' @@ -85,9 +92,10 @@ jobs: --mount type=bind,source=/mnt/vcpkg-ci,target=/mnt/vcpkg-ci \ --env X_VCPKG_ASSET_SOURCES="x-azurl,https://vcpkgassetcachewus.blob.core.windows.net/cache,$assetSas,readwrite" \ --env ANDROID_NDK_HOME="${{ variables.ANDROID_NDK_HOME }}" \ + --workdir /vcpkg \ ${{ variables.ANDROID_DOCKER_IMAGE }} \ pwsh \ - -File /vcpkg/scripts/azure-pipelines/test-modified-ports.ps1 \ + -File scripts/azure-pipelines/test-modified-ports.ps1 \ -Triplet ${{ replace(parameters.jobName, '_', '-') }} \ -BuildReason $(Build.Reason) \ -BinarySourceStub "x-azblob,https://vcpkgbinarycachewus.blob.core.windows.net/cache,$binarySas" \ diff --git a/scripts/azure-pipelines/linux/azure-pipelines.yml b/scripts/azure-pipelines/linux/azure-pipelines.yml index 9853070dd14d02..b4cd89b7a9069d 100644 --- a/scripts/azure-pipelines/linux/azure-pipelines.yml +++ b/scripts/azure-pipelines/linux/azure-pipelines.yml @@ -51,10 +51,11 @@ jobs: condition: ne('use default', '${{ parameters.vcpkgToolSha }}') inputs: azureSubscription: 'VcpkgPrFleet' - scriptType: 'pscore' + scriptType: bash scriptLocation: 'inlineScript' inlineScript: | # This is a second pull but the vcpkgToolSha setting is used rarely. + USER=$(id --user) az acr login --name vcpkgandroidwus docker pull ${{ variables.LINUX_DOCKER_IMAGE }} docker run --init -i --rm \ @@ -62,6 +63,8 @@ jobs: -a stdout \ --user $USER \ --mount type=bind,source=$(Build.Repository.LocalPath),target=/vcpkg \ + --workdir /vcpkg \ + ${{ variables.LINUX_DOCKER_IMAGE }} \ /vcpkg/scripts/azure-pipelines/bootstrap-from-source.sh ${{ parameters.vcpkgToolSha }} - task: AzureCLI@2 displayName: '*** Test Modified Ports' @@ -85,9 +88,10 @@ jobs: --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-azurl,https://vcpkgassetcachewus.blob.core.windows.net/cache,$assetSas,readwrite" \ + --workdir /vcpkg \ ${{ variables.LINUX_DOCKER_IMAGE }} \ pwsh \ - -File /vcpkg/scripts/azure-pipelines/test-modified-ports.ps1 \ + -File scripts/azure-pipelines/test-modified-ports.ps1 \ -Triplet ${{ replace(parameters.jobName, '_', '-') }} \ -BuildReason $(Build.Reason) \ -BinarySourceStub "x-azblob,https://vcpkgbinarycachewus.blob.core.windows.net/cache,$binarySas" \ From 00b2169d377e6fe3427213c6f87e5678ec03be32 Mon Sep 17 00:00:00 2001 From: Billy Robert O'Neal III Date: Fri, 14 Mar 2025 12:28:29 -0700 Subject: [PATCH 15/20] Fix mnn when downloads and packages are on different volumes. ``` CMake Error at ports/mnn/portfile.cmake:88 (file): file RENAME failed to rename /vcpkg/downloads/98f6b79b778f7b0a1541.txt to /mnt/vcpkg-ci/p/mnn_x64-linux/share/mnn/copyright because: Invalid cross-device link ``` --- ports/mnn/portfile.cmake | 2 +- ports/mnn/vcpkg.json | 2 +- versions/baseline.json | 2 +- versions/m-/mnn.json | 5 +++++ 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ports/mnn/portfile.cmake b/ports/mnn/portfile.cmake index 70d5162d45850a..c1d820c4a202f7 100644 --- a/ports/mnn/portfile.cmake +++ b/ports/mnn/portfile.cmake @@ -85,7 +85,7 @@ vcpkg_download_distfile(COPYRIGHT_PATH ) file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/share/${PORT}") -file(RENAME "${COPYRIGHT_PATH}" "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright") +file(COPY "${COPYRIGHT_PATH}" "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright") if(VCPKG_TARGET_IS_OSX OR VCPKG_TARGET_IS_IOS) if("metal" IN_LIST FEATURES) diff --git a/ports/mnn/vcpkg.json b/ports/mnn/vcpkg.json index fc696495d8b257..e2e528f5b61757 100644 --- a/ports/mnn/vcpkg.json +++ b/ports/mnn/vcpkg.json @@ -1,7 +1,7 @@ { "name": "mnn", "version": "1.1.0", - "port-version": 6, + "port-version": 7, "description": "MNN is a blazing fast, lightweight deep learning framework, battle-tested by business-critical use cases in Alibaba", "homepage": "https://www.mnn.zone/", "license": "Apache-2.0", diff --git a/versions/baseline.json b/versions/baseline.json index da7262cccf30b3..aef8955d4b4737 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -6102,7 +6102,7 @@ }, "mnn": { "baseline": "1.1.0", - "port-version": 6 + "port-version": 7 }, "modern-cpp-kafka": { "baseline": "2024.07.03", diff --git a/versions/m-/mnn.json b/versions/m-/mnn.json index 21729a94cb3b5b..ceaae80b5a8f15 100644 --- a/versions/m-/mnn.json +++ b/versions/m-/mnn.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "0398617dcec24ef4d4593b064ea4ff2c7a1e5a8a", + "version": "1.1.0", + "port-version": 7 + }, { "git-tree": "af18b8b69d85424bc490584793f69b7abb368947", "version": "1.1.0", From 6a5c2db3c03c2977435d02d5881543b486bd49e5 Mon Sep 17 00:00:00 2001 From: Billy Robert O'Neal III Date: Fri, 14 Mar 2025 13:00:18 -0700 Subject: [PATCH 16/20] [robotraconteur] Add missing zlib dependency ``` FAILED: out_debug/bin/RobotRaconteurGen : && /usr/bin/c++ -fPIC -g RobotRaconteurGen/CMakeFiles/RobotRaconteurGen.dir/CPPServiceLangGen.cpp.o RobotRaconteurGen/CMakeFiles/RobotRaconteurGen.dir/CSharpServiceLangGen.cpp.o RobotRaconteurGen/CMakeFiles/RobotRaconteurGen.dir/JavaServiceLangGen.cpp.o RobotRaconteurGen/CMakeFiles/RobotRaconteurGen.dir/RobotRaconteurGen.cpp.o RobotRaconteurGen/CMakeFiles/RobotRaconteurGen.dir/StringTableGen.cpp.o -o out_debug/bin/RobotRaconteurGen out_debug/lib/libRobotRaconteurCore.a /mnt/vcpkg-ci/installed/x64-linux/debug/lib/libboost_filesystem.a /mnt/vcpkg-ci/installed/x64-linux/debug/lib/libboost_thread.a /mnt/vcpkg-ci/installed/x64-linux/debug/lib/libboost_date_time.a /mnt/vcpkg-ci/installed/x64-linux/debug/lib/libboost_chrono.a /mnt/vcpkg-ci/installed/x64-linux/debug/lib/libboost_atomic.a /mnt/vcpkg-ci/installed/x64-linux/debug/lib/libboost_random.a /mnt/vcpkg-ci/installed/x64-linux/debug/lib/libboost_system.a /mnt/vcpkg-ci/installed/x64-linux/debug/lib/libboost_program_options.a /mnt/vcpkg-ci/installed/x64-linux/debug/lib/libboost_container.a /mnt/vcpkg-ci/installed/x64-linux/debug/lib/libssl.a /mnt/vcpkg-ci/installed/x64-linux/debug/lib/libcrypto.a -lpthread -lrt -lz -ldl && : /usr/bin/ld: cannot find -lz: No such file or directory ``` --- ports/robotraconteur/vcpkg.json | 5 +++-- versions/baseline.json | 2 +- versions/r-/robotraconteur.json | 5 +++++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ports/robotraconteur/vcpkg.json b/ports/robotraconteur/vcpkg.json index b3eb9ce150d692..172e1df88dda4b 100644 --- a/ports/robotraconteur/vcpkg.json +++ b/ports/robotraconteur/vcpkg.json @@ -1,7 +1,7 @@ { "name": "robotraconteur", "version-semver": "1.2.4", - "port-version": 1, + "port-version": 2, "description": "The Robot Raconteur communication framework core library", "homepage": "https://www.robotraconteur.com", "license": "Apache-2.0", @@ -55,6 +55,7 @@ { "name": "vcpkg-cmake-config", "host": true - } + }, + "zlib" ] } diff --git a/versions/baseline.json b/versions/baseline.json index aef8955d4b4737..dc04f999c7937b 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -8134,7 +8134,7 @@ }, "robotraconteur": { "baseline": "1.2.4", - "port-version": 1 + "port-version": 2 }, "robotraconteur-companion": { "baseline": "0.4.1", diff --git a/versions/r-/robotraconteur.json b/versions/r-/robotraconteur.json index 54a4913ee60669..72ed038f334c6a 100644 --- a/versions/r-/robotraconteur.json +++ b/versions/r-/robotraconteur.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "e1dd1758c6550fe98e9c57ae648af20d6bc5c6a8", + "version-semver": "1.2.4", + "port-version": 2 + }, { "git-tree": "9deb076d5ee5103a9bbbf0066ce09e0a1db14303", "version-semver": "1.2.4", From 4c18b31bb9b55eb0d8e2ce77f7b47aa8d5170d7d Mon Sep 17 00:00:00 2001 From: Billy Robert O'Neal III Date: Fri, 14 Mar 2025 12:55:01 -0700 Subject: [PATCH 17/20] Turn off tensorflow. 3 years out of date and fails in Docker # Conflicts: # scripts/ci.baseline.txt --- scripts/ci.baseline.txt | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt index fda79551d09af8..c70e7eacdc6bb3 100644 --- a/scripts/ci.baseline.txt +++ b/scripts/ci.baseline.txt @@ -1102,16 +1102,16 @@ systemc:x64-uwp=fail teemo:x64-android=fail # tensorflow does not support VS2022 -tensorflow:x64-android=fail -tensorflow:x64-windows-release=fail -tensorflow:x64-windows-static-md=fail -tensorflow:x64-windows-static=fail -tensorflow:x64-windows=fail -tensorflow-cc:x64-android=fail -tensorflow-cc:x64-windows-release=fail -tensorflow-cc:x64-windows-static-md=fail -tensorflow-cc:x64-windows-static=fail -tensorflow-cc:x64-windows=fail +tensorflow:x64-android=skip +tensorflow:x64-windows-release=skip +tensorflow:x64-windows-static-md=skip +tensorflow:x64-windows-static=skip +tensorflow:x64-windows=skip +tensorflow-cc:x64-android=skip +tensorflow-cc:x64-windows-release=skip +tensorflow-cc:x64-windows-static-md=skip +tensorflow-cc:x64-windows-static=skip +tensorflow-cc:x64-windows=skip # tensorflow is broken with system libraries on macOS 13.5 # Also skipping because our macOS machines are relatively underpowered and this saves 8 hours of CI # time for a relatively unpopular library / system combo. @@ -1119,6 +1119,10 @@ tensorflow:arm64-osx=skip tensorflow:x64-osx=skip tensorflow-cc:arm64-osx=skip tensorflow-cc:x64-osx=skip +# Building tensorflow inside docker fails with +# FATAL: $USER is not set, and unable to look up name of current user: (error: 0): Success +tensorflow:x64-linux=skip +tensorflow-cc:x64-linux=skip thorvg:arm-neon-android=fail tinycthread:arm-neon-android=fail From 5537d8494fe70498c5411bec6c59cc0fc4a37b65 Mon Sep 17 00:00:00 2001 From: Billy Robert O'Neal III Date: Fri, 14 Mar 2025 13:02:18 -0700 Subject: [PATCH 18/20] Passing, remove from fail lists. --- scripts/ci.baseline.txt | 4 ---- 1 file changed, 4 deletions(-) diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt index c70e7eacdc6bb3..23bd728bcfa180 100644 --- a/scripts/ci.baseline.txt +++ b/scripts/ci.baseline.txt @@ -259,7 +259,6 @@ cppcoro:x64-android=fail cppcoro:x64-linux=fail cppcoro:x64-osx=fail cppslippi:x64-linux=fail -cpputest:arm-neon-android=fail crashpad:x64-linux=fail #Compilation failed due to the lack of Clang++ compiler. cserialport:arm-neon-android=fail cserialport:arm64-android=fail @@ -746,9 +745,6 @@ ms-gdkx:x64-windows-release=fail ms-gdkx:x64-windows-static-md=fail ms-gdkx:x64-windows-static=fail ms-gdkx:x64-windows=fail -ms-gltf:arm-neon-android=fail -ms-gltf:arm64-android=fail -ms-gltf:x64-android=fail # Conflicts with libjpeg-turbo mozjpeg:arm-neon-android=fail mozjpeg:arm64-android=fail From c137f84559a513209edf6c153775a33ee34363e3 Mon Sep 17 00:00:00 2001 From: Billy Robert O'Neal III Date: Fri, 14 Mar 2025 22:27:49 -0700 Subject: [PATCH 19/20] fix copy typo --- ports/mnn/portfile.cmake | 2 +- versions/m-/mnn.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/mnn/portfile.cmake b/ports/mnn/portfile.cmake index c1d820c4a202f7..816a7f8fb50241 100644 --- a/ports/mnn/portfile.cmake +++ b/ports/mnn/portfile.cmake @@ -85,7 +85,7 @@ vcpkg_download_distfile(COPYRIGHT_PATH ) file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/share/${PORT}") -file(COPY "${COPYRIGHT_PATH}" "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright") +file(INSTALL "${COPYRIGHT_PATH}" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) if(VCPKG_TARGET_IS_OSX OR VCPKG_TARGET_IS_IOS) if("metal" IN_LIST FEATURES) diff --git a/versions/m-/mnn.json b/versions/m-/mnn.json index ceaae80b5a8f15..7342dbf80a49c8 100644 --- a/versions/m-/mnn.json +++ b/versions/m-/mnn.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "0398617dcec24ef4d4593b064ea4ff2c7a1e5a8a", + "git-tree": "901d7e31690c889f88a978a7322919fbe237618d", "version": "1.1.0", "port-version": 7 }, From 90aa71196adf52091524ce94ef09632079e7163b Mon Sep 17 00:00:00 2001 From: Billy Robert O'Neal III Date: Mon, 17 Mar 2025 12:16:26 -0700 Subject: [PATCH 20/20] [robotraconteur] Remove spurious pthread rt z dl from OpenSSL dependencies that the OpenSSL targets should be handling themselves that lead to compiler errors like: ``` /usr/bin/ld: cannot find -lz: No such file or directory ``` --- ports/robotraconteur/portfile.cmake | 29 ++++++++++--------- .../remove-openssl-dependencies.patch | 19 ++++++++++++ ports/robotraconteur/vcpkg.json | 3 +- versions/r-/robotraconteur.json | 2 +- 4 files changed, 36 insertions(+), 17 deletions(-) create mode 100644 ports/robotraconteur/remove-openssl-dependencies.patch diff --git a/ports/robotraconteur/portfile.cmake b/ports/robotraconteur/portfile.cmake index 4f9b645b83e6e0..0026d6896865de 100644 --- a/ports/robotraconteur/portfile.cmake +++ b/ports/robotraconteur/portfile.cmake @@ -1,23 +1,24 @@ -if(VCPKG_TARGET_IS_LINUX) - MESSAGE(WARNING "${PORT} requires libbluetooth-dev from the system package manager.\nTry: 'sudo yum install libbluetooth-dev ' (or sudo apt-get install libbluetooth-dev)") +if(VCPKG_TARGET_IS_LINUX) + MESSAGE(WARNING "${PORT} requires libbluetooth-dev from the system package manager.\nTry: 'sudo yum install libbluetooth-dev ' (or sudo apt-get install libbluetooth-dev)") endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH - REPO robotraconteur/robotraconteur - REF "v${VERSION}" - SHA512 d73621ff888ae8cfc9d6ac5a71b75920552948fb15ffe2fa13fb31a238fc92f6a271ea1653eed855ba04f371686dff6fdf46285f24a471a3147d7744563b4d0b - HEAD_REF master - PATCHES - rr_boost_1_87_patch.diff + REPO robotraconteur/robotraconteur + REF "v${VERSION}" + SHA512 d73621ff888ae8cfc9d6ac5a71b75920552948fb15ffe2fa13fb31a238fc92f6a271ea1653eed855ba04f371686dff6fdf46285f24a471a3147d7744563b4d0b + HEAD_REF master + PATCHES + rr_boost_1_87_patch.diff + remove-openssl-dependencies.patch ) vcpkg_cmake_configure( SOURCE_PATH ${SOURCE_PATH} - OPTIONS - -DBUILD_GEN=ON - -DBUILD_TESTING=OFF - -DCMAKE_CXX_STANDARD=11 + OPTIONS + -DBUILD_GEN=ON + -DBUILD_TESTING=OFF + -DCMAKE_CXX_STANDARD=11 ) vcpkg_cmake_install() @@ -27,8 +28,8 @@ vcpkg_copy_tools(TOOL_NAMES RobotRaconteurGen AUTO_CLEAN) vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/robotraconteur) vcpkg_cmake_config_fixup( - PACKAGE_NAME RobotRaconteur - CONFIG_PATH "lib/cmake/RobotRaconteur" + PACKAGE_NAME RobotRaconteur + CONFIG_PATH "lib/cmake/RobotRaconteur" ) vcpkg_copy_pdbs() diff --git a/ports/robotraconteur/remove-openssl-dependencies.patch b/ports/robotraconteur/remove-openssl-dependencies.patch new file mode 100644 index 00000000000000..93f89c5fe2e7d5 --- /dev/null +++ b/ports/robotraconteur/remove-openssl-dependencies.patch @@ -0,0 +1,19 @@ +diff --git a/RobotRaconteurCore/CMakeLists.txt b/RobotRaconteurCore/CMakeLists.txt +index fbef9b4..85054f5 100644 +--- a/RobotRaconteurCore/CMakeLists.txt ++++ b/RobotRaconteurCore/CMakeLists.txt +@@ -336,12 +336,12 @@ if(UNIX AND NOT APPLE AND NOT ANDROID) + + target_include_directories(RobotRaconteurCore PRIVATE ${DBUS_INCLUDE_DIR} ${DBUS_INCLUDE_ARCH_DIR} + ${LIBUSB_INCLUDE_DIR}) +- target_link_libraries(RobotRaconteurCore PRIVATE OpenSSL::SSL OpenSSL::Crypto pthread rt z dl) ++ target_link_libraries(RobotRaconteurCore PRIVATE OpenSSL::SSL OpenSSL::Crypto) + target_compile_definitions(RobotRaconteurCore PRIVATE ROBOTRACONTEUR_USE_OPENSSL) + else() + target_include_directories(RobotRaconteurCore PRIVATE ${DBUS_INCLUDE_DIR} ${DBUS_INCLUDE_ARCH_DIR} + ${LIBUSB_INCLUDE_DIR}) +- target_link_libraries(RobotRaconteurCore PUBLIC OpenSSL::SSL OpenSSL::Crypto pthread rt z dl) ++ target_link_libraries(RobotRaconteurCore PUBLIC OpenSSL::SSL OpenSSL::Crypto) + target_compile_definitions(RobotRaconteurCore PUBLIC ROBOTRACONTEUR_USE_OPENSSL) + endif() + diff --git a/ports/robotraconteur/vcpkg.json b/ports/robotraconteur/vcpkg.json index 172e1df88dda4b..0be2100ce027ed 100644 --- a/ports/robotraconteur/vcpkg.json +++ b/ports/robotraconteur/vcpkg.json @@ -55,7 +55,6 @@ { "name": "vcpkg-cmake-config", "host": true - }, - "zlib" + } ] } diff --git a/versions/r-/robotraconteur.json b/versions/r-/robotraconteur.json index 72ed038f334c6a..322db7aa84b32b 100644 --- a/versions/r-/robotraconteur.json +++ b/versions/r-/robotraconteur.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "e1dd1758c6550fe98e9c57ae648af20d6bc5c6a8", + "git-tree": "d769c90ee7605abee43e4ecfe4a933e12f90c740", "version-semver": "1.2.4", "port-version": 2 },