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
6 changes: 5 additions & 1 deletion windows-release/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ parameters:
type: boolean
default: true
- name: DoPGOARM64
displayName: "Run ARM64 PGO (requires custom VM)"
displayName: "Run ARM64 PGO"
type: boolean
default: true
- name: DoLayout
Expand Down Expand Up @@ -163,6 +163,10 @@ stages:
pool:
vmImage: ${{ parameters.vmImage }}
jobs:
- template: start-arm64vm.yml
parameters:
DoARM64: ${{ parameters.DoARM64 }}
DoPGOARM64: ${{ parameters.DoPGOARM64 }}
- template: stage-build.yml
parameters:
DoFreethreaded: ${{ parameters.DoFreethreaded }}
Expand Down
5 changes: 5 additions & 0 deletions windows-release/stage-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ parameters:
jobs:
- job: Build_Docs
displayName: Docs build
dependsOn: []

workspace:
clean: all
Expand Down Expand Up @@ -37,6 +38,7 @@ jobs:

- job: Build_Python
displayName: Python build
dependsOn: []

workspace:
clean: all
Expand Down Expand Up @@ -170,6 +172,7 @@ jobs:
- ${{ if eq(parameters.DoPGO, 'true') }}:
- job: Build_Python_PGO_Native
displayName: Python PGO build
dependsOn: []

workspace:
clean: all
Expand Down Expand Up @@ -210,6 +213,7 @@ jobs:
- ${{ if eq(parameters.DoPGOARM64, 'true') }}:
- job: Build_Python_PGO_1
displayName: Python PGO build
dependsOn: []

workspace:
clean: all
Expand Down Expand Up @@ -324,6 +328,7 @@ jobs:

- job: TclTk_Lib
displayName: Publish Tcl/Tk Library
dependsOn: []

variables:
IncludeLLVM: false
Expand Down
46 changes: 46 additions & 0 deletions windows-release/start-arm64vm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
parameters:
DoARM64: false
DoPGOARM64: false

jobs:
# Only include the job if we need the VM, which means ARM64 PGO.
- ${{ if eq(parameters.DoPGOARM64, 'true') }}:
- job: Start_ARM64VM
displayName: 'Ensure ARM64 VM is running'
dependsOn: []

steps:
- checkout: none

- task: AzureCLI@2
displayName: 'Start pythonarm64 and set auto-shutdown to (UTC now - 1h)'
inputs:
azureSubscription: "Steve's VM" # WIF service connection name
scriptType: pscore
scriptLocation: inlineScript
inlineScript: |
$ErrorActionPreference = 'Stop'

$rg = 'cpythonbuild'
$vm = 'pythonarm64'

# Compute UTC time minus 12 hours, format HHmm (e.g. 1830)
$shutdownTime = (Get-Date).ToUniversalTime().AddHours(-12).ToString('HHmm')
Write-Host "Setting auto-shutdown time to: $shutdownTime UTC"

# Configure daily auto-shutdown in 12 hours
az vm auto-shutdown -g $rg -n $vm --time $shutdownTime | Out-Null
if ($?) {
Write-Host "Successfully configured auto-shutdown for ARM64 VM in 12 hours."
} else {
Write-Host "##[warning]Failed to configure ARM64 VM auto-shutdown."
}

# Start VM, but don't fail if it's already running
az vm start -g $rg -n $vm | Out-Null
$u = "https://dev.azure.com/Python/cpython/_settings/agentqueues?queueId=24&view=agents"
if ($?) {
Write-Host "Successfully started ARM64 VM. Check $u for running status."
} else {
Write-Host "##[warning]Failed to start ARM64 VM. Check $u in case it is already active, or ping Steve."
}
Loading