Update mesa.yml #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Android | |
on: | |
[push, pull_request, workflow_dispatch] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
arch: ["aarch64"] | |
fail-fast: false | |
name: "Build for ${{matrix.arch}}" | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Docker | |
run: | | |
echo "Building Docker image..." | |
echo 'FROM ubuntu:18.04' > Dockerfile | |
echo 'RUN apt update && apt install -y \\' >> Dockerfile | |
echo ' glslang-tools \\' >> Dockerfile | |
echo ' libxrandr-dev \\' >> Dockerfile | |
echo ' libxxf86vm-dev \\' >> Dockerfile | |
echo ' libxcb-*-dev \\' >> Dockerfile | |
echo ' libx11-xcb-dev \\' >> Dockerfile | |
echo ' libxfixes-dev \\' >> Dockerfile | |
echo ' libdrm-dev \\' >> Dockerfile | |
echo ' libx11-dev \\' >> Dockerfile | |
echo ' python3-pip \\' >> Dockerfile | |
echo ' meson=0.46.0 \\' >> Dockerfile # Adicionando versão antiga do Meson | |
echo ' ninja-build \\' >> Dockerfile | |
echo ' git' >> Dockerfile | |
echo 'WORKDIR /workspace' >> Dockerfile | |
docker build -t mesa-build-image . | |
- name: Run Build in Docker | |
run: | | |
echo "Running build inside Docker..." | |
docker run --rm -v ${{ github.workspace }}:/workspace mesa-build-image /bin/bash -c " | |
cd /workspace && | |
# Set up Android NDK | |
wget https://dl.google.com/android/repository/android-ndk-r20-linux-x86_64.zip && | |
unzip android-ndk-r20-linux-x86_64.zip && | |
export ANDROID_NDK_HOME=\$PWD/android-ndk-r20 && | |
export PATH=\$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin:\$PATH && | |
# Build DRM | |
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=disabled \ | |
-Dvc4=disabled \ | |
-Detnaviv=disabled && | |
ninja -C "build-android" install && | |
cd .. && | |
# Build Unified Mesa Project | |
git clone --depth 1 https://github.com/Mateus2022/unified-mesa-project.git && | |
cd unified-mesa-project && | |
cp ../android-* . && | |
envsubst <android-${{matrix.arch}} >build-crossfile && | |
meson setup "build-android" \ | |
--prefix=/tmp/pan \ | |
--cross-file "build-crossfile" \ | |
-Dplatforms=android \ | |
-Dplatform-sdk-version=26 \ | |
-Dllvm=disabled \ | |
-Dosmesa=true \ | |
-Degl=disabled \ | |
-Dopengl=true \ | |
-Dglx=disabled \ | |
-Dvulkan-drivers= \ | |
-Dgallium-drivers=panfrost \ | |
-Dbuildtype=release && | |
ninja -C "build-android" install | |
" | |
- name: Upload Libraries | |
uses: actions/upload-artifact@v4 | |
with: | |
name: panfrost_${{matrix.arch}} | |
path: /tmp/pan |