Skip to content

Commit

Permalink
Update device farm buildspec with manual Android SDK install
Browse files Browse the repository at this point in the history
  • Loading branch information
mattcreaser committed Dec 9, 2022
1 parent 3c8c5e7 commit bce2dcf
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
15 changes: 13 additions & 2 deletions scripts/devicefarm-test-runner-buildspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,25 @@ env:
phases:
install:
runtime-versions:
android: 29
nodejs: 12
python: 3.8
java: corretto11
commands:
- echo 'Install phase starting'
- npm install -g xunit-viewer
- pip3 install junit-xml
### INSTALL ANDROID 31
- export ANDROID_TOOLS_FILENAME="commandlinetools-linux-9123335_latest.zip"
- wget https://dl.google.com/android/repository/$ANDROID_TOOLS_FILENAME -P ~ > /dev/null
- unzip ~/$ANDROID_TOOLS_FILENAME -d ~ > /dev/null 2>&1
- mkdir -p /usr/local/android-sdk-linux/cmdline-tools
- mv ~/cmdline-tools /usr/local/android-sdk-linux/cmdline-tools/latest
- export PATH=/usr/local/android-sdk-linux/cmdline-tools/latest:/usr/local/android-sdk-linux/cmdline-tools/latest/bin:/usr/local/android-sdk-linux/platform-tools:$PATH
- export ANDROID_SDK_ROOT=/usr/local/android-sdk-linux
- yes | sdkmanager --licenses > /dev/null
- sdkmanager "platform-tools" "platforms;android-31" > /dev/null
- sdkmanager "build-tools;31.0.0" > /dev/null
### END INSTALL ANDROID 31
finally:
- echo 'Install phase completed.'
pre_build:
Expand Down Expand Up @@ -72,4 +83,4 @@ artifacts:
- '**/*'
name: DevicefarmTestRunReport
base-directory: 'build/reports/instrumented'
discard-paths: no
discard-paths: no
1 change: 0 additions & 1 deletion scripts/pr-builder-buildspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ phases:
- mv ~/cmdline-tools /usr/local/android-sdk-linux/cmdline-tools/latest
- export PATH=/usr/local/android-sdk-linux/cmdline-tools/latest:/usr/local/android-sdk-linux/cmdline-tools/latest/bin:/usr/local/android-sdk-linux/platform-tools:$PATH
- export ANDROID_SDK_ROOT=/usr/local/android-sdk-linux
- which sdkmanager
- yes | sdkmanager --licenses > /dev/null
- sdkmanager "platform-tools" "platforms;android-31" > /dev/null
- sdkmanager "build-tools;31.0.0" > /dev/null
Expand Down

0 comments on commit bce2dcf

Please sign in to comment.