Skip to content

Commit

Permalink
try to get android ci working
Browse files Browse the repository at this point in the history
  • Loading branch information
carsonRadtke committed Oct 11, 2024
1 parent b39e7e4 commit 1af193a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
23 changes: 16 additions & 7 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
name: CI_Android

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

on:
push:
branches: [ main ]
Expand All @@ -7,7 +12,7 @@ on:

jobs:
Android:
runs-on: macos-latest
runs-on: macos-latest-large
defaults:
run:
working-directory: build
Expand All @@ -18,15 +23,19 @@ jobs:
run: mkdir -p build
working-directory: .

- name: Start emulator
- uses: actions/setup-java@v4
with:
java-version: 8
distribution: zulu

- name: Start Emulator
run: |
echo "y" | $ANDROID_HOME/tools/bin/sdkmanager --install 'system-images;android-24;default;x86_64'
echo "no" | $ANDROID_HOME/tools/bin/avdmanager create avd -n xamarin_android_emulator -k 'system-images;android-24;default;x86_64' --force
$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 &
echo "Emulator starting"
echo "Starting emulator..."
$ANDROID_HOME/emulator/emulator -no-audio -no-snapshot -avd xamarin_android_emulator
echo "Emulator starting in background"
- name: Configure
run: cmake -Werror=dev -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_LATEST_HOME/build/cmake/android.toolchain.cmake -DANDROID_PLATFORM=16 -DANDROID_ABI=x86_64 -DCMAKE_BUILD_TYPE=Debug ..
Expand All @@ -35,11 +44,11 @@ jobs:
run: cmake --build . --parallel

- name: Wait for emulator ready
timeout-minutes: 2
run: |
$ANDROID_HOME/platform-tools/adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed | tr -d '\r') ]]; do sleep 10; done; input keyevent 82'
$ANDROID_HOME/platform-tools/adb devices
$ANDROID_HOME/platform-tools/adb shell getprop ro.product.cpu.abi
echo "Emulator started"
- name: Deploy tests
run: |
Expand Down
1 change: 1 addition & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ else()
-Wno-global-constructors # GTest
-Wno-missing-prototypes
-Wno-padded
-Wno-switch-default
-Wno-unknown-attributes
-Wno-used-but-marked-unused # GTest EXPECT_DEATH
-Wno-weak-vtables
Expand Down

0 comments on commit 1af193a

Please sign in to comment.