|
3 | 3 | push:
|
4 | 4 | branches:
|
5 | 5 | - onboard-actions
|
| 6 | +permissions: |
| 7 | + id-token: write |
| 8 | + contents: read |
6 | 9 | jobs:
|
7 |
| - Windows: |
| 10 | + test-modified-ports: |
| 11 | + strategy: |
| 12 | + matrix: |
| 13 | + conf: |
| 14 | + - triplet: 'x86-windows' |
| 15 | + pool: windows |
| 16 | + extra-checks: true |
| 17 | + - triplet: 'x64-windows' |
| 18 | + pool: windows |
| 19 | + - triplet: 'x64-windows-static' |
| 20 | + pool: windows |
| 21 | + - triplet: 'x64-windows-static-md' |
| 22 | + pool: windows |
| 23 | + - triplet: 'x64-uwp' |
| 24 | + pool: windows |
| 25 | + - triplet: 'arm64-windows' |
| 26 | + pool: windows |
| 27 | + - triplet: 'arm64-uwp' |
| 28 | + pool: windows |
8 | 29 | runs-on:
|
9 | 30 | - self-hosted
|
10 |
| - - "1ES.Pool=vcpkg-windows-wus" |
| 31 | + - "1ES.Pool=${{ matrix.conf.pool == 'windows' && 'vcpkg-windows-wus' || 'vcpkg-linux-wus' }}" |
| 32 | + continue-on-error: true |
| 33 | + timeout-minutes: 2880 # 2 days |
| 34 | + env: |
| 35 | + VCPKG_DOWNLOADS: ${{ matrix.conf.pool == 'windows' && 'D:\downloads' || '/mnt/vcpkg-ci/downloads' }} |
| 36 | + WORKING_ROOT: ${{ matrix.conf.pool == 'windows' && 'D:\' || '/mnt/vcpkg-ci' }} |
| 37 | + ARTIFACT_STAGING: ${{ matrix.conf.pool == 'windows' && 'D:\artifactstaging' || '/mnt/vcpkg-ci/artifactstaging' }} |
11 | 38 | steps:
|
12 |
| - - name: Checkout |
| 39 | + - name: Checkout (Windows) |
13 | 40 | uses: actions/checkout@v4
|
| 41 | + if: ${{ success() && matrix.conf.pool == 'windows' }} |
| 42 | + env: |
| 43 | + PATH: c:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git\cmd;$PATH |
14 | 44 | with:
|
15 | 45 | # fetch-depth 50 tries to ensure we capture the whole history of the branch
|
16 | 46 | fetch-depth: 50
|
| 47 | + - name: Checkout (Non-Windows) |
| 48 | + uses: actions/checkout@v4 |
| 49 | + if: ${{ success() && matrix.conf.pool != 'windows' }} |
| 50 | + with: |
| 51 | + # fetch-depth 50 tries to ensure we capture the whole history of the branch |
| 52 | + fetch-depth: 50 |
| 53 | + - name: Azure Login |
| 54 | + uses: azure/login@v2 |
| 55 | + with: |
| 56 | + client-id: a81b4cd3-9d8d-4cb9-9a74-f2038f24f224 |
| 57 | + subscription-id: 7fcb00fa-a761-49de-8a2f-d67190e62882 |
| 58 | + tenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 |
| 59 | + - name: Bootstrap (Windows) |
| 60 | + if: ${{ success() && matrix.conf.pool == 'windows' }} |
| 61 | + run: ./scripts/bootstrap.ps1 |
| 62 | + - name: Bootstrap (Non-Windows) |
| 63 | + if: ${{ success() && matrix.conf.pool != 'windows' }} |
| 64 | + run: ./scripts/bootstrap.sh |
| 65 | + - name: Format Manifests |
| 66 | + if: ${{ success() && matrix.conf.extra-checks }} |
| 67 | + run: ./vcpkg.exe format-manifest --all |
| 68 | + - name: Create Artifact Staging Directory |
| 69 | + run: mkdir ${{ env.ARTIFACT_STAGING }} |
| 70 | + - name: Create Format Manifest Diff |
| 71 | + if: ${{ success() && matrix.conf.extra-checks }} |
| 72 | + run: ./scripts/azure-pipelines/Create-PRDiff.ps1 -DiffFile "${{ env.ARTIFACT_STAGING }}/format.diff" |
| 73 | + - name: 'Publish Artifact: Format Diff' |
| 74 | + uses: actions/upload-artifact@v4 |
| 75 | + if: ${{ failure() && !cancelled() && matrix.conf.extra-checks }} |
| 76 | + with: |
| 77 | + name: 'format.diff' |
| 78 | + path: "${{ env.ARTIFACT_STAGING }}/format.diff" |
| 79 | + retention-days: 7 |
| 80 | + if-no-files-found: error |
| 81 | + - name: "*** Test Modified Ports" |
| 82 | + shell: pwsh |
| 83 | + run: | |
| 84 | + $current = Get-Date -AsUtc |
| 85 | + $endDate = $current.AddDays(2) |
| 86 | + $end = Get-Date -Date $endDate -UFormat '+%Y-%m-%dT%H:%MZ' |
| 87 | + Write-Host "Getting Asset Cache SAS" |
| 88 | + $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 |
| 89 | + if ($LastExitCode -ne 0) { |
| 90 | + Write-Error "Failed to get Asset Cache SAS" |
| 91 | + return 1 |
| 92 | + } |
| 93 | +
|
| 94 | + $assetSas = $assetSas.Trim() |
| 95 | + Write-Host "Getting Binary Cache SAS" |
| 96 | + $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 |
| 97 | + if ($LastExitCode -ne 0) { |
| 98 | + Write-Error "Failed to get Binary Cache SAS" |
| 99 | + return 1 |
| 100 | + } |
| 101 | +
|
| 102 | + $binarySas = $binarySas.Trim() |
| 103 | + $env:X_VCPKG_ASSET_SOURCES = "x-azurl,https://vcpkgassetcachewus3.blob.core.windows.net/cache,$assetSas,readwrite" |
| 104 | + if ($IsWindows) { # FIXME: Git in the images |
| 105 | + $env:PATH += ";c:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git\cmd" |
| 106 | + } |
17 | 107 |
|
18 |
| - - name: Bootstrap |
19 |
| - run: ./bootstrap-vcpkg.sh |
20 |
| - |
21 |
| - - name: Example |
| 108 | + & scripts/azure-pipelines/test-modified-ports.ps1 -Triplet ${{ matrix.triplet }} -BinarySourceStub "x-azblob,https://vcpkgbinarycachewus.blob.core.windows.net/cache,$binarySas" -WorkingRoot $env:WORKING_ROOT -ArtifactStagingDirectory $env:ARTIFACT_STAGING |
| 109 | + - name: 'Validate version files' |
| 110 | + run: 'scripts/azure-pipelines/windows/validate-version-files.ps1' |
| 111 | + - name: 'Publish Artifact: failure logs for ${{ matrix.triplet }}' |
| 112 | + uses: actions/upload-artifact@v4 |
| 113 | + with: |
| 114 | + name: 'failure logs for ${{ matrix.triplet }}' |
| 115 | + path: '${{ env.ARTIFACT_STAGING }}/failure-logs' |
| 116 | + retention-days: 7 |
| 117 | + if-no-files-found: ignore |
| 118 | + - name: 'Build a file list for all packages' |
| 119 | + if: ${{ !cancelled() }} |
22 | 120 | shell: pwsh
|
23 |
| - run: Write-Host 'Running on 1ES Hosted GitHub Runners' |
| 121 | + run: | |
| 122 | + & $(./vcpkg fetch python3) ./scripts/file_script.py "${{ matrix.working-root }}/installed/vcpkg/info/" |
| 123 | + - name: 'Publish Artifact: file lists for ${{ matrix.triplet }}' |
| 124 | + uses: actions/upload-artifact@v4 |
| 125 | + if: ${{ !cancelled() }} |
| 126 | + with: |
| 127 | + name: 'file lists for ${{ matrix.triplet }}' |
| 128 | + path: scripts/list_files |
| 129 | + retention-days: 7 |
| 130 | + if-no-files-found: ignore |
0 commit comments