Skip to content

Commit 4de88e0

Browse files
committed
Build Windows PDB files during CI runs
1 parent aa3f78c commit 4de88e0

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

.github/workflows/ci-build.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,10 @@ jobs:
180180
else
181181
short_name=win32
182182
fi
183+
build_opts="$build_opts --relwithdebug"
183184
elif [ ${{ matrix.os }} == windows-11-arm ]; then
184185
short_name=win64
186+
build_opts="$build_opts --relwithdebug"
185187
fi
186188
echo "short_name=$short_name" >> "$GITHUB_OUTPUT"
187189
echo "canonical_id=$short_name-py${{ matrix.python-version }}-${{ matrix.architecture}}" >> "$GITHUB_OUTPUT"
@@ -249,6 +251,13 @@ jobs:
249251
cibuildwheel dist/wxPython-${{ env.VERSION }}.tar.gz --output-dir dist
250252
fi
251253
254+
- name: Build the PDB zipfile
255+
if: runner.os == 'Windows'
256+
env:
257+
WXPYTHON_BUILD_ARGS: ${{ steps.init.outputs.build_opts }}
258+
run: |
259+
python build.py build_pdbzip
260+
252261
- name: Simple smoke test
253262
run: |
254263
cd dist
@@ -265,6 +274,13 @@ jobs:
265274
name: wxPython-wheel-${{ steps.init.outputs.canonical_id }}
266275
path: dist/wxpython-*.whl
267276

277+
- name: Save pdb as job artifact
278+
uses: actions/upload-artifact@v4
279+
if: runner.os == 'Windows'
280+
with:
281+
name: pdb-${{ steps.init.outputs.canonical_id }}
282+
path: dist/wxPython-pdb-*.zip
283+
268284
build-documentation:
269285
name: Build wxPython documentation
270286
if: github.event_name == 'push'

build.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1945,7 +1945,12 @@ def cmd_build_pdbzip(options, args):
19451945
if not filenames:
19461946
msg('No PDB files found in ./wx!')
19471947
return
1948-
arch = 'win_amd64' if PYTHON_ARCH == '64bit' else 'win32'
1948+
if PYTHON_MACHINE == 'ARM64':
1949+
arch = 'win_arm64'
1950+
elif PYTHON_ARCH == '64bit':
1951+
arch = 'win_amd64'
1952+
else:
1953+
arch = 'win32'
19491954
pyver = 'py{}'.format(PYSHORTVER)
19501955
zipname = 'dist/{}-pdb-{}-{}-{}.zip'.format(baseName, cfg.VERSION, pyver, arch)
19511956
from zipfile import ZipFile, ZIP_DEFLATED

0 commit comments

Comments
 (0)