Skip to content

Commit

Permalink
Merge pull request #33 from Pkcs11Interop/appveyor-integration
Browse files Browse the repository at this point in the history
Added appveyor configuration
  • Loading branch information
jariq committed Oct 5, 2016
2 parents 16933b9 + 9f43718 commit 9ee928d
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
22 changes: 22 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
version: 3.2.0-{build}
init:
- ps:
environment:
matrix:
- Platform: net20
- Platform: net40
- Platform: net45
- Platform: sl5
- Platform: netstandard1.3
- Platform: monoandroid2.3
- Platform: xamarinios1.0
install:
- cmd: IF "%Platform%"=="monoandroid2.3" (powershell -File ./build/appveyor-install-android-sdk.ps1)
build_script:
- cmd: >-
cd build
./build-%Platform%.bat
artifacts:
- path: build/$(Platform)
name: $(Platform)
30 changes: 30 additions & 0 deletions build/appveyor-install-android-sdk.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
$AndroidToolPath = "${env:ProgramFiles(x86)}\Android\android-sdk\tools\android"

Function Get-AndroidSDKs() {
$output = & $AndroidToolPath list sdk --all
$sdks = $output |% {
if ($_ -match '(?<index>\d+)- (?<sdk>.+), revision (?<revision>[\d\.]+)') {
$sdk = New-Object PSObject
Add-Member -InputObject $sdk -MemberType NoteProperty -Name Index -Value $Matches.index
Add-Member -InputObject $sdk -MemberType NoteProperty -Name Name -Value $Matches.sdk
Add-Member -InputObject $sdk -MemberType NoteProperty -Name Revision -Value $Matches.revision
$sdk
}
}
$sdks
}

Function Install-AndroidSDK() {
[CmdletBinding()]
Param(
[Parameter(Mandatory=$true, Position=0)]
[PSObject[]]$sdks
)

$sdkIndexes = $sdks |% { $_.Index }
$sdkIndexArgument = [string]::Join(',', $sdkIndexes)
Echo 'y' | & $AndroidToolPath update sdk -u -a -t $sdkIndexArgument
}

$sdks = Get-AndroidSDKs |? { $_.name -like 'sdk platform*API 10*' -or $_.name -like 'google apis*api 10' }
Install-AndroidSDK -sdks $sdks

0 comments on commit 9ee928d

Please sign in to comment.