Thumbnails generated asynchronously #35
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow uses actions that are not certified by GitHub. | |
# They are provided by a third-party and are governed by | |
# separate terms of service, privacy policy, and support | |
# documentation. | |
name: WindowsBuildAndRun | |
on: | |
push: | |
branches: [ "main", "main-lite" ] | |
paths: | |
- '**.cpp' | |
- '**.h' | |
- '**.vcxproj' | |
- '**.sln' | |
- '**.yml' | |
pull_request: | |
branches: [ "main", "main-lite" ] | |
paths: | |
- '**.cpp' | |
- '**.h' | |
- '**.vcxproj' | |
- '**.sln' | |
- '**.yml' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
# Cancel in-progress runs when a new workflow with the same group name is triggered | |
cancel-in-progress: true | |
env: | |
# Path to the solution file relative to the root of the project. | |
SOLUTION_FILE_PATH: "Coral.sln" | |
permissions: | |
contents: read | |
jobs: | |
build-and-run: | |
runs-on: windows-latest | |
strategy: | |
fail-fast: true # We want to run all configurations to see if the problem is for all of them or not | |
matrix: | |
build-configuration: [Debug, Release, EditorDebug, EditorRelease] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Add msbuild to PATH | |
uses: microsoft/setup-msbuild@v2 | |
- name: Build | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
run: msbuild /m /p:Configuration=${{matrix.build-configuration}} /p:Platform=x64 /p:LinkIncremental=false ${{env.SOLUTION_FILE_PATH}} | |
- name: Run Unit Tests | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
timeout-minutes: 10 | |
run: | | |
$processInfo = New-Object System.Diagnostics.ProcessStartInfo | |
$processInfo.FileName = "Games\ExampleGame\Build\x64\${{matrix.build-configuration}}\Lichgate.exe" | |
$processInfo.Arguments = "run_tests" | |
$processInfo.WorkingDirectory = $pwd | |
$processInfo.RedirectStandardOutput = $true | |
$processInfo.RedirectStandardError = $true | |
$processInfo.UseShellExecute = $false | |
$process = New-Object System.Diagnostics.Process | |
$process.StartInfo = $processInfo | |
$process.Start() | Out-Null | |
$output = $process.StandardOutput.ReadToEnd() + $process.StandardError.ReadToEnd() | |
$process.WaitForExit() | |
echo "Executable Output:" | |
echo $output | |
echo "Exit Code: " | |
echo $process.ExitCode | |
exit $process.ExitCode |