3 Commits
Author SHA1 Message Date
Jonathan Beierle 62c36a2c9a Create build.yml 2026-08-04 14:52:53 -05:00
Jonathan Beierle bf80e4a71f Delete .github/workflows 2026-08-04 14:52:23 -05:00
Jonathan Beierle e4477ec15e Create workflows 2026-08-04 14:52:04 -05:00
+89
View File
@@ -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.