Skip to content

Commit 1876ad9

Browse files
committed
Enhance verify toolchain
1 parent 0412313 commit 1876ad9

1 file changed

Lines changed: 15 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,9 +208,22 @@ jobs:
208208
compiler: ${{ matrix.dc }}
209209
- name: Verify toolchain
210210
shell: pwsh
211+
env:
212+
DC_NAME: ${{ matrix.dc }}
211213
run: |
212-
dmd --version 2>$null; if ($LASTEXITCODE -ne 0) { "dmd not found"; exit 1 }
213-
dub --version; if ($LASTEXITCODE -ne 0) { "dub not found"; exit 1 }
214+
Write-Host "matrix.dc = $env:DC_NAME"
215+
dub --version 2>$null
216+
if ($LASTEXITCODE -ne 0) { "dub not found"; exit 1 }
217+
218+
if ($env:DC_NAME -like "dmd.*") {
219+
dmd --version 2>$null
220+
if ($LASTEXITCODE -ne 0) { "dmd not found"; exit 1 }
221+
} else if ($env:DC_NAME -like "ldc.*") {
222+
ldc2 --version 2>$null
223+
if ($LASTEXITCODE -ne 0) { "dmd not found"; exit 1 }
224+
} else {
225+
throw "Unknown compiler in matrix.dc: '$env:DC_NAME' (expected prefix 'dmd' or 'ldc')"
226+
}
214227
Write-Host "ARCH=$env:ARCH"
215228
Write-Host "Path=$env:Path"
216229
- name: Cache dub packages (safe to share)

0 commit comments

Comments
 (0)