-
-
Notifications
You must be signed in to change notification settings - Fork 67
89 lines (72 loc) · 2.73 KB
/
Android_Build.yml
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: Android Build
on:
push:
branches:
- master
pull_request:
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
jobs:
x64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Fetch submodules
run: git submodule update --init --recursive
- name: Setup Vulkan SDK
uses: humbletim/[email protected]
with:
vulkan-query-version: latest
vulkan-use-cache: true
vulkan-components: Vulkan-Headers, Vulkan-Loader, SPIRV-Tools, Glslang
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'zulu' # See 'Supported distributions' for available options
java-version: '17'
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DBUILD_HYDRA_CORE=1 -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK_ROOT}/build/cmake/android.toolchain.cmake -DANDROID_ABI=x86_64 -DENABLE_VULKAN=0
- name: Build
run: |
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
mv ./build/libAlber.so ./src/pandroid/app/src/main/jniLibs/x86_64/
cd src/pandroid
./gradlew assembleDebug
cd ../..
- name: Upload executable
uses: actions/upload-artifact@v2
with:
name: Android APK (x86-64)
path: './src/pandroid/app/build/outputs/apk/debug/app-debug.apk'
arm64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Fetch submodules
run: git submodule update --init --recursive
- name: Setup Vulkan SDK
uses: humbletim/[email protected]
with:
vulkan-query-version: latest
vulkan-use-cache: true
vulkan-components: Vulkan-Headers, Vulkan-Loader, SPIRV-Tools, Glslang
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'zulu' # See 'Supported distributions' for available options
java-version: '17'
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DBUILD_HYDRA_CORE=1 -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK_ROOT}/build/cmake/android.toolchain.cmake -DANDROID_ABI=arm64-v8a -DENABLE_VULKAN=0 -DCMAKE_CXX_FLAGS="-march=armv8.1-a+crypto"
- name: Build
run: |
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
mv ./build/libAlber.so ./src/pandroid/app/src/main/jniLibs/arm64-v8a/
cd src/pandroid
./gradlew assembleDebug
cd ../..
- name: Upload executable
uses: actions/upload-artifact@v2
with:
name: Android APK (arm64)
path: './src/pandroid/app/build/outputs/apk/debug/app-debug.apk'