-
Notifications
You must be signed in to change notification settings - Fork 6
39 lines (32 loc) · 1.06 KB
/
android-clang.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
name: Build for Android with Clang using the NDK
on:
workflow_dispatch:
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up JDK 21 environment
run: |
echo "export JAVA_HOME=$JAVA_HOME_21_X64" >> $GITHUB_ENV
echo "export PATH=$JAVA_HOME/bin:$PATH" >> $GITHUB_ENV
- name: Use the built-in Android NDK
run: |
echo "export ANDROID_NDK_HOME=/usr/local/lib/android/sdk/ndk/26.3.11579264" >> $GITHUB_ENV
echo "export PATH=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux/bin:$PATH" >> $GITHUB_ENV
- name: Build with Clang and Android NDK
run: |
mkdir -p build
cd build
cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_HOME/build/cmake/android.toolchain.cmake -DANDROID_ABI=arm64-v8a -DANDROID_PLATFORM=android-23 ..
make
- name: Upload binaries
uses: actions/upload-artifact@v4
with:
name: libgpu-linux-x86
path: |
build/source/arm_gpuinfo