Skip to content

Commit b2c0363

Browse files
authored
Add GitHub workflow action for Android build (#124)
1 parent fb603d6 commit b2c0363

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Copyright (c) Meta Platforms, Inc. and affiliates.
2+
# All rights reserved.
3+
#
4+
# This source code is licensed under the BSD-style license found in the
5+
# LICENSE file in the root directory of this source tree.
6+
7+
name: Android Build
8+
9+
on:
10+
push:
11+
branches: [main]
12+
pull_request:
13+
branches: [main]
14+
workflow_dispatch:
15+
16+
permissions:
17+
contents: read
18+
19+
jobs:
20+
build:
21+
runs-on: ubuntu-latest
22+
strategy:
23+
fail-fast: false
24+
matrix:
25+
include:
26+
- name: LlamaDemo
27+
path: llm/android/LlamaDemo
28+
- name: DeepLabV3Demo
29+
path: dl3/android/DeepLabV3Demo
30+
31+
name: Build ${{ matrix.name }}
32+
steps:
33+
- name: Checkout repository
34+
uses: actions/checkout@v4
35+
36+
- name: Set up JDK 17
37+
uses: actions/setup-java@v4
38+
with:
39+
java-version: '17'
40+
distribution: 'temurin'
41+
42+
- name: Setup Gradle
43+
uses: gradle/actions/setup-gradle@v4
44+
45+
- name: Build with Gradle
46+
working-directory: ${{ matrix.path }}
47+
run: ./gradlew build --no-daemon
48+
49+
- name: Upload build artifacts
50+
uses: actions/upload-artifact@v4
51+
with:
52+
name: ${{ matrix.name }}-apk
53+
path: ${{ matrix.path }}/app/build/outputs/apk/
54+
if-no-files-found: warn

0 commit comments

Comments
 (0)