Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ports/mnn/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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(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)
Expand Down
2 changes: 1 addition & 1 deletion ports/mnn/vcpkg.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
29 changes: 15 additions & 14 deletions ports/robotraconteur/portfile.cmake
Original file line number Diff line number Diff line change
@@ -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()
Expand All @@ -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()
Expand Down
19 changes: 19 additions & 0 deletions ports/robotraconteur/remove-openssl-dependencies.patch
Original file line number Diff line number Diff line change
@@ -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()

2 changes: 1 addition & 1 deletion ports/robotraconteur/vcpkg.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion scripts/azure-pipelines/android/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
51 changes: 39 additions & 12 deletions scripts/azure-pipelines/android/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -15,10 +19,7 @@ jobs:
condition: and(succeeded(), contains('^${{ replace(parameters.jobName, '_', '-') }}$', '${{ parameters.tripletPattern }}'))
pool:
name: PrAnd-WUS
workspace:
clean: resources
timeoutInMinutes: 1440 # 1 day
cancelTimeoutInMinutes: 1
variables:
- name: WORKING_ROOT
value: /mnt/vcpkg-ci
Expand All @@ -27,7 +28,9 @@ 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'
- name: LINUX_DOCKER_IMAGE
value: 'vcpkgandroidwus.azurecr.io/vcpkg-linux:2025-03-12'
steps:
# Note: /mnt is the Azure machines' temporary disk.
- bash: |
Expand All @@ -37,27 +40,50 @@ 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
Comment on lines +44 to +46
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Next time we 'roll' the docker host images I will merge this into those

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Submitted changes to make 1ES capable of handling this for us: https://devdiv.visualstudio.com/XlabImageFactory/_git/XlabImageFactory/pullrequest/620203

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'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A nice side effect of having a "builds for Linux" container available is we can fix this missing feature with it.

condition: ne('use default', '${{ parameters.vcpkgToolSha }}')
inputs:
azureSubscription: 'VcpkgPrFleet'
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 \
-a stderr \
-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'
inputs:
azureSubscription: 'VcpkgPrFleet'
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
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 \
Expand All @@ -66,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" \
Expand Down
32 changes: 0 additions & 32 deletions scripts/azure-pipelines/android/create-docker-image.ps1

This file was deleted.

3 changes: 3 additions & 0 deletions scripts/azure-pipelines/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
45 changes: 45 additions & 0 deletions scripts/azure-pipelines/create-docker-images.ps1
Original file line number Diff line number Diff line change
@@ -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
7 changes: 7 additions & 0 deletions scripts/azure-pipelines/linux/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Loading