forked from google/mozc
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (44 loc) · 1.63 KB
/
android.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: CI for Android
# https://github.com/google/mozc/blob/master/docs/build_mozc_in_docker.md
# Run on push.
on: push
permissions: read-all
# Prevent previous workflows from running.
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
build:
# https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2204-Readme.md
runs-on: ubuntu-22.04
timeout-minutes: 60
steps:
- name: checkout
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: setup
run: |
sudo apt-get update
- name: build
working-directory: ./src
run: |
mkdir android_artifacts
mkdir android_artifacts/armeabi-v7a
mkdir android_artifacts/arm64-v8a
mkdir android_artifacts/x86
mkdir android_artifacts/x86_64
bazel build --config oss_android package --cpu=armeabi-v7a
cp bazel-bin/android/jni/libmozcjni.so android_artifacts/armeabi-v7a/
bazel build --config oss_android package --cpu=arm64-v8a
cp bazel-bin/android/jni/libmozcjni.so android_artifacts/arm64-v8a/
bazel build --config oss_android package --cpu=x86
cp bazel-bin/android/jni/libmozcjni.so android_artifacts/x86/
bazel build --config oss_android package --cpu=x86_64
cp bazel-bin/android/jni/libmozcjni.so android_artifacts/x86_64/
- name: upload artifacts
uses: actions/upload-artifact@v3
with:
name: libmozcjni.so
path: src/android_artifacts/
if-no-files-found: warn