Skip to content

Commit ec9ce24

Browse files
committed
Enable automatically starting the ARM64 VM on pipeline run
1 parent 9737ad3 commit ec9ce24

File tree

3 files changed

+34
-0
lines changed

3 files changed

+34
-0
lines changed

windows-release/azure-pipelines.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,8 @@ stages:
163163
pool:
164164
vmImage: ${{ parameters.vmImage }}
165165
jobs:
166+
- template: start-arm64vm.yml
167+
- ${{ if eq(parameters.DoPGOARM64, 'true') }}:
166168
- template: stage-build.yml
167169
parameters:
168170
DoFreethreaded: ${{ parameters.DoFreethreaded }}

windows-release/stage-build.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ parameters:
1010
jobs:
1111
- job: Build_Docs
1212
displayName: Docs build
13+
dependsOn: []
1314

1415
workspace:
1516
clean: all
@@ -37,6 +38,7 @@ jobs:
3738

3839
- job: Build_Python
3940
displayName: Python build
41+
dependsOn: []
4042

4143
workspace:
4244
clean: all
@@ -170,6 +172,7 @@ jobs:
170172
- ${{ if eq(parameters.DoPGO, 'true') }}:
171173
- job: Build_Python_PGO_Native
172174
displayName: Python PGO build
175+
dependsOn: []
173176

174177
workspace:
175178
clean: all
@@ -210,6 +213,7 @@ jobs:
210213
- ${{ if eq(parameters.DoPGOARM64, 'true') }}:
211214
- job: Build_Python_PGO_1
212215
displayName: Python PGO build
216+
dependsOn: []
213217

214218
workspace:
215219
clean: all
@@ -324,6 +328,7 @@ jobs:
324328

325329
- job: TclTk_Lib
326330
displayName: Publish Tcl/Tk Library
331+
dependsOn: []
327332

328333
variables:
329334
IncludeLLVM: false

windows-release/start-arm64vm.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
jobs:
2+
- job: Start_ARM64VM
3+
displayName: 'Ensure ARM64 VM is running'
4+
dependsOn: []
5+
6+
steps:
7+
- task: AzureCLI@2
8+
displayName: 'Start pythonarm64 and set auto-shutdown to (UTC now - 1h)'
9+
inputs:
10+
azureSubscription: "Steve's VM" # WIF service connection name
11+
scriptType: pscore
12+
scriptLocation: inlineScript
13+
inlineScript: |
14+
$ErrorActionPreference = 'Stop'
15+
16+
$rg = 'cpythonbuild'
17+
$vm = 'pythonarm64'
18+
19+
# Compute UTC time minus 1 hour, format HHmm (e.g. 1830)
20+
$shutdownTime = (Get-Date).ToUniversalTime().AddHours(-1).ToString('HHmm')
21+
Write-Host "Setting auto-shutdown time (UTC HHmm) to: $shutdownTime"
22+
23+
# Configure daily auto-shutdown in 23 hours
24+
az vm auto-shutdown -g $rg -n $vm --time $shutdownTime
25+
26+
# Start VM, but don't fail if it's already running
27+
az vm start -g $rg -n $vm

0 commit comments

Comments
 (0)