From 8bf795887efc53edbb7c8cd0596e0fd8cfb23956 Mon Sep 17 00:00:00 2001 From: artdeell Date: Sun, 19 Nov 2023 13:56:43 +0300 Subject: [PATCH] Implement CI --- .github/workflows/android.yml | 70 +++++++++++++++++++++++++++++++++++ .github/workflows/macos.yml | 60 ------------------------------ android-aarch64 | 26 +++++++++++++ android-arm32 | 26 +++++++++++++ android-drm-aarch64 | 22 +++++++++++ android-drm-arm32 | 22 +++++++++++ 6 files changed, 166 insertions(+), 60 deletions(-) create mode 100644 .github/workflows/android.yml delete mode 100644 .github/workflows/macos.yml create mode 100644 android-aarch64 create mode 100644 android-arm32 create mode 100644 android-drm-aarch64 create mode 100644 android-drm-arm32 diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml new file mode 100644 index 00000000000..e86014301d2 --- /dev/null +++ b/.github/workflows/android.yml @@ -0,0 +1,70 @@ +name: Build Android + +on: + [push, pull_request] + +# 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" ] + fail-fast: false + + name: "Build for ${{matrix.arch}}" + + runs-on: ubuntu-latest + + steps: + - name: Disable symlinks in git config + run: git config --global core.symlinks false + + - 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" + # Build plain libdrm as a static library + envsubst 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" \ + -Dintel=disabled \ + -Dradeon=disabled \ + -Damdgpu=disabled \ + -Dnouveau=disabled \ + -Dvmwgfx=disabled \ + -Dfreedreno=disabled \ + -Dvc4=disabled \ + -Detnaviv=disabled + ninja -C "build-android" install + cd .. + #Now, build OSMesa with panfrost + envsubst build-crossfile + meson setup "build-android" \ + --prefix=/tmp/zink \ + --cross-file "build-crossfile" \ + -Dplatforms=android \ + -Dplatform-sdk-version=25 \ + -Dandroid-stub=true \ + -Dllvm=disabled \ + -Dxlib-lease=disabled \ + -Degl=disabled \ + -Dgbm=disabled \ + -Dglx=disabled \ + -Dopengl=true \ + -Dosmesa=true \ + -Dvulkan-drivers= \ + -Dgallium-drivers=swrast,zink \ + -Dshared-glapi=false + ninja -C "build-android" install + - name: Upload libraries + uses: actions/upload-artifact@v2 + with: + name: libzink_${{matrix.arch}} + path: /tmp/zink diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml deleted file mode 100644 index d1b66ef4cad..00000000000 --- a/.github/workflows/macos.yml +++ /dev/null @@ -1,60 +0,0 @@ -name: macOS-CI -on: push - -permissions: - contents: read - -jobs: - macOS-CI: - strategy: - matrix: - glx_option: ['dri', 'xlib'] - runs-on: macos-11 - env: - GALLIUM_DUMP_CPU: true - MESON_EXEC: /Users/runner/Library/Python/3.11/bin/meson - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Install Dependencies - run: | - cat > Brewfile < native_config <