-
Notifications
You must be signed in to change notification settings - Fork 43
73 lines (68 loc) · 2.14 KB
/
ci.yml
File metadata and controls
73 lines (68 loc) · 2.14 KB
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
name: CI
on: [push,pull_request]
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
jobs:
build:
strategy:
matrix:
abi: [armeabi-v7a,arm64-v8a,x86,x86_64]
#os: [ubuntu-latest,macos-latest]
os: [ubuntu-latest]
ndk_version: [28.1.13356709]
include:
# includes a new variable of 'variation' for each host os
- os: ubuntu-latest
variation: linux
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Sources
uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Setup Android Environment
uses: android-actions/setup-android@v2
- name: Install Android NDK
run: sdkmanager --install "ndk;${{ matrix.ndk_version }}"
- name: Setup Environment Variables
run: |
set -x
export NDK_ROOT=${ANDROID_SDK_ROOT}/ndk/${{ matrix.ndk_version }}
echo "::set-env name=NDK_ROOT::$NDK_ROOT"
export NCPU=`python -c 'import multiprocessing as mp; print(mp.cpu_count())'`
echo "::set-env name=NCPU::$NCPU"
set
mkdir -p archive
mkdir -p logs
- name: Build libraries for Android on ${{ matrix.variation }}
run: |
export PATH=$NDK_ROOT:$PATH
export ARCHS="${{ matrix.abi }}"
./build.sh
- name: Prepare Binaries
run: |
set -x
mv ${{ matrix.abi }}/include ${GITHUB_WORKSPACE}/archive/ || true
mv ${{ matrix.abi }}/lib ${GITHUB_WORKSPACE}/archive/ || true
mv ${{ matrix.abi }}/share ${GITHUB_WORKSPACE}/archive/ || true
ls -alFR ${GITHUB_WORKSPACE}/archive
if: always()
- name: Upload Binaries
uses: actions/upload-artifact@v4
with:
name: libraries_${{ matrix.abi }}
path: ./archive
if: always()
- name: Prepare Logs
run: |
set -x
find ${{ matrix.abi }} -name "*.log" | xargs cp --parents -t ${GITHUB_WORKSPACE}/logs/ || true
ls -alFR ${GITHUB_WORKSPACE}/logs
if: always()
- name: Upload Logs
uses: actions/upload-artifact@v4
with:
name: logs_${{ matrix.abi }}
path: ./logs
if: always()