release: Include pdb in Visual Studio release artifacts + build in C:\temp

This commit is contained in:
Anonymous Maarten 2024-05-03 22:36:23 +02:00 committed by Anonymous Maarten
parent 45081db9d4
commit 9b0203d9b1
2 changed files with 12 additions and 7 deletions

View File

@ -247,14 +247,14 @@ jobs:
- name: 'Unzip ${{ needs.src.outputs.src-zip }}'
id: zip
run: |
mkdir C:\zipdir
cd C:\zipdir
New-Item C:\temp -ItemType Directory -ErrorAction SilentlyContinue
cd C:\temp
unzip "${{ github.workspace }}/${{ needs.src.outputs.src-zip }}"
echo "path=C:\zipdir\${{ needs.src.outputs.project }}-${{ needs.src.outputs.version }}" >>$Env:GITHUB_OUTPUT
echo "path=C:\temp\${{ needs.src.outputs.project }}-${{ needs.src.outputs.version }}" >>$Env:GITHUB_OUTPUT
- name: 'Build MSVC binary archives'
id: releaser
run: |
python build-scripts/build-release.py `
python build-scripts/build-release.py `
--create win32 `
--commit ${{ inputs.commit }} `
--project SDL3 `
@ -478,4 +478,4 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: android
path: '${{ github.workspace }}/dist'
path: '${{ github.workspace }}/dist'

View File

@ -24,7 +24,7 @@ import zipfile
logger = logging.getLogger(__name__)
VcArchDevel = collections.namedtuple("VcArchDevel", ("dll", "imp", "test"))
VcArchDevel = collections.namedtuple("VcArchDevel", ("dll", "pdb", "imp", "test"))
GIT_HASH_FILENAME = ".git-hash"
ANDROID_AVAILABLE_ABIS = [
@ -456,10 +456,12 @@ class Releaser:
def build_vs(self, arch: str, platform: str, vs: VisualStudio, configuration: str="Release"):
dll_path = self.root / f"VisualC/SDL/{platform}/{configuration}/{self.project}.dll"
pdb_path = self.root / f"VisualC/SDL/{platform}/{configuration}/{self.project}.pdb"
imp_path = self.root / f"VisualC/SDL/{platform}/{configuration}/{self.project}.lib"
test_path = self.root / f"VisualC/SDL_test/{platform}/{configuration}/{self.project}_test.lib"
dll_path.unlink(missing_ok=True)
pdb_path.unlink(missing_ok=True)
imp_path.unlink(missing_ok=True)
test_path.unlink(missing_ok=True)
@ -473,11 +475,13 @@ class Releaser:
if self.dry:
dll_path.parent.mkdir(parents=True, exist_ok=True)
dll_path.touch()
pdb_path.touch()
imp_path.touch()
test_path.parent.mkdir(parents=True, exist_ok=True)
test_path.touch()
assert dll_path.is_file(), "SDL3.dll has not been created"
assert pdb_path.is_file(), "SDL3.pdb has not been created"
assert imp_path.is_file(), "SDL3.lib has not been created"
assert test_path.is_file(), "SDL3_test.lib has not been created"
@ -492,7 +496,7 @@ class Releaser:
self._zip_add_git_hash(zip_file=zf)
self.artifacts[f"VC-{arch}"] = zip_path
return VcArchDevel(dll=dll_path, imp=imp_path, test=test_path)
return VcArchDevel(dll=dll_path, pdb=pdb_path, imp=imp_path, test=test_path)
def build_vs_devel(self, arch_vc: dict[str, VcArchDevel]):
zip_path = self.dist_path / f"{self.project}-devel-{self.version}-VC.zip"
@ -514,6 +518,7 @@ class Releaser:
for arch, binaries in arch_vc.items():
zip_file(zf, path=binaries.dll, arcrelpath=f"lib/{arch}/{binaries.dll.name}")
zip_file(zf, path=binaries.imp, arcrelpath=f"lib/{arch}/{binaries.imp.name}")
zip_file(zf, path=binaries.pdb, arcrelpath=f"lib/{arch}/{binaries.pdb.name}")
zip_file(zf, path=binaries.test, arcrelpath=f"lib/{arch}/{binaries.test.name}")
zip_directory(zf, directory=self.root / "include/SDL3", arcrelpath="include/SDL3")