50 lines
1.5 KiB
YAML
50 lines
1.5 KiB
YAML
name: PullRequest
|
|
|
|
on: [pull_request]
|
|
|
|
jobs:
|
|
buildTest:
|
|
name: Build
|
|
runs-on: macOS-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2.3.4
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Install Android SDK
|
|
uses: malinskiy/action-android/install-sdk@release/0.1.0
|
|
- name: Install prerequisite brew
|
|
run: |
|
|
brew install opencv@3
|
|
brew install python
|
|
python --version
|
|
- name: Install prerequisite Python
|
|
run: |
|
|
python --version |
|
|
pip install --user six
|
|
pip install numpy
|
|
- name: Build project
|
|
run: |
|
|
export ANDROID_HOME=/Users/runner/Library/Android/sdk
|
|
export ANDROID_NDK_HOME=$ANDROID_HOME/ndk-bundle
|
|
echo a | ./build_android_examples.sh
|
|
- name: Show result
|
|
run: git status
|
|
- name: Find Tag
|
|
id: tagger
|
|
uses: jimschubert/query-tag-action@v2
|
|
with:
|
|
skip-unshallow: 'true'
|
|
abbrev: false
|
|
commit-ish: HEAD
|
|
- name: Rename AAR
|
|
run: find bazel-bin/mediapipe/ -name *aar.aar -exec mv {} {}_${{steps.tagger.outputs.tag}}.aar \;
|
|
- name: Get Version
|
|
run: git describe --tags
|
|
- name: Archive AAR ${{steps.tagger.outputs.tag}}
|
|
uses: actions/upload-artifact@v2.2.1
|
|
if: ${{ always() }}
|
|
with:
|
|
name: AAR-library-${{steps.tagger.outputs.tag}}
|
|
path: bazel-bin/mediapipe//examples/android/src/java/com/google/mediapipe/apps/**/*.aar
|