-
Notifications
You must be signed in to change notification settings - Fork 2
63 lines (50 loc) · 2.07 KB
/
Android-test-cmake.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
# This is a basic workflow to help you get started with Actions
name: Android Test Build
# Controls when the workflow will run
# Triggers the workflow on push or pull request events and manually from the Actions tab
on:
workflow_dispatch:
env:
CMAKE_BUILD_PARALLEL_LEVEL: 8
jobs:
Android:
runs-on: ubuntu-latest
steps:
- name: Setup Git to make sure crlf -> lf
run: |
git config --global core.autocrlf false
git config --global core.eol lf
echo "ANDROID_TOOLCHAIN=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin" >> $GITHUB_ENV
echo "MAKEFLAGS=\"-j 8\"" >> $GITHUB_ENV
echo "ANDROID_NDK=$ANDROID_NDK_HOME" >> $GITHUB_ENV
echo "ANDROID_NDK_HOME=$ANDROID_NDK_HOME" >> $GITHUB_ENV
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
with:
submodules: 'recursive'
path: '.'
# ndk is already installed in Ubuntu 22
- name: Create Build Directory
run: cmake -E make_directory ${{github.workspace}}/.build
- name: Set PATH
run: echo "${{env.ANDROID_TOOLCHAIN}}" >> $GITHUB_PATH
- name: Configure CMake
env:
CC: clang
working-directory: ${{github.workspace}}/.build
run: |
export ANDROID_NDK=${{env.ANDROID_NDK_HOME}}
export ANDROID_NDK_HOME=${{env.ANDROID_NDK_HOME}}
export ANDROID_TOOLCHAIN=${{env.ANDROID_TOOLCHAIN}}
echo $PATH
export PATH=${{env.ANDROID_TOOLCHAIN}}:$PATH
echo $PATH
echo $CC
ls -la $ANDROID_TOOLCHAIN
echo "Check clang path:"
which clang
env
cmake -S ../build/Android/ -DANDROID_ABI="arm64-v8a" -DCMAKE_ANDROID_NDK=$ANDROID_NDK -DANDROID_TOOLCHAIN=clang
- name: Compile
working-directory: ${{github.workspace}}/.build
run: make Boost