-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from Pkcs11Interop/appveyor-integration
Added appveyor configuration
- Loading branch information
Showing
2 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |