Skip to content

Commit

Permalink
[scripts/ci] Run step Test Modified Ports with PowerShell@2
Browse files Browse the repository at this point in the history
  • Loading branch information
WangWeiLin-MV committed Jul 31, 2024
1 parent 1dc5ee3 commit 52511e6
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 2 deletions.
3 changes: 3 additions & 0 deletions ports/0-1port/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
message("stdout")
# message(FATAL_ERROR "stderr")
4 changes: 4 additions & 0 deletions ports/0-1port/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name": "0-1port",
"version": "0"
}
34 changes: 32 additions & 2 deletions scripts/azure-pipelines/windows/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
PathtoPublish: '$(DiffFile)'
ArtifactName: 'format.diff'
- task: AzureCLI@2
displayName: '*** Test Modified Ports'
displayName: 'Initialize tokens variables'
inputs:
azureSubscription: 'VcpkgPrFleet'
scriptType: 'pscore'
Expand All @@ -72,7 +72,37 @@ jobs:
$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)
@{
azlarg_Triplet = '${{ replace(parameters.jobName, '_', '-') }}'
azlarg_BuildReason = '$(Build.Reason)'
azlarg_WorkingRoot = $env:WORKING_ROOT
azlarg_ArtifactStagingDirectory = '$(Build.ArtifactStagingDirectory)'
}.GetEnumerator() | ForEach-Object {
Write-Host "##vso[task.setvariable variable=$($_.Key);issecret=false]$($_.Value)"
}
@{
azlarg_BinarySourceStub = "x-azblob,https://vcpkgbinarycachewus3.blob.core.windows.net/cache,$binarySas"
azlenv_X_VCPKG_ASSET_SOURCES = $env:X_VCPKG_ASSET_SOURCES
}.GetEnumerator() | ForEach-Object {
Write-Host "##vso[task.setvariable variable=$($_.Key);issecret=true]$($_.Value)"
}
- task: PowerShell@2
displayName: '*** Test Modified Ports'
env:
X_VCPKG_ASSET_SOURCES: $(azlenv_X_VCPKG_ASSET_SOURCES)
inputs:
failOnStderr: true
targetType: 'inline'
script: |
$Param = @{
Triplet = '$(azlarg_Triplet)'
BuildReason = '$(azlarg_BuildReason)'
BinarySourceStub = '$(azlarg_BinarySourceStub)'
WorkingRoot = '$(azlarg_WorkingRoot)'
ArtifactStagingDirectory = '$(azlarg_ArtifactStagingDirectory)'
}
& scripts/azure-pipelines/test-modified-ports.ps1 @Param
pwsh: true
- task: PowerShell@2
displayName: 'Validate version files'
condition: eq('${{ replace(parameters.jobName, '_', '-') }}', '${{ variables.ExtraChecksTriplet }}')
Expand Down
9 changes: 9 additions & 0 deletions versions/0-/0-1port.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "fff9542e9b3d077807c5c15195b486df19f6e442",
"version": "0",
"port-version": 0
}
]
}
4 changes: 4 additions & 0 deletions versions/baseline.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{
"default": {
"0-1port": {
"baseline": "0",
"port-version": 0
},
"3fd": {
"baseline": "2.6.3",
"port-version": 4
Expand Down

0 comments on commit 52511e6

Please sign in to comment.