Skip to content

Commit

Permalink
Improve CI pipeline (#14)
Browse files Browse the repository at this point in the history
* add clean script and add IncludeOrderVersion

* Disable livecoding on build

* Rebuild lighting step

* setup editor frame rate

* add cleanup step
  • Loading branch information
filfreire authored Jul 31, 2023
1 parent e9e9a07 commit ba9264c
Show file tree
Hide file tree
Showing 10 changed files with 62 additions and 16 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ jobs:
runs-on: self-hosted

steps:

- name: Cleanup
run: rm -Recurse ${{github.workspace}}\*

- name: Clone repository
uses: actions/checkout@v3

Expand All @@ -46,6 +50,9 @@ jobs:
${{env.TEST_REPORT_FOLDER}}
Saved\Logs\${{env.TEST_LOGNAME}}
- name: Rebuild Lighting
run: .\scripts\RebuildLighting.bat $env:UNREAL_PATH (Get-Location).Path $env:PROJECT_NAME $env:TEST_SUITE_TO_RUN $env:TEST_REPORT_FOLDER $env:TEST_LOGNAME $env:UNREAL_EDITOR_CMD Preview P_TestMap

- name: Package
run: .\scripts\Package.bat $env:UNREAL_PATH (Get-Location).Path $env:PROJECT_NAME $env:TARGET_NAME $env:PACKAGE_FOLDER

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,4 @@ TestResults/*
# Package Results
PackageResults/*
PackageResults.zip
Platforms/HoloLens/Config/HoloLensEngine.ini
4 changes: 2 additions & 2 deletions Config/DefaultEditor.ini
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[/Script/AdvancedPreviewScene.SharedProfiles]

[/Script/AdvancedPreviewScene.SharedProfiles]

3 changes: 3 additions & 0 deletions Config/DefaultEditorPerProjectUserSettings.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[/Script/LiveCoding.LiveCodingSettings]
bEnabled=False
Startup=Manual
16 changes: 2 additions & 14 deletions Config/DefaultEngine.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,8 @@ AppliedDefaultGraphicsPerformance=Maximum
+ActiveGameNameRedirects=(OldGameName="TP_Blank",NewGameName="/Script/CoopGameFleep")
+ActiveGameNameRedirects=(OldGameName="/Script/TP_Blank",NewGameName="/Script/CoopGameFleep")
+ActiveClassRedirects=(OldClassName="TP_BlankGameModeBase",NewClassName="CoopGameFleepGameModeBase")

[/Script/AndroidFileServerEditor.AndroidFileServerRuntimeSettings]
bEnablePlugin=True
bAllowNetworkConnection=True
SecurityToken=4AA7F67A4EE0955756B64198D3305D3D
bIncludeInShipping=False
bAllowExternalStartInShipping=False
bCompileAFSProject=False
bUseCompression=False
bLogFiles=False
bReportStats=False
ConnectionType=USBOnly
bUseManualIPAddress=False
ManualIPAddress=
SmoothedFrameRateRange=(LowerBound=(Type=Exclusive,Value=60.000000),UpperBound=(Type=Exclusive,Value=200.000000))
MinDesiredFrameRate=60.000000

[/Script/UnrealEd.CookerSettings]
bCookOnTheFlyForLaunchOn=True
Expand Down
Binary file modified Content/Maps/P_TestMap.umap
Binary file not shown.
1 change: 1 addition & 0 deletions Source/CoopGameFleep.Target.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ public CoopGameFleepTarget( TargetInfo Target) : base(Target)
Type = TargetType.Game;
DefaultBuildSettings = BuildSettingsVersion.V2;
ExtraModuleNames.AddRange( new string[] { "CoopGameFleep" } );
IncludeOrderVersion = EngineIncludeOrderVersion.Latest;
}
}
1 change: 1 addition & 0 deletions Source/CoopGameFleepEditor.Target.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ public CoopGameFleepEditorTarget( TargetInfo Target) : base(Target)
Type = TargetType.Editor;
DefaultBuildSettings = BuildSettingsVersion.V2;
ExtraModuleNames.AddRange( new string[] { "CoopGameFleep" } );
IncludeOrderVersion = EngineIncludeOrderVersion.Latest;
}
}
5 changes: 5 additions & 0 deletions scripts/Clean.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
powershell -Command rm -Recurse "Binaries"
powershell -Command rm -Recurse "Build"
powershell -Command rm -Recurse "DerivedDataCache"
powershell -Command rm -Recurse "Intermediate"
powershell -Command rm -Recurse "Saved"
40 changes: 40 additions & 0 deletions scripts/RebuildLighting.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
:: reference from https://forums.unrealengine.com/t/build-lighting-from-command-line/297535
:: Not working using RunUAT.bat
:: RunUAT.bat RebuildLightmaps -project="E:\unreal\coop-game-fleep\CoopGameFleep.uproject" -noP4 -platform=Win64 -clientconfig=Development
:: Running AutomationTool...
:: Using bundled DotNet SDK version: 6.0.302
:: Starting AutomationTool...
:: Parsing command line: RebuildLightmaps -project=E:\unreal\coop-game-fleep\CoopGameFleep.uproject -noP4 -platform=Win64 -clientconfig=Development
:: Initializing script modules...
:: Total script module initialization time: 0.26 s.
:: Command RebuildLightMaps requires P4 functionality.
:: ERROR: System.ComponentModel.Win32Exception (2): An error occurred trying to start process 'p4.exe' with working directory 'E:\unreal\UE_5.2'. O sistema não conseguiu localizar o ficheiro especificado.
:: at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
:: at System.Diagnostics.Process.Start()
:: at AutomationTool.CommandUtils.Run(String App, String CommandLine, String Input, ERunOptions Options, Dictionary`2 Env, SpewFilterCallbackType SpewFilterCallback, String Identifier, String WorkingDir) in D:\build\++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\AutomationUtils\ProcessUtils.cs:line 915
:: at AutomationTool.P4Environment.DetectP4Port() in D:\build\++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\AutomationUtils\P4Environment.cs:line 269
:: at AutomationTool.P4Environment..ctor(CommandEnvironment CmdEnv) in D:\build\++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\AutomationUtils\P4Environment.cs:line 124
:: at AutomationTool.CommandUtils.InitP4Environment() in D:\build\++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\AutomationUtils\P4Utils.cs:line 990
:: at AutomationTool.Automation.ProcessAsync(ParsedCommandLine AutomationToolCommandLine, StartupTraceListener StartupListener, HashSet`1 ScriptModuleAssemblies) in D:\build\++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\AutomationUtils\Automation.cs:line 149
:: (see C:\Users\filipe\AppData\Roaming\Unreal Engine\AutomationTool\Logs\E+unreal+UE_5.2\Log.txt for full exception trace)
:: ERROR: Exception performing nothrow action "Kill All Processes": System.InvalidOperationException: No process is associated with this object.
:: at System.Diagnostics.Process.EnsureState(State state)
:: at System.Diagnostics.Process.get_HasExited()
:: at AutomationTool.ProcessResult.get_HasExited() in D:\build\++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\AutomationUtils\ProcessUtils.cs:line 419
:: at AutomationTool.ProcessManager.KillAll() in D:\build\++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\AutomationUtils\ProcessUtils.cs:line 122
:: at AutomationTool.Automation.<>c.<ProcessAsync>b__3_1() in D:\build\++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\AutomationUtils\Automation.cs:line 212
:: at AutomationTool.Automation.NoThrow(Action Action, String ActionDesc) in D:\build\++UE5\Sync\Engine\Saved\CsTools\Engine\Source\Programs\AutomationTool\AutomationUtils\Automation.cs:line 227
set ueLocation=%~1
set projectLocation=%~2
set projectName=%~3
set testSuiteToRun=%~4
set testReportFolder=%~5
set testLogName=%~6
set UnrealEditorCmd=%~7
set LightQuality=%~8
set MapToRebuild=%~9


:: "%ueLocation%\Engine\Binaries\Win64\%UnrealEditorCmd%" "%projectLocation%\%projectName%" -run=resavepackages -buildlighting -allowcommandletrendering -quality=%LightQuality%

"%ueLocation%\Engine\Binaries\Win64\%UnrealEditorCmd%" "%projectLocation%\%projectName%" -run=resavepackages -buildlighting -allowcommandletrendering -quality=%LightQuality% -map=%MapToRebuild%

0 comments on commit ba9264c

Please sign in to comment.