Build Android sample app with GitHub Actions (#810)

Summary:
Getting really pissed off with Travis and this has significantly shorter queue times.

Mind that this probably won't work until the Folly PR is merged.
Pull Request resolved: https://github.com/facebook/flipper/pull/810

Test Plan: CI

Reviewed By: mweststrate

Differential Revision: D19951126

Pulled By: passy

fbshipit-source-id: ed51ad5ec6d4df3a59784dbd31e7c1667593d04f
This commit is contained in:
Pascal Hartig
2020-02-19 04:34:25 -08:00
committed by Facebook Github Bot
parent 972277b031
commit a0cd6e3adb
2 changed files with 22 additions and 41 deletions

22
.github/workflows/android-sample.yml vendored Normal file
View File

@@ -0,0 +1,22 @@
name: Build Sample App
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Build with Gradle
run: ./gradlew :sample:assembleDebug
- name: upload artifact
uses: actions/upload-artifact@v1
with:
name: sample-app.apk
path: dist/Flipper-mac.zip

View File

@@ -90,44 +90,3 @@ matrix:
- IPHONESIMULATOR=$(xcodebuild -showsdks | grep -o "iphonesimulator[0-9]\\+\\.[0-9]\\+$") - IPHONESIMULATOR=$(xcodebuild -showsdks | grep -o "iphonesimulator[0-9]\\+\\.[0-9]\\+$")
- travis_wait xcodebuild build -workspace SampleSwift.xcworkspace -scheme SampleSwift -sdk $IPHONESIMULATOR -quiet > ./build.log - travis_wait xcodebuild build -workspace SampleSwift.xcworkspace -scheme SampleSwift -sdk $IPHONESIMULATOR -quiet > ./build.log
- tail -100 ./build.log - tail -100 ./build.log
- language: android
os: linux
dist: trusty
android:
components:
- tools
- platform-tools
- build-tools-27.0.3
- android-27
- extra-google-google_play_services
- extra-google-m2repository
- extra-android-m2repository
- addon-google_apis-google-27
licenses:
- android-sdk-preview-license-.+
- android-sdk-license-.+
- google-gdk-license-.+
cache:
directories:
- $HOME/.gradle/wrapper
- $HOME/.gradle/caches
- android/third-party/external
before_install:
- yes | sdkmanager "platforms;android-27"
- echo "y" | sdkmanager "cmake;3.6.4111459"
- wget -q https://dl.google.com/android/repository/android-ndk-r20-linux-x86_64.zip
- mkdir -p temp-android-ndk
- mv ./android-ndk-r20-linux-x86_64.zip temp-android-ndk
- cd temp-android-ndk
- unzip -q android-ndk-r20-linux-x86_64.zip
- export ANDROID_NDK_HOME=`pwd`/android-ndk-r20
- export PATH=${PATH}:${ANDROID_NDK_HOME}
- cd ../
script:
- ./gradlew :sample:assembleDebug
- ./gradlew :android:testDebugUnitTest :sample:testDebugUnitTest
- ./gradlew :tutorial:assembleDebug