Skip to content

Commit 4090a9e

Browse files
authored
chore(ci): copy PDB into Windows zip archive (#1909)
1 parent f77dc3f commit 4090a9e

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

.gitlab/windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ test-integration-windows-amd64:
110110
powershell.exe -NoProfile -NonInteractive -File c:\mnt\ci\tooling\windows-integration-tests.ps1
111111
- If ($lastExitCode -ne "0") { exit "$lastExitCode" }
112112

113-
# Builds the Windows release zip (agent-data-plane.exe + LICENSE/NOTICE/LICENSE-3rdparty.csv +
113+
# Builds the Windows release zip (agent-data-plane.{exe,pdb} + LICENSE/NOTICE/LICENSE-3rdparty.csv +
114114
# LICENSES/THIRD-PARTY-*) inside the cached LTSC2022 build image and exposes it as a job
115115
# artifact. The release-stage `push-release-zip-windows-amd64*` jobs in .gitlab/release.yml
116116
# consume the artifact and `aws s3 cp` it to s3.

ci/tooling/package-adp-zip.ps1

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,15 @@ $Binary = Join-Path $CargoTargetDir "$env:BUILD_PROFILE\agent-data-plane.exe"
3737
if (-not (Test-Path $Binary)) {
3838
throw "package-adp-zip: expected binary at '$Binary' (run windows-build-adp.ps1 first)"
3939
}
40+
# We _specifically_ use the underscore-separated name here because Cargo will build ADP with the underscore-separated name,
41+
# due to hyphens not being valid in module names, which means the PDB is named that way, too... but then it will post-process
42+
# the executable by itself to rename it to `agent-data-plane.exe`, while the PDB stays as `agent_data_plane.pdb`.
43+
#
44+
# We keep it this way when copying it because the PDB path is hardcoded into the executable with the underscore-separated name.
45+
$BinaryPDB = Join-Path $CargoTargetDir "$env:BUILD_PROFILE\agent_data_plane.pdb"
46+
if (-not (Test-Path $BinaryPDB)) {
47+
throw "package-adp-zip: expected PDB at '$BinaryPDB' (run windows-build-adp.ps1 first)"
48+
}
4049
foreach ($f in @("NOTICE", "LICENSE", "LICENSE-3rdparty.csv")) {
4150
if (-not (Test-Path $f)) {
4251
throw "package-adp-zip: missing '$f' in CWD ($RepoRoot)"
@@ -55,6 +64,7 @@ try {
5564
New-Item -ItemType Directory -Force (Join-Path $StageRoot "LICENSES") | Out-Null
5665

5766
Copy-Item -Force $Binary (Join-Path $StageRoot "bin\agent-data-plane.exe")
67+
Copy-Item -Force $BinaryPDB (Join-Path $StageRoot "bin\agent_data_plane.pdb")
5868
foreach ($f in @("NOTICE", "LICENSE", "LICENSE-3rdparty.csv")) {
5969
Copy-Item -Force $f (Join-Path $StageRoot $f)
6070
}

0 commit comments

Comments
 (0)