Skip to content

Commit 06a99c8

Browse files
committed
Fix CI config handling
1 parent 7437d32 commit 06a99c8

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,17 @@ jobs:
1616
- name: Parse scripts and config
1717
run: |
1818
$ErrorActionPreference = "Stop"
19-
foreach ($file in @("prepare-host.ps1", "create-workstation-vm.ps1", "check-workstation-vm.ps1", "bootstrap-windows.ps1", "lib/iso-writer.ps1", "vendor/Fido.ps1")) {
19+
foreach ($file in @("prepare-host.ps1", "create-workstation-vm.ps1", "check-workstation-vm.ps1", "bootstrap-windows.ps1", "enable-gpu-pv.ps1", "pair-moonlight.ps1", "lib/iso-writer.ps1", "vendor/Fido.ps1")) {
2020
$tokens = $null
2121
$errors = $null
2222
[System.Management.Automation.Language.Parser]::ParseFile((Resolve-Path $file), [ref]$tokens, [ref]$errors) | Out-Null
2323
if ($errors.Count) { throw "PowerShell parse failed: $file" }
2424
}
25-
Get-ChildItem config -Filter *.json | ForEach-Object {
25+
$configs = @(Get-ChildItem config -Filter *.json)
26+
if ($configs.Count -eq 0) { throw "Expected at least one config file." }
27+
$configs | ForEach-Object {
2628
Get-Content -Raw $_.FullName | ConvertFrom-Json | Out-Null
2729
}
28-
if ((Get-ChildItem config -Filter *.json).Count -ne 1) { throw "Expected one config file." }
2930
3031
smoke:
3132
needs: static
@@ -74,6 +75,12 @@ jobs:
7475
$cfg.cpuCount = 2
7576
$cfg.dataDiskGB = 1
7677
$cfg.sshEnabled = $false
78+
if ($cfg.PSObject.Properties.Name -contains "gpuPv") {
79+
$cfg.gpuPv.enabled = $false
80+
}
81+
if ($cfg.PSObject.Properties.Name -contains "gpu") {
82+
$cfg.gpu.enabled = $false
83+
}
7784
$cfg | Add-Member -Force NoteProperty guestIpAddress "192.168.240.2"
7885
$cfg | Add-Member -Force NoteProperty guestPrefixLength 24
7986
$cfg | Add-Member -Force NoteProperty guestGateway "192.168.240.1"

0 commit comments

Comments
 (0)