Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ jobs:
-package `
-archive

- name: Upload SentryTower.exe
- name: Upload SentryTower
uses: actions/upload-artifact@v4
with:
name: SentryTower
path: checkout/Builds/Windows/SentryTower.exe
path: checkout/Builds/Windows/
retention-days: 90
28 changes: 23 additions & 5 deletions .github/workflows/run-demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,37 @@ jobs:
$runId = $runs.workflow_runs[0].id
echo "run-id=$runId" >> $env:GITHUB_OUTPUT

- name: Download SentryTower.exe
- name: Download SentryTower
id: download
uses: actions/download-artifact@v4
with:
name: SentryTower
github-token: ${{ secrets.GITHUB_TOKEN }}
repository: ${{ github.repository }}
run-id: ${{ steps.get-run.outputs.run-id }}

- name: Run simulation
- name: Run Simulation
run: |
.\SentryTower.exe -Unattended -nullrhi --idle
if ($LASTEXITCODE -eq 0) {
$downloadPath = "${{ steps.download.outputs.download-path }}"
Write-Output "Download path: $downloadPath"

# List files in download path
Write-Output "Files in download path:"
Get-ChildItem $downloadPath

$exePath = Join-Path $downloadPath "SentryTower.exe"
if (!(Test-Path $exePath)) {
Comment on lines +39 to +40
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Potential bug: The `run-demo` workflow uses an incorrect path to find the packaged executable, failing to account for the `WindowsNoEditor` subdirectory created during the build process.
  • Description: The Unreal Engine build process, using BuildCookRun with the -archive flag for the Win64 platform, packages the executable inside a WindowsNoEditor subdirectory. The run-demo.yml workflow downloads the build artifact but incorrectly attempts to find SentryTower.exe at the root of the downloaded directory. This path mismatch in the Join-Path command will cause the workflow to fail with a "file not found" error, preventing the demo from running.
  • Suggested fix: Update the path construction in run-demo.yml to include the WindowsNoEditor subdirectory created by the Unreal Engine build process. Change Join-Path $downloadPath "SentryTower.exe" to Join-Path $downloadPath "WindowsNoEditor" "SentryTower.exe".
    severity: 0.85, confidence: 0.98

Did we get this right? 👍 / 👎 to inform future reviews.

Write-Error "SentryTower.exe not found at: $exePath"
exit 1
}

Write-Output "Running: $exePath -Unattended -nullrhi --idle"
$process = Start-Process -FilePath $exePath -ArgumentList "-Unattended", "-nullrhi", "--idle" -Wait -PassThru -NoNewWindow
$exitCode = $process.ExitCode
Write-Output "Process completed. Exit code: $exitCode"

if ($exitCode -eq 0) {
Write-Error "Expected non-zero exit code but got 0"
exit 1
}
Write-Output "Simulation completed with expected non-zero exit code: $LASTEXITCODE"
Write-Output "Simulation completed with expected non-zero exit code: $exitCode"