forked from notgiven688/jitterphysics
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
122 lines (106 loc) · 4.14 KB
/
appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
# build variables
os: Visual Studio 2015
configuration: Release
platform: Any CPU
environment:
LibraryVersion: 0.2.0
xamarin:
email:
secure: +SUXZSPLHwp39+Yh09d2xxVGsEgHtlSD4NT1Og5h3sg=
password:
secure: Tvdf5rZl6IOCwZbvyj9B2w==
android: true
ios: true
# versioning
version: $(LibraryVersion).{build}
assembly_info:
patch: true
file: '**\AssemblyInfo.*'
assembly_version: $(LibraryVersion).0
assembly_file_version: '{version}'
assembly_informational_version: '{version}-{branch}'
# packages
install:
- cinst 7zip -x86
- cinst 7zip.commandline -x86
- cinst xamarin-component -version 1.1.0.7
- ps: |
$tempDir="$pwd\temp"
$installerUrl="http://www.monogame.net/releases/v3.4/MonoGameSetup.exe"
$installerFile="$tempDir\MonoGameSetup.zip"
$installerExtracted="$tempDir\MonoGameSetup"
$programFiles = "${env:ProgramFiles(x86)}\"
Write-Host "Downloading MonoGame to $installerFile..."
If ((Test-Path $tempDir) -eq 0) {
New-Item -ItemType Directory $tempDir
}
Invoke-WebRequest $installerUrl -OutFile $installerFile
Write-Host "Extracting MonoGame to $installerExtracted..."
7z x -y $installerFile -o"$installerExtracted"
Write-Host "Copying the MonoGame content pipeline to $programFiles..."
Copy-Item "$installerExtracted\`$PROGRAMFILES\MSBuild\MonoGame" "$programFiles\MSBuild" -Recurse
# build
branches:
only:
- master
before_build:
- if not exist output mkdir output
- if not exist output\net4 mkdir output\net4
- if not exist output\Portable mkdir output\Portable
- nuget restore source\Jitter.sln
build:
project: source\Jitter.sln
verbosity: normal
after_build:
- ps: |
$ErrorActionPreference = "Stop"
$nugetVersion = "$env:APPVEYOR_BUILD_VERSION"
Write-Host "Copying the output files..."
copy source\Jitter\bin\net4\Release\Jitter.dll output\net4\
copy source\Jitter\bin\net4\Release\Jitter.pdb output\net4\
copy source\Jitter\bin\net4\Release\Jitter.xml output\net4\
copy source\Jitter\bin\Portable\Release\Jitter.dll output\Portable\
copy source\Jitter\bin\Portable\Release\Jitter.pdb output\Portable\
copy source\Jitter\bin\Portable\Release\Jitter.xml output\Portable\
Write-Host "Setting .nuspec version tag to $nugetVersion..."
$content = (Get-Content nuget\Jitter.nuspec)
$content = $content -replace '\$version\$', $nugetVersion
$content | Out-File nuget\Jitter.nuspec
nuget pack nuget\Jitter.nuspec -OutputDirectory output
Write-Host "Setting component.yaml version tag to $nugetVersion..."
$content = (Get-Content component\component.yaml)
$content = $content -replace '\$version\$', $nugetVersion
$content | Out-File component\component.yaml
xamarin-component package ./component/
mv component\*.xam output
test_script:
- ps: |
$ErrorActionPreference = "Stop"
Write-Host "Building the samples..."
nuget restore samples\JitterDemo\JitterDemo.sln
msbuild samples\JitterDemo\JitterDemo.sln /p:Configuration=$env:configuration /p:Platform="Any CPU"
If ($LastExitCode -ne 0) {
exit $LastExitCode
}
nuget restore samples\JitterOpenGLDemo\JitterOpenGLDemo.sln
msbuild samples\JitterOpenGLDemo\JitterOpenGLDemo.sln /p:Configuration=$env:configuration /p:Platform="Any CPU"
If ($LastExitCode -ne 0) {
exit $LastExitCode
}
nuget restore samples\JitterPhoneDemo\SimpleJitterPhoneDemo.sln
msbuild samples\JitterPhoneDemo\SimpleJitterPhoneDemo.sln /p:Configuration=$env:configuration /p:Platform="x86"
If ($LastExitCode -ne 0) {
exit $LastExitCode
}
nuget restore samples\JitterPortableSample\JitterSample.sln
msbuild samples\JitterPortableSample\JitterSample.sln /p:Configuration=$env:configuration /p:Platform="Any CPU"
If ($LastExitCode -ne 0) {
exit $LastExitCode
}
# artifacts
artifacts:
- path: output\
name: Jitter-$(APPVEYOR_BUILD_VERSION)
type: zip
- path: output\JitterPhysics*.nupkg
- path: output\JitterPhysics*.xam