HackerNoon.com
Published in

HackerNoon.com

TotalCloud BuildBot: A Cost-Efficient & Rapid Unity Build Pipeline Open Source Tool (Part 1)

The Analysis of Time and Cost of Unity Builds

  • Inability to handle complex build pipeline
  • Provides less control over the environment
  • Makes code signing difficult
  • Decreases collaboration in a team

The Cost Per Build Comparison: CircleCI Vs. Unity Cloud Vs. AWS

  • With CircleCI, it would cost anywhere between ~$249 USD to ~$449 USD per month
  • With Unity Cloud Build, it would cost ~$125 USD per month for the Pro Licence + few dollars for concurrent builds
  • With AWS, it would cost anywhere between ~$6 USD to $7 USD per month if you use EC2 instance with Windows Base AMI and i3.large machine

More on Why We Chose AWS Spot Instance with Windows AMI

How to Generate Unity Builds in AWS

If (!(Test-Path D:)) {Get-Disk | Where-Object IsOffline –Eq $True | Set-Disk –IsOffline $False$newdisk = @(get-disk | Where-Object partitionstyle -eq ‘raw’)$Labels = @(‘Jenkins’,’Other1',’Other2')for($i = 0; $i -lt $newdisk.Count ; $i++){$disknum = $newdisk[$i].Number$dl = get-Disk $disknum |Initialize-Disk -PartitionStyle GPT -PassThru |New-Partition -AssignDriveLetter -UseMaximumSizeFormat-Volume -driveletter $dl.Driveletter -FileSystem NTFS -NewFileSystemLabel $Labels[$i] -Confirm:$false}}
$uri_editor = “https://download.unity3d.com/download_unity/a9f86dcd79df/Windows64EditorInstaller/UnitySetup64-2017.3.0f3.exe" ;$uri_linux_support = “https://download.unity3d.com/download_unity/a9f86dcd79df/TargetSupportInstaller/UnitySetup-Linux-Support-for-Editor-2017.3.0f3.exe" ;$uri_mac_support = “https://download.unity3d.com/download_unity/a9f86dcd79df/TargetSupportInstaller/UnitySetup-Mac-Support-for-Editor-2017.3.0f3.exe" ;$out_editor = “C:\Users\Administrator\Documents\UnitySetup64.exe” ;$out_linux_support = “C:\Users\Administrator\Documents\UnitySetup-Linux-Support.exe” ;$out_mac_support = “C:\Users\Administrator\Documents\UnitySetup-Mac-Support.exe” ;$start_time = Get-Date ;$wc = New-Object System.Net.WebClient ;$wc.DownloadFile($uri_editor, $out_editor) ;Write-Output “Download complete, $out_editor > Time taken: $((Get-Date).Subtract($start_time).Seconds)s” ;$wc.DownloadFile($uri_linux_support, $out_linux_support) ;Write-Output “Download complete, $out_linux_support > Time taken: $((Get-Date).Subtract($start_time).Seconds)s” ;$wc.DownloadFile($uri_mac_support, $out_mac_support) ;Write-Output “Download complete, $out_mac_support > Time taken: $((Get-Date). Subtract($start_time).Seconds)s”;
C:\Development\Unity\Editor\Unity.exe -quit -batchmode -projectPath "D:\jenkins\workspace\unity-dev-build-4x"-buildWindows64Player "D:\jenkins\workspace\unity-dev-build-4x\builds\win\64\TotalCloud.exe" -buildOSXUniversalPlayer "D:\jenkins\workspace\unity-dev-build-4x\builds\osx\64\TotalCloud.app" -buildLinux64Player "D:\jenkins\workspace\unity-dev-build-4x\builds\linux\64\TotalCloud.x86_64" -logFile "D:\jenkins\workspace\unity-dev-build-4x\logs\35.txt" || EXIT /B 1

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Totalcloud.io

TotalCloud helps cloud engineers indulge in no-code AWS automation. We enable engineers to go script-less, saving more than 95% of engineering time.