-
Notifications
You must be signed in to change notification settings - Fork 8
70 lines (64 loc) · 2.32 KB
/
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
65
66
67
68
69
70
name: Build OSMesa (Android)
on:
[push, pull_request, workflow_dispatch]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
strategy:
matrix:
arch: [ "arm32", "aarch64", "x86_64" ]
fail-fast: false
name: "Build for ${{matrix.arch}}"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build
run: |
sudo apt update
sudo apt install -y meson libxrandr-dev libxxf86vm-dev libxcb-*-dev libx11-xcb-dev libxfixes-dev libdrm-dev libx11-dev
pip3 install mako
export ANDROID_NDK_HOME="$ANDROID_SDK_ROOT/ndk-bundle"
envsubst <android-drm-${{matrix.arch}} >build-crossfile-drm
git clone --depth 1 https://gitlab.freedesktop.org/mesa/drm.git
cd drm
meson setup "build-android" \
--prefix=/tmp/drm-static \
--cross-file "../build-crossfile-drm" \
-Ddefault_library=static \
-Dintel=disabled \
-Dradeon=disabled \
-Damdgpu=disabled \
-Dnouveau=disabled \
-Dvmwgfx=disabled \
-Dfreedreno=enabled \
-Dvc4=disabled \
-Detnaviv=disabled \
-Dfreedreno-kgsl=true
ninja -C "build-android" install
cd ..
envsubst <android-${{matrix.arch}} >build-crossfile
meson setup "build-android" \
--prefix=/tmp/mesa \
--cross-file "build-crossfile" \
-Dplatforms=android \
-Dplatform-sdk-version=25 \
-Dandroid-stub=true \
-Dxlib-lease=disabled \
-Degl=disabled \
-Dgbm=disabled \
-Dglx=disabled \
-Dopengl=true \
-Dosmesa=true \
-Dvulkan-drivers= \
-Dgallium-drivers=freedreno,zink,swrast \
-Dfreedreno-kmds=kgsl \
-Dshared-glapi=false \
-Dandroid-libbacktrace=disabled \
-Dbuildtype=release
if [ ${{matrix.arch}} == 'x86_64' ]; then meson configure "build-android" -Dgallium-drivers=zink; fi
ninja -C "build-android" install
- name: Upload libraries
uses: actions/upload-artifact@v2
with:
name: libOSMesa_${{matrix.arch}}
path: /tmp/mesa