13 working-directory: build
15 - uses: actions/checkout@v2
17 - name: Create build directory
21 - name: Start emulator
23 echo "y" | $ANDROID_HOME/tools/bin/sdkmanager --install 'system-images;android-24;default;x86_64'
24 echo "no" | $ANDROID_HOME/tools/bin/avdmanager create avd -n xamarin_android_emulator -k 'system-images;android-24;default;x86_64' --force
25 $ANDROID_HOME/emulator/emulator -list-avds
26 echo "Starting emulator"
27 # Start emulator in background
28 nohup $ANDROID_HOME/emulator/emulator -avd xamarin_android_emulator -no-snapshot > /dev/null 2>&1 &
29 echo "Emulator starting"
32 run: cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_HOME/ndk-bundle/build/cmake/android.toolchain.cmake -DANDROID_PLATFORM=16 -DANDROID_ABI=x86_64 -DCMAKE_BUILD_TYPE=Debug ..
35 run: cmake --build . --parallel
37 - name: Wait for emulator ready
39 $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'
40 $ANDROID_HOME/platform-tools/adb devices
41 $ANDROID_HOME/platform-tools/adb shell getprop ro.product.cpu.abi
42 echo "Emulator started"
46 adb push tests /data/local/tmp
47 adb shell find /data/local/tmp/tests -maxdepth 1 -exec chmod +x {} \\\;
50 run: adb shell find /data/local/tmp/tests -name "*_tests" -maxdepth 1 -exec {} \\\;