Skip to content

Commit

Permalink
init commit
Browse files Browse the repository at this point in the history
  • Loading branch information
cmccarthyIrl committed Mar 9, 2024
1 parent a82a3fc commit 3751ab1
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 30 deletions.
6 changes: 5 additions & 1 deletion .github/scripts/startEmulator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,15 @@ if [ -z "$ADB" ]; then
fi

# Add adb directory to PATH
export PATH="$(dirname $ADB):$PATH"
export PATH="$(dirname "$ADB"):$PATH"

echo "Start the ADB server"
$ADB start-server

# Install the chosen system image
echo "Install SDK System Image if not already installed..."
echo "y" | "$ANDROID_HOME"/cmdline-tools/latest/bin/sdkmanager --install "system-images;android-31;default;x86_64" --verbose

echo "Create AVD..."
echo "no" | "$ANDROID_HOME"/cmdline-tools/latest/bin/avdmanager -v create avd \
-n testRunnner \
Expand Down
41 changes: 12 additions & 29 deletions .github/workflows/run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,38 +14,21 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up JDK
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
distribution: 'temurin'
cache: maven

- name: Install Android SDK
run: |
sudo apt-get update
sudo apt-get install -y wget unzip
wget -q "https://dl.google.com/android/repository/commandlinetools-linux-7583922_latest.zip" -O android-sdk.zip
unzip -q android-sdk.zip -d $HOME/android-sdk
export ANDROID_HOME=$HOME/android-sdk
export PATH=$ANDROID_HOME/cmdline-tools/latest/bin:$ANDROID_HOME/platform-tools:$PATH
echo "y" | sdkmanager --install "platform-tools"
echo "y" | sdkmanager --install "emulator"
echo "y" | sdkmanager --install "system-images;android-31;default;x86_64"
export PATH=$ANDROID_HOME/emulator:$PATH
- name: Start emulator
- name: Start Emulator #
run: |
nohup emulator -avd testRunnner \
-skin 1080x1920 \
-no-snapshot \
-no-audio \
-no-boot-anim \
-accel auto \
-gpu auto \
-qemu -lcd-density 420 > /dev/null 2>&1 &
- name: Wait for emulator to be ready
run: adb wait-for-device
chmod +x ./.github/scripts/startEmulator.sh
./.github/scripts/startEmulator.sh
- name: List devices
run: adb devices
view_emulator_log:
needs: start_emulator
runs-on: ubuntu-latest
steps:
- name: View Emulator Log
run: cat emulator_log.txt

0 comments on commit 3751ab1

Please sign in to comment.