Skip to content

Commit

Permalink
CI again
Browse files Browse the repository at this point in the history
  • Loading branch information
llafuente committed Jan 13, 2017
1 parent 7a62a3d commit 1926a4d
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 53 deletions.
4 changes: 2 additions & 2 deletions Scripts/ci-linux-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ set -ex
UNITY_TEST_TOOL_BRANCH=5.5

wget -O unity-editor.deb 'http://beta.unity3d.com/download/59c25c92588f/unity-editor_amd64-5.5.0xp1Linux.deb'
dpkg -i unity-editor.deb
sudo dpkg -i unity-editor.deb

# fix dependencies broken by installing Unity
apt-get -y -f install
sudo apt-get -y -f install


curl -o "UnityTestTools.tar.bz2" "https://bitbucket.org/Unity-Technologies/unitytesttools/get/${UNITY_TEST_TOOL_BRANCH}.tar.bz2"
Expand Down
41 changes: 41 additions & 0 deletions Scripts/ci-windows-install.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
Write-Host "$(date) Start build script"-ForegroundColor green

Invoke-WebRequest "http://netstorage.unity3d.com/unity/01f4c123905a/Windows64EditorInstaller/UnitySetup64-5.4.3f1.exe" -OutFile .\UnitySetup64.exe

Start-Process -FilePath ".\UnitySetup64.exe" -Wait -ArgumentList ('/S', '/Q')

Write-Host "$(date) Unity Installed"-ForegroundColor green

Invoke-WebRequest "http://ahkscript.org/download/ahk-install.exe" -OutFile .\ahk-installer.exe

Start-Process -FilePath ".\ahk-installer.exe" -Wait -ArgumentList ('/S')

Write-Host "$(date) AHK Installed"-ForegroundColor green

Invoke-WebRequest "https://bitbucket.org/Unity-Technologies/unitytesttools/get/5.3.zip" -OutFile .\UnityTestTools.zip

Expand-Archive .\UnityTestTools.zip .

Move-Item Unity-Technologies-unitytesttools-*\Assets\UnityTestTools C:\projects\unity-platformer\Assets\UnityTestTools

Write-Host "$(date) UnityTestTools Installed"-ForegroundColor green

$password = $env:UNITY_PASSWORD

$password = $password -split ''

$pass_commands = "Send, {" + ($password[1..($password.Length-2)] -join "}`nSleep, 100`nSend, {") + "}`n"

$username = $env:UNITY_USERNAME

$username = $username -split ''

$user_commands = "Send, {" + ($username[1..($username.Length-2)] -join "}`nSleep, 100`nSend, {") + "}`n"

(Get-Content C:\projects\unity-platformer\Scripts\unity.ahk).replace('; username', $user_commands).replace('; password', $pass_commands) | Set-Content C:\projects\unity-platformer\unity.ahk

$env:Path += ";C:\Program Files\AutoHotkey"

Start-Process -FilePath "AutoHotkey.exe" -Wait -ArgumentList ('C:\projects\unity-platformer\unity.ahk')

Write-Host "$(date) Unity login bypassed"-ForegroundColor green
7 changes: 7 additions & 0 deletions Scripts/ci-windows-test.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Write-Host "$(date) Start test script"-ForegroundColor green

$env:Path += ";C:\Program Files\Unity\Editor"

Start-Process -FilePath "Unity.exe" -Wait -ArgumentList ('-batchmode', '-nographics', '-projectPath', 'C:\projects\unity-platformer', '-runEditorTests', '-editorTestsResultFile', 'C:\projects\unity-platformer\unit-test-results.xml', '-editorTestsFilter', 'UnityPlatformer', '-logFile', 'C:\projects\unity-platformer\log-unit-test.txt', '-quit')

Write-Host "$(date) Upload result"-ForegroundColor green
54 changes: 3 additions & 51 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,61 +7,14 @@ platform: x64
install:
- appveyor DownloadFile https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-desktop.ps1
- ps: .\enable-desktop
- ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))

build_script:
- ps: >
Write-Host "$(date) Start build script"-ForegroundColor green
Invoke-WebRequest "http://netstorage.unity3d.com/unity/01f4c123905a/Windows64EditorInstaller/UnitySetup64-5.4.3f1.exe" -OutFile .\UnitySetup64.exe
Start-Process -FilePath ".\UnitySetup64.exe" -Wait -ArgumentList ('/S', '/Q')
Write-Host "$(date) Unity Installed"-ForegroundColor green
Invoke-WebRequest "http://ahkscript.org/download/ahk-install.exe" -OutFile .\ahk-installer.exe
Start-Process -FilePath ".\ahk-installer.exe" -Wait -ArgumentList ('/S')
Write-Host "$(date) AHK Installed"-ForegroundColor green
Invoke-WebRequest "https://bitbucket.org/Unity-Technologies/unitytesttools/get/5.3.zip" -OutFile .\UnityTestTools.zip
Expand-Archive .\UnityTestTools.zip .
Move-Item Unity-Technologies-unitytesttools-*\Assets\UnityTestTools C:\projects\unity-platformer\Assets\UnityTestTools
Write-Host "$(date) UnityTestTools Installed"-ForegroundColor green
$password = $env:UNITY_PASSWORD
$password = $password -split ''
$pass_commands = "Send, {" + ($password[1..($password.Length-2)] -join "}`nSleep, 100`nSend, {") + "}`n"
$username = $env:UNITY_USERNAME
$username = $username -split ''
$user_commands = "Send, {" + ($username[1..($username.Length-2)] -join "}`nSleep, 100`nSend, {") + "}`n"
(Get-Content C:\projects\unity-platformer\Scripts\unity.ahk).replace('; username', $user_commands).replace('; password', $pass_commands) | Set-Content C:\projects\unity-platformer\unity.ahk
$env:Path += ";C:\Program Files\AutoHotkey"
Start-Process -FilePath "AutoHotkey.exe" -Wait -ArgumentList ('C:\projects\unity-platformer\unity.ahk')
Write-Host "$(date) Unity login bypassed"-ForegroundColor green
- ps: .\Scripts\ci-windows-install.ps1

test_script:
- ps: .\Scripts\ci-windows-test.ps1
- ps: >
Write-Host "$(date) Start test script"-ForegroundColor green
$env:Path += ";C:\Program Files\Unity\Editor"
Start-Process -FilePath "Unity.exe" -Wait -ArgumentList ('-batchmode', '-nographics', '-projectPath', 'C:\projects\unity-platformer', '-runEditorTests', '-editorTestsResultFile', 'C:\projects\unity-platformer\unit-test-results.xml', '-editorTestsFilter', 'UnityPlatformer', '-logFile', 'C:\projects\unity-platformer\log-unit-test.txt', '-quit')
Write-Host "$(date) Upload result"-ForegroundColor green
$wc = New-Object 'System.Net.WebClient'
$wc.UploadFile("https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)", "C:\projects\unity-platformer\unit-test-results.xml")
Expand All @@ -78,6 +31,5 @@ environment:

# try to debug!
on_finish:
- ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
- appveyor PushArtifact C:\projects\unity-platformer\log-unit-test.txt
- appveyor PushArtifact C:\projects\unity-platformer\unit-test-results.xml

0 comments on commit 1926a4d

Please sign in to comment.