Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromelaban committed Jul 3, 2019
1 parent 7aeced3 commit b71bed2
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 29 deletions.
40 changes: 40 additions & 0 deletions .azure-devops-android-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
jobs:

- job: Android_Tests
variables:
CI_Build: true
SourceLinkEnabled: false

pool:
vmImage: 'macOS-10.14'

steps:
- checkout: self
clean: true

- bash: /bin/bash -c "sudo $AGENT_HOMEDIRECTORY/scripts/select-xamarin-sdk.sh 5_18_1"
displayName: Select Xamarin Version

- bash: |
chmod +x $(build.sourcesdirectory)/build/macos-setup-android.sh
$(build.sourcesdirectory)/build/macos-setup-android.sh
displayName: Create Android simulator
- task: NuGetToolInstaller@0
inputs:
versionSpec: 4.7.0
checkLatest: false

- task: MSBuild@1
inputs:
solution: src/SamplesApp/SamplesApp.Droid/SamplesApp.Droid.csproj
msbuildLocationMethod: version
msbuildVersion: latest
msbuildArchitecture: x86
msbuildArguments: /r /p:Configuration=Release /detailedsummary /bl:$(build.artifactstagingdirectory)/build-android.binlog
clean: false
maximumCpuCount: true
restoreNugetPackages: false
logProjectEvents: false
createLogFile: false
29 changes: 0 additions & 29 deletions .azure-devops-macos.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,5 @@
jobs:

- job: macOS_Tests
variables:
CI_Build: true
SourceLinkEnabled: false

pool:
vmImage: 'macOS-10.14'

steps:
- checkout: self
clean: true

- bash: /bin/bash -c "sudo $AGENT_HOMEDIRECTORY/scripts/select-xamarin-sdk.sh 5_18_1"
displayName: Select Xamarin Version

- bash: |
sdkmanager "system-images;android-21;default;armeabi-v7a" && echo "no" | avdmanager create avd -n test -k "system-images;android-21;default;armeabi-v7a"
displayName: Create Android simulator
- bash: |
cd ${ANDROID_HOME}/emulator;ls
export LD_LIBRARY_PATH=${ANDROID_HOME}/emulator/lib64:${ANDROID_HOME}/emulator/lib64/qt/lib
emulator -avd test -no-window -noaudio -no-boot-anim -no-window -accel on
displayName: Start Android simulator
- job: macOS
variables:
CI_Build: true
Expand Down
1 change: 1 addition & 0 deletions .vsts-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ resources:
jobs:
- template: .azure-devops-wasm-uitests.yml
- template: .azure-devops-macos.yml
- template: .azure-devops-android-tests.yml

- job: VS_Latest

Expand Down
19 changes: 19 additions & 0 deletions build/macos-setup-android.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env bash

# Install AVD files
echo "y" | $ANDROID_HOME/tools/bin/sdkmanager --install 'system-images;android-28;google_apis;x86'

# Create emulator
echo "no" | $ANDROID_HOME/tools/bin/avdmanager create avd -n xamarin_android_emulator -k 'system-images;android-28;google_apis;x86' --force

echo $ANDROID_HOME/emulator/emulator -list-avds

echo "Starting emulator"

# Start emulator in background
nohup $ANDROID_HOME/emulator/emulator -avd xamarin_android_emulator -no-snapshot > /dev/null 2>&1 &
$ANDROID_HOME/platform-tools/adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed | tr -d '\r') ]]; do sleep 1; done; input keyevent 82'

$ANDROID_HOME/platform-tools/adb devices

echo "Emulator started"

0 comments on commit b71bed2

Please sign in to comment.