mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-17 17:57:03 +05:30
github: restructure CI test setup
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
parent
ddc504eb05
commit
ede879c550
4 changed files with 68 additions and 11 deletions
|
@ -7,12 +7,13 @@ set -euxo pipefail
|
|||
|
||||
[ -n "${ANDROID_SDK_ROOT}" ] || { echo "ANDROID_SDK_ROOT must be set to use this script"; exit 1; }
|
||||
|
||||
"${ANDROID_SDK_ROOT}"/cmdline-tools/latest/bin/avdmanager create avd \
|
||||
echo no | "${ANDROID_SDK_ROOT}"/cmdline-tools/latest/bin/avdmanager create avd \
|
||||
--force \
|
||||
-n Pixel_XL_API_30 \
|
||||
--abi 'google_apis/x86' \
|
||||
--package 'system-images;android-30;google_apis;x86' \
|
||||
--device 'pixel_xl'
|
||||
|
||||
"${ANDROID_SDK_ROOT}"/emulator/emulator \
|
||||
-avd Pixel_XL_API_30 \
|
||||
-no-window \
|
||||
|
|
25
scripts/setup_environment.sh
Executable file
25
scripts/setup_environment.sh
Executable file
|
@ -0,0 +1,25 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -euxo pipefail
|
||||
|
||||
CMDLINE_TOOLS_URL_MAC="https://dl.google.com/android/repository/commandlinetools-mac-6858069_latest.zip"
|
||||
CMDLINE_TOOLS_URL_LINUX="https://dl.google.com/android/repository/commandlinetools-linux-6858069_latest.zip"
|
||||
|
||||
if [ "$(uname)" == "Linux" ]; then
|
||||
wget "${CMDLINE_TOOLS_URL_LINUX}" -O /tmp/tools.zip -o /dev/null
|
||||
elif [ "$(uname)" == "Darwin" ]; then
|
||||
wget "${CMDLINE_TOOLS_URL_MAC}" -O /tmp/tools.zip -o /dev/null
|
||||
else
|
||||
echo "This script only works on Linux and Mac"
|
||||
exit 1
|
||||
fi
|
||||
unzip -qo /tmp/tools.zip -d "${ANDROID_SDK_ROOT}/latest"
|
||||
mkdir -p "${ANDROID_SDK_ROOT}/cmdline-tools"
|
||||
mv -v "${ANDROID_SDK_ROOT}/latest/cmdline-tools" "${ANDROID_SDK_ROOT}/cmdline-tools/latest"
|
||||
|
||||
export PATH="${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin:${PATH}"
|
||||
|
||||
sdkmanager --install 'build-tools;30.0.3' platform-tools 'platforms;android-30'
|
||||
sdkmanager --install emulator
|
||||
sdkmanager --install 'system-images;android-30;google_apis;x86'
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue