Skip to content

Commit 653a35e

Browse files
authored
Update latest script (exp from AppVeyor settings)
1 parent 422fa38 commit 653a35e

File tree

1 file changed

+53
-10
lines changed

1 file changed

+53
-10
lines changed

appveyor.yml

Lines changed: 53 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,58 @@
1-
version: '{build}'
2-
image: Visual Studio 2015
3-
platform: x64
4-
1+
version: 4.0.{build}
2+
branches:
3+
only:
4+
- CE-3823
5+
- master
6+
- develop
7+
image: Visual Studio 2017
8+
environment:
9+
UNITYCI_SERIAL:
10+
secure: Z3eyCIiPfolQ2Q+C5CY8bztDLIDBFo3I0l0p1oGadZs=
11+
UNITYCI_USER_NAME:
12+
secure: ipyQlnYQJCFiSkP/gaES7K/9XtlOfSsbEAFZKjecyjA=
13+
UNITYCI_PASS:
14+
secure: zRW4OYumwMTBXCFL1NcjiA==
515
build_script:
6-
- ps: .\AppVeyorScripts\install.ps1
16+
- ps: >-
17+
$source = "https://download.unity3d.com/download_unity/b1a7e1fb4fa5/Windows64EditorInstaller/UnitySetup64.exe"
718
19+
$destination = ".\UnitySetup64.exe"
820
9-
clone_folder: c:\projects\pn-unity
21+
Invoke-WebRequest $source -OutFile $destination
22+
23+
Start-Process -FilePath ".\UnitySetup64.exe" -Wait -ArgumentList ('/S', '/Q')
24+
25+
Write-Host "$(date) UnitySetup64-2019.2.12 Installed"-ForegroundColor green
26+
27+
28+
DIR
29+
30+
31+
$DOCDIR = "c:\users\appveyor\AppData\Roaming"
32+
33+
Write-Host $DOCDIR
34+
35+
$TARGETDIR = "$DOCDIR\Unity"
1036
11-
test_script:
12-
- ps: .\AppVeyorScripts\test.ps1
13-
1437
15-
deploy: off
38+
if(!(Test-Path -Path $TARGETDIR )){
39+
New-Item -ItemType directory -Path $TARGETDIR
40+
}
41+
42+
43+
$TARGETDIR = "$DOCDIR\Unity\Certificates"
44+
45+
if(!(Test-Path -Path $TARGETDIR )){
46+
New-Item -ItemType directory -Path $TARGETDIR
47+
}
48+
49+
50+
Write-Host "Copying .\TravisScripts\CACerts.pem $TARGETDIR"
51+
52+
53+
copy ".\TravisScripts\CACerts.pem" "$TARGETDIR\CACerts.pem"
54+
55+
56+
DIR c:\users\appveyor\AppData\Roaming\Unity\Certificates
57+
test_script:
58+
- ps: "$env:Path += \";C:\\Program Files\\Unity\\Editor\"\n\nStart-Process -FilePath \"Unity.exe\" -Wait -ArgumentList ('-quit', '-batchmode', '-silent-crashes', '-nographics', '-logFile', 'c:\\projects\\unity\\PubNubUnity\\unity.txt', '-username', \"$env:UNITYCI_USER_NAME\", '-password', \"$env:UNITYCI_PASS\", '-serial', \"$env:UNITYCI_SERIAL\")\n\n#DIR c:\\projects\\unity\\PubNubUnity\n#Get-Content c:\\projects\\unity\\PubNubUnity\\unity.txt\n\nWrite-Host \"Opening Unity for tests\"\n\nStart-Process -FilePath \"Unity.exe\" -Wait -ArgumentList ('-batchmode', '-logFile', 'c:\\projects\\unity\\PubNubUnity\\unity.txt', '-runEditorTests', '-projectPath', 'c:\\projects\\unity\\PubNubUnity', '-testPlatform', 'editmode', '-testResults', 'c:\\projects\\unity\\PubNubUnity\\results.xml', '-username', \"$env:UNITYCI_USER_NAME\", '-password', \"$env:UNITYCI_PASS\", '-serial', \"$env:UNITYCI_SERIAL\")\n\nWrite-Host \"Checking for test results\"\n\nDIR c:\\projects\\unity\\PubNubUnity\n\n#Get-Content c:\\projects\\unity\\PubNubUnity\\unity.txt\n#Get-Content c:\\projects\\unity\\PubNubUnity\\results.xml\n#Get-Content c:\\projects\\unity\\PubNubUnity\\results1.xml\n\n$wc = New-Object 'System.Net.WebClient'\n$wc.UploadFile(\"https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)\", \"C:\\projects\\unity\\PubNubUnity\\results.xml\")\n\n\nStart-Process -FilePath \"Unity.exe\" -Wait -ArgumentList ('-batchmode', '-logFile', 'c:\\projects\\unity\\PubNubUnity\\unity.txt', '-runEditorTests', '-projectPath', 'c:\\projects\\unity\\PubNubUnity', '-testPlatform', 'playmode', '-testResults', 'c:\\projects\\unity\\PubNubUnity\\results2.xml', '-username', \"$env:UNITYCI_USER_NAME\", '-password', \"$env:UNITYCI_PASS\", '-serial', \"$env:UNITYCI_SERIAL\")\n\nDIR c:\\projects\\unity\\PubNubUnity\n#Get-Content c:\\projects\\unity\\PubNubUnity\\unity.txt\n#Get-Content c:\\projects\\unity\\PubNubUnity\\results3.xml\n#Get-Content c:\\projects\\unity\\PubNubUnity\\results2.xml\n\n$wc2 = New-Object 'System.Net.WebClient'\n$wc2.UploadFile(\"https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)\", \"C:\\projects\\unity\\PubNubUnity\\results2.xml\")\n\nStart-Process -FilePath \"Unity.exe\" -Wait -ArgumentList ('-batchmode', '-quit', '-returnlicense')\n\n[xml]$results = Get-Content \"C:\\projects\\unity\\PubNubUnity\\results.xml\"\n$failure = $results.SelectSingleNode(\"//test-run[@result='Failed(Child)']\")\nif ($failure -ne $null){\n Write-Host $failure.Attributes[\"failed\"].Value;\n} else {\n Write-Host \"$failure null\"\n}\n\nif (($failure -ne $null) -and ($failure.Attributes[\"failed\"].Value -gt 0)) \n{ \n \n $host.SetShouldExit(1)\n Write-Host \"Forcing build failure due to unit test failure(s)\"\n} else {\n Write-Host \"$failure val = 0\"\n}\n\n[xml]$results2 = Get-Content \"C:\\projects\\unity\\PubNubUnity\\results2.xml\"\n\n$failure2 = $results2.SelectSingleNode(\"/test-run/test-suite[@result='Failed']\")\nif ($failure2 -ne $null){\n Write-Host $failure2.Attributes[\"failed\"].Value;\n} else {\n Write-Host \"$failure2 null\"\n}\n\nif (($failure2 -ne $null) -and ($failure2.Attributes[\"failed\"].Value -gt 0))\n{ \n $host.SetShouldExit(1)\n Write-Host \"Forcing build failure due to integration test failure(s)\"\n} else {\n Write-Host \"$failure2 val = 0\"\n}"

0 commit comments

Comments
 (0)