forked from microsoft/onnxruntime-genai
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathem-test.yml
46 lines (40 loc) · 1.53 KB
/
em-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: "Check Android SDK and Emulator Installation"
on:
workflow_dispatch:
push:
branches:
- test
jobs:
check_android_sdk:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Set up environment variables
run: |
echo "ANDROID_SDK_ROOT=/usr/local/lib/android/sdk" >> $GITHUB_ENV
echo "ANDROID_HOME=/usr/local/lib/android/sdk" >> $GITHUB_ENV
- name: Install SDK Tools
run: |
sudo apt-get update
sudo apt-get install -y wget unzip
wget https://dl.google.com/android/repository/commandlinetools-linux-8512546_latest.zip -O cmdline-tools.zip
unzip cmdline-tools.zip -d $ANDROID_HOME/cmdline-tools
mv $ANDROID_HOME/cmdline-tools/cmdline-tools $ANDROID_HOME/cmdline-tools/latest
- name: Install Android Emulator
run: |
yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --sdk_root=$ANDROID_HOME --install "emulator"
- name: Verify Installation
run: |
echo "Checking if Android SDK and Emulator are installed..."
if [ -d "$ANDROID_SDK_ROOT" ]; then
echo "Android SDK is installed at $ANDROID_SDK_ROOT"
else
echo "Android SDK is not installed"
fi
emulator_path="$ANDROID_HOME/emulator/emulator"
if [ -f "$emulator_path" ]; then
echo "Android Emulator is installed at $emulator_path"
else
echo "Android Emulator is not installed"
fi