-
Notifications
You must be signed in to change notification settings - Fork 26
65 lines (55 loc) · 1.73 KB
/
build_linux_android.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
name: CI - Linux Android Compilation
on:
push:
branches:
- 'main'
- 'development'
pull_request:
branches:
- 'main'
- 'development'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: actions/checkout@v4
- name: Install auto tools
run: |
sudo apt-get install automake
- name: Download Android NDK and unzip
run: |
wget -q https://dl.google.com/android/repository/android-ndk-r27-linux.zip
unzip -q android-ndk-r27-linux.zip
- name: Set Up Build Environment, compile code for Android platform
run: |
echo "Set Up Build Environment"
export ANDROID_NDK_HOME="$PWD/android-ndk-r27"
export PATH="$PATH:$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/"
export CC=aarch64-linux-android34-clang
export CXX=aarch64-linux-android34-clang++
export AS=llvm-as
export LD=ld
export RANLIB=llvm-ranlib
export STRIP=llvm-strip
echo "Compile the source code"
chmod 777 gitcompile
make -v
./gitcompile --host=aarch64-linux-android
- name: Verify the compiled binaries
run: |
echo "Verify the compiled binaries"
Files=("src/.libs/libadsp_default_listener.so
src/.libs/libadsprpc.so
src/.libs/libcdsp_default_listener.so
src/.libs/libcdsprpc.so
src/.libs/libsdsp_default_listener.so
src/.libs/libsdsprpc.so
src/adsprpcd
src/cdsprpcd
src/sdsprpcd")
for File in $Files
do
if [ -f $File ] ; then echo $File " - Exists" ; else echo $File " - Not Exists" && exit -1 ; fi
done