mirror of
https://github.com/HullaBrian/ttd-capa
synced 2026-08-09 12:08:34 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
62c36a2c9a | ||
|
|
bf80e4a71f | ||
|
|
e4477ec15e |
@@ -0,0 +1,89 @@
|
||||
name: build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master, metadata-decoding]
|
||||
tags: ['v*']
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: build-${{ github.ref }}
|
||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
||||
|
||||
jobs:
|
||||
extractor:
|
||||
# ttdcapa-extract.vcxproj pins PlatformToolset v145, which ships only with
|
||||
# Visual Studio 2026. windows-2025/windows-latest still carry VS 2022
|
||||
# (v143 only) and fail with MSB8020, so the VS 2026 image is required.
|
||||
# Fold this back into windows-2025 once that image carries VS 2026.
|
||||
runs-on: windows-2025-vs2026
|
||||
permissions:
|
||||
contents: write # needed by the tagged-release step below
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
# win32json is only needed to regenerate the API index, which is committed.
|
||||
# Cloning it costs several hundred MB for nothing on a normal build.
|
||||
submodules: false
|
||||
|
||||
- uses: microsoft/setup-msbuild@v2
|
||||
with:
|
||||
# Pin to the VS 2026 (18.x) install; vswhere would otherwise be free to
|
||||
# pick up an older side-by-side MSBuild that has no v145 toolset.
|
||||
vs-version: '[18.0,19.0)'
|
||||
|
||||
- uses: NuGet/setup-nuget@v2
|
||||
|
||||
- name: Cache NuGet packages
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ttd/packages
|
||||
key: nuget-${{ runner.os }}-${{ hashFiles('ttd/packages.config') }}
|
||||
|
||||
# packages.config-style restore: the .vcxproj imports the TTD and
|
||||
# nlohmann.json props/targets from ttd\packages\ by literal path.
|
||||
- name: Restore NuGet packages
|
||||
working-directory: ttd
|
||||
run: nuget restore packages.config -PackagesDirectory packages
|
||||
|
||||
- name: Build
|
||||
working-directory: ttd
|
||||
run: msbuild ttdcapa-extract.vcxproj /p:Configuration=Release /p:Platform=x64 /m /v:minimal
|
||||
|
||||
# The extractor delay-loads TTDReplay.dll and takes --ttd-dlls, so it links and
|
||||
# runs without Microsoft's replay DLLs present. They are not ours to redistribute;
|
||||
# a caller points at the copy WinDbg already installed.
|
||||
- name: Check it runs
|
||||
working-directory: ttd/bin/x64/Release
|
||||
run: |
|
||||
./ttdcapa-extract.exe --dump-sig CreateFileW
|
||||
if ($LASTEXITCODE -ne 0) { throw "dump-sig failed" }
|
||||
|
||||
- name: Stage artifacts
|
||||
run: |
|
||||
New-Item -ItemType Directory -Force dist | Out-Null
|
||||
Copy-Item ttd/bin/x64/Release/ttdcapa-extract.exe dist/
|
||||
Copy-Item ttd/data/win32-index.bin dist/
|
||||
Copy-Item docs/ttdcapa-extract.md dist/
|
||||
Get-ChildItem dist | Select-Object Name, Length
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ttdcapa-extract-x64
|
||||
path: dist/
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Publish release
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
files: dist/*
|
||||
body: |
|
||||
`ttdcapa-extract.exe` sweeps a TTD trace and writes a `.ttdb` report.
|
||||
|
||||
- `win32-index.bin` must sit beside the executable, or be passed with `--win32-index`.
|
||||
- `TTDReplay.dll` and `TTDReplayCPU.dll` are Microsoft's and are not redistributed
|
||||
here. Pass `--ttd-dlls <dir>` pointing at WinDbg's `amd64\ttd` folder, or place
|
||||
copies beside the executable.
|
||||
- `ttdcapa-extract.md` documents the command line and the `.ttdb` layout.
|
||||
Reference in New Issue
Block a user