Skip to content

fix: never pick an engine's map compiler as the game; name RTX Remix #35

fix: never pick an engine's map compiler as the game; name RTX Remix

fix: never pick an engine's map compiler as the game; name RTX Remix #35

Workflow file for this run

name: build
on:
push:
branches: [main]
tags: ["v*"]
pull_request:
branches: [main]
workflow_dispatch:
permissions:
contents: write
jobs:
test-and-build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
# The suite is deliberately offline: no network, no game, no GPU.
# If it needs any of those on CI, that is a bug in the test, not in CI.
- name: Run the offline test suite
run: python tests/test_all.py
# AGENTS.md is a contract for automated callers: a drifted flag or exit
# code there is worse than no document, so it is checked against the
# real CLI on every push.
- name: Check AGENTS.md against the real CLI
run: python tests/test_agents_doc.py
# The in-game control panel is a real ReShade add-on (C++). MSVC is
# preinstalled on windows-latest; this compiles addon/dlss5kit.addon64
# so build.py bundles it into the exe.
- uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64
- name: Build the in-game control panel add-on
shell: cmd
working-directory: addon
run: |
cl /nologo /std:c++17 /O2 /W4 /EHsc /LD /DNDEBUG dlss5kit_addon.cpp /link /OUT:dlss5kit.addon64 user32.lib
- name: Verify the add-on
shell: pwsh
working-directory: addon
run: |
if (-not (Test-Path "dlss5kit.addon64")) { throw "dlss5kit.addon64 was not produced" }
$kb = (Get-Item "dlss5kit.addon64").Length / 1KB
if ($kb -lt 50) { throw "dlss5kit.addon64 is only $kb KB - the build is incomplete" }
Write-Host ("addon built {0:N0} KB" -f $kb)
- name: Build the executable
run: |
python -m pip install --upgrade pip
python -m pip install pyinstaller
python build.py
# A PyInstaller run can "succeed" and still produce nothing useful, so
# the artifact is checked before it is published. The shipped artifact
# is the ZIPPED FOLDER, not a one-file exe: measured on VirusTotal,
# onefile scored 6/70 (Trojan:Win32/Wacatac.B!ml) while the zipped
# onedir build scores 1/70 with Microsoft clean. Same code either way.
- name: Verify the build
shell: pwsh
run: |
$exe = "dist/DLSS5Kit/DLSS5Kit.exe"
if (-not (Test-Path $exe)) { throw "$exe was not produced" }
$mb = (Get-Item $exe).Length / 1MB
if ($mb -lt 1) { throw "the launcher is only $mb MB - build incomplete" }
$zip = Get-ChildItem "dist/DLSS5Kit-*-win64.zip" -ErrorAction SilentlyContinue
if (-not $zip) { throw "the release zip was not produced" }
$zmb = $zip.Length / 1MB
if ($zmb -lt 5) { throw "the zip is only $zmb MB - build incomplete" }
Write-Host ("launcher {0:N1} MB, zip {1:N1} MB" -f $mb, $zmb)
# The version resource is the thing that halved AV detections;
# a build that silently loses it must not ship.
$vi = (Get-Item $exe).VersionInfo
if (-not $vi.CompanyName) { throw "version resource missing: CompanyName empty" }
if (-not $vi.FileVersion) { throw "version resource missing: FileVersion empty" }
Write-Host ("metadata: {0} / {1}" -f $vi.CompanyName, $vi.FileVersion)
& $exe --version
if ($LASTEXITCODE -ne 0) { throw "--version failed" }
- uses: actions/upload-artifact@v4
with:
name: DLSS5Kit
path: dist/DLSS5Kit-*-win64.zip
- name: Attach the build to the release
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v2
with:
files: dist/DLSS5Kit-*-win64.zip
generate_release_notes: true