Skip to content

Commit

Permalink
google#730: Also upload 'libmozcjni.so' as artifacts
Browse files Browse the repository at this point in the history
This is a follow up to my commit [1], which enabled GitHub Actions
to upload build artifacts for Windows, macOS, and Linux but not for
Android.  This commit is to also support Android.

One interesting requirement for Android is that developers usually need
to build *.so for the following 4 architectures.

 - armeabi-v7a
 - arm64-v8a
 - x86
 - x86_64

With this commit, our GitHub Actions rule actually starts building
'libmozcjni.so' for the above 4 architectures, then archives them into
a single zip file and upload it as the final artifact.

 [1]: bb50663

PiperOrigin-RevId: 561867498
  • Loading branch information
yukawa authored and hiroyuki-komatsu committed Sep 1, 2023
1 parent cad4064 commit 5a6e457
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion .github/workflows/android.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,23 @@ jobs:
- name: build
working-directory: ./src
run: |
bazel build --config oss_android package
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

0 comments on commit 5a6e457

Please sign in to comment.