Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
14 changes: 9 additions & 5 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ jobs:
fail-fast: false
matrix:
include:
- os: windows-2022
- os: windows-2025
preset: windows-ci
- os: ubuntu-22.04
- os: ubuntu-24.04
preset: linux-ci
- os: ubuntu-24.04-arm
preset: linux-arm64-ci
- os: macos-14
- os: macos-26
preset: macos-ci
runs-on: ${{ matrix.os }}
timeout-minutes: 120
Expand Down Expand Up @@ -70,11 +70,15 @@ jobs:
path: ${{ github.workspace }}/vcpkg-root
repository: microsoft/vcpkg
ref: ${{ steps.vcpkg_sha.outputs.VCPKG_SHA }}
- name: Install Mono (for NuGet export)
if: matrix.preset == 'linux-arm64-ci'
- name: Install Mono (Linux) (for NuGet export)
if: matrix.preset == 'linux-ci' || matrix.preset == 'linux-arm64-ci'
run: |
sudo apt update
sudo apt install -y mono-complete
- name: Install Mono (macOS) (for NuGet export)
if: matrix.preset == 'macos-ci'
run: |
brew install mono
- name: Run vcpkg end-to-end tests
shell: pwsh
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
uses: ./.github/workflows/build.yaml

format:
runs-on: windows-2022
runs-on: windows-2025
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -72,7 +72,7 @@ jobs:
path: out/format.patch

json-schema:
runs-on: windows-2022
runs-on: windows-2025
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
skipped-depends:arm64-osx=skip
skipped-depends:x64-linux=skip
skipped-depends:x64-osx=skip
skipped-depends:arm64-linux=skip
skipped-depends:x64-windows=skip
skipped-depends:x86-windows=skip
2 changes: 0 additions & 2 deletions azure-pipelines/e2e-assets/ci-skipped-ports/baseline.fail.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ always-skip:cross=fail
always-skip:arm64-linux=fail
always-skip:arm64-osx=fail
always-skip:x64-linux=fail
always-skip:x64-osx=fail
always-skip:x64-windows=fail
always-skip:x86-windows=fail

Expand All @@ -12,6 +11,5 @@ always-skip:x86-windows=fail
maybe-skip:arm64-linux=fail
maybe-skip:arm64-osx=fail
maybe-skip:x64-linux=fail
maybe-skip:x64-osx=fail
maybe-skip:x64-windows=fail
maybe-skip:x86-windows=fail
4 changes: 2 additions & 2 deletions azure-pipelines/e2e-assets/ci-skipped-ports/baseline.skip.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# actual test
always-skip:arm64-osx=skip
always-skip:x64-linux=skip
always-skip:x64-osx=skip
always-skip:arm64-linux=skip
always-skip:x64-windows=skip
always-skip:x86-windows=skip

# don't build cached artifact
maybe-transitive-cascade:arm64-osx=skip
maybe-transitive-cascade:x64-linux=skip
maybe-transitive-cascade:x64-osx=skip
maybe-transitive-cascade:arm64-linux=skip
maybe-transitive-cascade:x64-windows=skip
maybe-transitive-cascade:x86-windows=skip
2 changes: 0 additions & 2 deletions azure-pipelines/e2e-assets/ci/ci.baseline.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
not-sup-host-b:arm64-osx=fail
not-sup-host-b:x64-osx=fail
not-sup-host-b:x86-windows=fail
not-sup-host-b:x64-windows=fail
not-sup-host-b:arm64-windows=fail
Expand All @@ -8,7 +7,6 @@ not-sup-host-b:arm64-linux=fail


dep-on-feature-not-sup:arm64-osx=fail
dep-on-feature-not-sup:x64-osx=fail
dep-on-feature-not-sup:x86-windows=fail
dep-on-feature-not-sup:x64-windows=fail
dep-on-feature-not-sup:arm64-windows=fail
Expand Down
2 changes: 0 additions & 2 deletions azure-pipelines/e2e-assets/ci/ci.pass.baseline.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
not-sup-host-b:arm64-osx=pass
not-sup-host-b:x64-osx=pass
not-sup-host-b:x86-windows=pass
not-sup-host-b:x64-windows=pass
not-sup-host-b:arm64-windows=pass
Expand All @@ -8,7 +7,6 @@ not-sup-host-b:arm64-linux=pass


dep-on-feature-not-sup:arm64-osx=pass
dep-on-feature-not-sup:x64-osx=pass
dep-on-feature-not-sup:x86-windows=pass
dep-on-feature-not-sup:x64-windows=pass
dep-on-feature-not-sup:arm64-windows=pass
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
not-sup-host-b:arm64-osx=fail
not-sup-host-b:x64-osx=fail
not-sup-host-b:x86-windows=fail
not-sup-host-b:x64-windows=fail
not-sup-host-b:arm64-windows=fail
Expand All @@ -8,7 +7,6 @@ not-sup-host-b:arm64-linux=fail


dep-on-feature-not-sup:arm64-osx=fail
dep-on-feature-not-sup:x64-osx=fail
dep-on-feature-not-sup:x86-windows=fail
dep-on-feature-not-sup:x64-windows=fail
dep-on-feature-not-sup:arm64-windows=fail
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ not-sup-host-b:arm64-linux=fail
not-sup-host-b:arm64-osx=fail
not-sup-host-b:arm64-windows=fail
not-sup-host-b:x64-linux=fail
not-sup-host-b:x64-osx=fail
not-sup-host-b:x64-windows=fail
not-sup-host-b:x86-windows=fail

Expand All @@ -11,6 +10,5 @@ dep-on-feature-not-sup:arm64-linux=fail
dep-on-feature-not-sup:arm64-osx=fail
dep-on-feature-not-sup:arm64-windows=fail
dep-on-feature-not-sup:x64-linux=fail
dep-on-feature-not-sup:x64-osx=fail
dep-on-feature-not-sup:x64-windows=fail
dep-on-feature-not-sup:x86-windows=fail
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ cmake:arm64-osx=pass
cmake:arm64-windows-static-md=pass
cmake:arm64-windows=pass
cmake:x64-linux=pass
cmake:x64-osx=pass
cmake:x64-windows-release=pass
cmake:x64-windows-static-md=pass
cmake:x64-windows-static=pass
Expand All @@ -13,7 +12,6 @@ cmake-user:arm64-uwp=pass
cmake-user:arm64-windows-static-md=pass
cmake-user:arm64-windows=pass
cmake-user:x64-linux=pass
cmake-user:x64-osx=pass
cmake-user:x64-windows-release=pass
cmake-user:x64-windows-static-md=pass
cmake-user:x64-windows-static=pass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ cmake:arm64-osx=pass
cmake:arm64-windows-static-md=pass
cmake:arm64-windows=pass
cmake:x64-linux=pass
cmake:x64-osx=pass
cmake:x64-windows-release=pass
cmake:x64-windows-static-md=pass
cmake:x64-windows-static=pass
Expand All @@ -13,7 +12,6 @@ cmake-user:arm64-windows=pass
cmake-user:arm64-windows-static-md=pass
cmake-user:x64-linux=pass
cmake[d,e,f]:x64-windows=pass
cmake-user:x64-osx=pass
cmake-user:x64-windows-release=pass
cmake-user:x64-windows-static-md=pass
cmake-user:x64-windows-static=pass
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
file(STRINGS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}.vcpkg_abi_info.txt" lines)
set(ABI_FILE "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}.vcpkg_abi_info.txt")
file(STRINGS "${ABI_FILE}" lines)
list(GET lines 0 first_line)

set(expected "additional_file_0 61ba0c7fc1f696e28c1b7aa9460980a571025ff8c97bb90a57e990463aa25660")

if(first_line STREQUAL "${expected}")
message(STATUS "Test succesful!")
message(STATUS "Test successful!")
else()
message(FATAL_ERROR "First line in abi info is not the additional file to be hashed but:\n first_line: '${first_line}'\n expected: '${expected}' ")
message(FATAL_ERROR "First line in abi info ( ${ABI_FILE} ) is not the additional file to be hashed but:\n first_line: '${first_line}'\n expected: '${expected}' ")
endif()

set(VCPKG_POLICY_EMPTY_PACKAGE enabled)

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# This makes sure the correct version of Ninja according to vcpkg_find_acquire_program is available
# before we test x-script.
vcpkg_find_acquire_program(NINJA)
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name": "vcpkg-test-x-script-prerequisites",
"version": "1.0.0"
}
7 changes: 5 additions & 2 deletions azure-pipelines/e2e-ports/vcpkg-test-x-script/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"name": "vcpkg-test-x-script",
"version-string": "1.0.0"
"name": "vcpkg-test-x-script",
"version": "1.0.0",
"dependencies": [
"vcpkg-test-x-script-prerequisites"
]
}

This file was deleted.

This file was deleted.

17 changes: 3 additions & 14 deletions azure-pipelines/end-to-end-tests-dir/asset-caching.ps1
Original file line number Diff line number Diff line change
@@ -1,28 +1,17 @@
. $PSScriptRoot/../end-to-end-tests-prelude.ps1

# Testing x-script
Refresh-TestRoot
$env:VCPKG_FORCE_DOWNLOADED_BINARIES = "ON"
Run-Vcpkg @commonArgs fetch cmake
Throw-IfFailed
Run-Vcpkg @commonArgs fetch ninja
Throw-IfFailed
if ($IsWindows)
{
Run-Vcpkg @commonArgs fetch powershell-core
Throw-IfFailed
}

Remove-Item env:VCPKG_FORCE_DOWNLOADED_BINARIES
# Testing x-script
Run-Vcpkg @commonArgs install vcpkg-test-x-script-prerequisites --x-binarysource=clear "--overlay-ports=$PSScriptRoot/../e2e-ports"
Throw-IfFailed
$helloPath = Join-Path $DefaultDownloadsRoot 'hello-world.txt'
if (Test-Path $helloPath) {
Remove-Item $helloPath
}

Run-Vcpkg @commonArgs install vcpkg-test-x-script --x-binarysource=clear "--overlay-ports=$PSScriptRoot/../e2e-ports" "--x-asset-sources=x-script,$TestScriptAssetCacheExe {url} {sha512} {dst};x-block-origin"
Throw-IfFailed

$env:VCPKG_FORCE_DOWNLOADED_BINARIES = "ON"
$assetCacheRegex = [regex]::Escape($AssetCache)

# Testing asset cache miss (not configured) + x-block-origin enabled
Expand Down
6 changes: 2 additions & 4 deletions azure-pipelines/end-to-end-tests-dir/ci.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,8 @@ if (-not ($Output -match 'maybe-cross-cascade:[^:]+: cascade\n')) {
throw 'did not identify maybe-cross-cascade as cascaded'
}
# test cross build; skipping always-skip and host maybe-skip
Remove-Item -Recurse -Force $installRoot -ErrorAction SilentlyContinue
New-Item -ItemType Directory -Path $installRoot -Force | Out-Null
Copy-Item "$env:VCPKG_ROOT/triplets/$Triplet.cmake" "$installRoot/cross.cmake"
$Output = Run-VcpkgAndCaptureOutput ci --dry-run --skip-failures --triplet cross --overlay-triplets $installRoot @directoryArgs --x-builtin-ports-root="$PSScriptRoot/../e2e-assets/ci-skipped-ports" --binarysource=clear --ci-baseline="$PSScriptRoot/../e2e-assets/ci-skipped-ports/baseline.fail.txt"
Copy-Item $tripletFile "$TestingRoot/cross.cmake"
$Output = Run-VcpkgAndCaptureOutput ci --dry-run --skip-failures --triplet cross --overlay-triplets $TestingRoot @directoryArgs --x-builtin-ports-root="$PSScriptRoot/../e2e-assets/ci-skipped-ports" --binarysource=clear --ci-baseline="$PSScriptRoot/../e2e-assets/ci-skipped-ports/baseline.fail.txt"
Throw-IfFailed
if (-not ($Output -match 'always-built:cross: \*:')) {
throw 'did not attempt to build always-built [cross build]'
Expand Down
20 changes: 18 additions & 2 deletions azure-pipelines/end-to-end-tests-dir/hash-additional.ps1
Original file line number Diff line number Diff line change
@@ -1,9 +1,25 @@
. $PSScriptRoot/../end-to-end-tests-prelude.ps1

Run-Vcpkg @directoryArgs "--overlay-triplets=$PSScriptRoot/../e2e-ports/hash-additional" "--overlay-ports=$PSScriptRoot/../e2e-ports/hash-additional" x-set-installed vcpkg-test-hash-additional --triplet hash-additional-e2e --binarysource=clear
$hostTripletContent = Get-Content $tripletFile -Raw
$tripletContent = "$hostTripletContent`n"
$tripletContent += @"
set(VCPKG_HASH_ADDITIONAL_FILES "`${CMAKE_CURRENT_LIST_DIR}/additional_abi_file.txt")
"@
$tripletContent += "`n"
Set-Content -Path "$TestingRoot/hash-additional-e2e.cmake" -Value $tripletContent -Encoding utf8NoBOM
Copy-Item "$PSScriptRoot/../e2e-ports/hash-additional/additional_abi_file.txt" "$TestingRoot/additional_abi_file.txt" -Force

Run-Vcpkg @directoryArgs "--overlay-triplets=$TestingRoot" "--overlay-ports=$PSScriptRoot/../e2e-ports/hash-additional" x-set-installed vcpkg-test-hash-additional --triplet hash-additional-e2e --binarysource=clear
Throw-IfFailed

$output = Run-VcpkgAndCaptureOutput @directoryArgs "--overlay-triplets=$PSScriptRoot/../e2e-ports/hash-additional-fail" "--overlay-ports=$PSScriptRoot/../e2e-ports/hash-additional-fail" x-set-installed vcpkg-test-hash-additional --triplet hash-additional-e2e --binarysource=clear
$tripletContent = "$hostTripletContent`n"
$tripletContent += @"
set(VCPKG_HASH_ADDITIONAL_FILES "additional_abi_file.txt") # relatives path should fail
"@
$tripletContent += "`n"
Set-Content -Path "$TestingRoot/hash-additional-e2e.cmake" -Value $tripletContent

$output = Run-VcpkgAndCaptureOutput @directoryArgs "--overlay-triplets=$TestingRoot" "--overlay-ports=$PSScriptRoot/../e2e-ports" x-set-installed vcpkg-hello-world-1 --triplet hash-additional-e2e --binarysource=clear
Throw-IfNotFailed
if ($output -notmatch "Variable VCPKG_HASH_ADDITIONAL_FILES contains invalid file path")
{
Expand Down
4 changes: 2 additions & 2 deletions azure-pipelines/end-to-end-tests-dir/integrate-install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ if (-not $IsLinux -and -not $IsMacOS) {
foreach ($project in @("Project1", "NoProps")) {
$Script:CurrentTest = "msbuild $iiroot\$project.vcxproj"
Write-Host $Script:CurrentTest
Run-Vcpkg @commonArgs env "msbuild $iiroot\$project.vcxproj /p:VCPKG_ROOT=$VcpkgRoot /p:VcpkgRoot=$TestingRoot /p:IntDir=$TestingRoot\int\ /p:OutDir=$TestingRoot\out\ "
Run-Vcpkg @commonArgs env "msbuild $iiroot\$project.vcxproj /p:VCPKG_ROOT=$VcpkgRoot /p:VcpkgRoot=$TestingRoot /p:IntDir=$TestingRoot\int\ /p:OutDir=$TestingRoot\out\ /p:Platform=Win32"
Throw-IfFailed
Remove-Item -Recurse -Force $TestingRoot\int
Remove-Item -Recurse -Force $TestingRoot\out
Expand All @@ -25,7 +25,7 @@ if (-not $IsLinux -and -not $IsMacOS) {
Throw-IfFailed
foreach ($project in @("VcpkgTriplet", "VcpkgTriplet2", "VcpkgUseStatic", "VcpkgUseStatic2")) {
$Script:CurrentTest = "msbuild $iiroot\$project.vcxproj"
Run-Vcpkg @commonArgs env "msbuild $iiroot\$project.vcxproj /p:VCPKG_ROOT=$VcpkgRoot /p:VcpkgRoot=$TestingRoot /p:IntDir=$TestingRoot\int\ /p:OutDir=$TestingRoot\out\ "
Run-Vcpkg @commonArgs env "msbuild $iiroot\$project.vcxproj /p:VCPKG_ROOT=$VcpkgRoot /p:VcpkgRoot=$TestingRoot /p:IntDir=$TestingRoot\int\ /p:OutDir=$TestingRoot\out\ /p:Platform=Win32"
Throw-IfFailed
Remove-Item -Recurse -Force $TestingRoot\int
Remove-Item -Recurse -Force $TestingRoot\out
Expand Down
Loading
Loading