mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-07 19:58:32 +09:00
[Fix] (ci): fix matrix retrace GLES runtime
- install EGL/GLES development runtime in retrace matrix jobs - assert libEGL.so and libGLESv2.so are available before running trace replay - remove native build cache wiring from workflows
This commit is contained in:
@@ -11,12 +11,6 @@ on:
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CCACHE_BASEDIR: ${{ github.workspace }}
|
||||
CCACHE_COMPILERCHECK: content
|
||||
CCACHE_DIR: ${{ github.workspace }}/.ccache/android
|
||||
CCACHE_MAXSIZE: 4G
|
||||
CCACHE_NOHASHDIR: true
|
||||
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
@@ -43,27 +37,6 @@ jobs:
|
||||
- name: Setup Android SDK
|
||||
uses: android-actions/setup-android@v3
|
||||
|
||||
- name: Restore Android native SDK packages
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
/usr/local/lib/android/sdk/ndk/27.3.13750724
|
||||
/usr/local/lib/android/sdk/cmake/3.22.1
|
||||
key: ${{ runner.os }}-android-native-sdk-ndk-27.3.13750724-cmake-3.22.1
|
||||
|
||||
- name: Install ccache
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y ccache
|
||||
|
||||
- name: Restore ccache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: .ccache/android
|
||||
key: ${{ runner.os }}-apk-ccache-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-apk-ccache-
|
||||
|
||||
- name: Install Android NDK
|
||||
run: |
|
||||
sdkmanager "ndk;27.3.13750724"
|
||||
@@ -74,20 +47,14 @@ jobs:
|
||||
run: python update_glslang_sources.py
|
||||
|
||||
- name: Build plugin APKs
|
||||
run: |
|
||||
ccache --zero-stats
|
||||
gradle --no-daemon -p android-plugin :app:assembleEsprytPluginRelease :app:assembleMagmaPluginRelease -Pmobilegl.cmakeCompilerLauncher=ccache -Pmobilegl.logLevel=MOBILEGL_LOG_LEVEL_INFO --parallel --max-workers "$(nproc)"
|
||||
ccache --show-stats
|
||||
run: gradle --no-daemon -p android-plugin :app:assembleEsprytPluginRelease :app:assembleMagmaPluginRelease -Pmobilegl.logLevel=MOBILEGL_LOG_LEVEL_INFO --parallel --max-workers "$(nproc)"
|
||||
env:
|
||||
SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }}
|
||||
SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }}
|
||||
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }}
|
||||
|
||||
- name: Build retrace APKs
|
||||
run: |
|
||||
ccache --zero-stats
|
||||
gradle --no-daemon -p android-plugin :app:assembleEsprytTraceRelease :app:assembleMagmaTraceRelease -Pmobilegl.cmakeCompilerLauncher=ccache -Pmobilegl.abis=all -Pmobilegl.debuggableRelease=true -Pmobilegl.logLevel=MOBILEGL_LOG_LEVEL_INFO --parallel --max-workers "$(nproc)"
|
||||
ccache --show-stats
|
||||
run: gradle --no-daemon -p android-plugin :app:assembleEsprytTraceRelease :app:assembleMagmaTraceRelease -Pmobilegl.abis=all -Pmobilegl.debuggableRelease=true -Pmobilegl.logLevel=MOBILEGL_LOG_LEVEL_INFO --parallel --max-workers "$(nproc)"
|
||||
env:
|
||||
SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }}
|
||||
SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }}
|
||||
@@ -413,14 +380,6 @@ jobs:
|
||||
- name: Setup Android SDK
|
||||
uses: android-actions/setup-android@v3
|
||||
|
||||
- name: Restore Android emulator SDK packages
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
/usr/local/lib/android/sdk/platforms/android-35
|
||||
/usr/local/lib/android/sdk/system-images/android-35/google_apis/x86_64
|
||||
key: ${{ runner.os }}-android-emulator-sdk-api35-google-apis-x86-64
|
||||
|
||||
- name: Download retrace APKs
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
|
||||
@@ -13,11 +13,6 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
BUILD_DIR: build-linux
|
||||
CCACHE_BASEDIR: ${{ github.workspace }}
|
||||
CCACHE_COMPILERCHECK: content
|
||||
CCACHE_DIR: ${{ github.workspace }}/.ccache/build-linux
|
||||
CCACHE_MAXSIZE: 2G
|
||||
CCACHE_NOHASHDIR: true
|
||||
|
||||
steps:
|
||||
- name: Set Swap Space
|
||||
@@ -47,15 +42,7 @@ jobs:
|
||||
- name: Install build dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y clang-20 clang++-20 lld-20 libc++-20-dev libc++abi-20-dev libvulkan-dev libegl1-mesa-dev libgles2-mesa-dev libgl1-mesa-dri mesa-vulkan-drivers ninja-build ccache
|
||||
|
||||
- name: Restore ccache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: .ccache/build-linux
|
||||
key: ${{ runner.os }}-test-build-linux-ccache-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-test-build-linux-ccache-
|
||||
sudo apt-get install -y clang-20 clang++-20 lld-20 libc++-20-dev libc++abi-20-dev libvulkan-dev libegl1-mesa-dev libgles2-mesa-dev libgl1-mesa-dri mesa-vulkan-drivers ninja-build
|
||||
|
||||
- name: Show installed toolchain
|
||||
run: |
|
||||
@@ -75,8 +62,6 @@ jobs:
|
||||
cmake -S . -B "${BUILD_DIR}" -G Ninja \
|
||||
-DCMAKE_C_COMPILER=clang-20 \
|
||||
-DCMAKE_CXX_COMPILER=clang++-20 \
|
||||
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
||||
-DCMAKE_BUILD_TYPE="${BUILD_TYPE}" \
|
||||
-DMOBILEGL_LOG_ACTIVE_LEVEL=MOBILEGL_LOG_LEVEL_INFO \
|
||||
-DMOBILEGL_BUILD_TEST=ON \
|
||||
@@ -87,10 +72,7 @@ jobs:
|
||||
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
ccache --zero-stats
|
||||
cmake --build "${BUILD_DIR}" --parallel "$(nproc)"
|
||||
ccache --show-stats
|
||||
run: cmake --build "${BUILD_DIR}" --parallel "$(nproc)"
|
||||
|
||||
- name: Package Linux runtime
|
||||
run: |
|
||||
@@ -212,11 +194,6 @@ jobs:
|
||||
env:
|
||||
BUILD_DIR: build-retrace
|
||||
MOBILEGL_LIBRARY: ${{ github.workspace }}/build-linux/libMobileGL.so
|
||||
CCACHE_BASEDIR: ${{ github.workspace }}
|
||||
CCACHE_COMPILERCHECK: content
|
||||
CCACHE_DIR: ${{ github.workspace }}/.ccache/build-retrace
|
||||
CCACHE_MAXSIZE: 2G
|
||||
CCACHE_NOHASHDIR: true
|
||||
|
||||
steps:
|
||||
- name: Set Swap Space
|
||||
@@ -247,15 +224,7 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y clang-20 clang++-20 lld-20 libc++-20-dev libc++abi-20-dev libvulkan-dev libegl1-mesa-dev libgles2-mesa-dev libgl1-mesa-dri mesa-vulkan-drivers ninja-build ccache
|
||||
|
||||
- name: Restore ccache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: .ccache/build-retrace
|
||||
key: ${{ runner.os }}-test-build-retrace-ccache-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-test-build-retrace-ccache-
|
||||
sudo apt-get install -y clang-20 clang++-20 lld-20 libc++-20-dev libc++abi-20-dev libvulkan-dev libegl1-mesa-dev libgles2-mesa-dev libgl1-mesa-dri mesa-vulkan-drivers ninja-build
|
||||
|
||||
- name: Show installed toolchain
|
||||
run: |
|
||||
@@ -286,8 +255,6 @@ jobs:
|
||||
cmake -S . -B "${BUILD_DIR}" -G Ninja \
|
||||
-DCMAKE_C_COMPILER=clang-20 \
|
||||
-DCMAKE_CXX_COMPILER=clang++-20 \
|
||||
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
||||
-DCMAKE_BUILD_TYPE="${BUILD_TYPE}" \
|
||||
-DMOBILEGL_LOG_ACTIVE_LEVEL=MOBILEGL_LOG_LEVEL_INFO \
|
||||
-DMOBILEGL_BUILD_TEST=OFF \
|
||||
@@ -297,10 +264,7 @@ jobs:
|
||||
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
|
||||
|
||||
- name: Build trace replay
|
||||
run: |
|
||||
ccache --zero-stats
|
||||
cmake --build "${BUILD_DIR}" --target mobilegl_trace_replay --parallel "$(nproc)"
|
||||
ccache --show-stats
|
||||
run: cmake --build "${BUILD_DIR}" --target mobilegl_trace_replay --parallel "$(nproc)"
|
||||
|
||||
- name: Normalize CTest command paths
|
||||
run: |
|
||||
@@ -374,7 +338,9 @@ jobs:
|
||||
- name: Install runtime dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libvulkan1 libegl1 libgles2 libgl1-mesa-dri mesa-vulkan-drivers
|
||||
sudo apt-get install -y libvulkan1 libegl1-mesa-dev libgles2-mesa-dev libgl1-mesa-dri mesa-vulkan-drivers
|
||||
test -e /usr/lib/x86_64-linux-gnu/libEGL.so
|
||||
test -e /usr/lib/x86_64-linux-gnu/libGLESv2.so
|
||||
|
||||
- name: Download Linux runtime
|
||||
uses: actions/download-artifact@v4
|
||||
|
||||
@@ -28,9 +28,6 @@ def mobileGlAbiFilters = {
|
||||
.collect { it.trim() }
|
||||
.findAll { !it.isEmpty() }
|
||||
}
|
||||
def mobileGlCmakeCompilerLauncher = {
|
||||
(findProperty('mobilegl.cmakeCompilerLauncher') ?: System.getenv('MOBILEGL_CMAKE_COMPILER_LAUNCHER') ?: '') as String
|
||||
}
|
||||
|
||||
android {
|
||||
namespace 'top.mobilegl.plugin'
|
||||
@@ -115,11 +112,6 @@ android {
|
||||
cmake {
|
||||
path file('src/trace/cpp/CMakeLists.txt')
|
||||
version '3.22.1'
|
||||
def compilerLauncher = mobileGlCmakeCompilerLauncher()
|
||||
if (!compilerLauncher.isEmpty()) {
|
||||
arguments "-DCMAKE_C_COMPILER_LAUNCHER=${compilerLauncher}",
|
||||
"-DCMAKE_CXX_COMPILER_LAUNCHER=${compilerLauncher}"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -17,9 +17,6 @@ def mobileGlAbiFilters = {
|
||||
def mobileGlLogActiveLevel = {
|
||||
(rootProject.findProperty('mobilegl.logLevel') ?: System.getenv('MOBILEGL_LOG_ACTIVE_LEVEL') ?: 'MOBILEGL_LOG_LEVEL_INFO') as String
|
||||
}
|
||||
def mobileGlCmakeCompilerLauncher = {
|
||||
(rootProject.findProperty('mobilegl.cmakeCompilerLauncher') ?: System.getenv('MOBILEGL_CMAKE_COMPILER_LAUNCHER') ?: '') as String
|
||||
}
|
||||
|
||||
subprojects { subproject ->
|
||||
subproject.plugins.withId('com.android.library') {
|
||||
@@ -33,11 +30,6 @@ subprojects { subproject ->
|
||||
}
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
def compilerLauncher = mobileGlCmakeCompilerLauncher()
|
||||
if (!compilerLauncher.isEmpty()) {
|
||||
arguments "-DCMAKE_C_COMPILER_LAUNCHER=${compilerLauncher}",
|
||||
"-DCMAKE_CXX_COMPILER_LAUNCHER=${compilerLauncher}"
|
||||
}
|
||||
cppFlags "-DMOBILEGL_LOG_ACTIVE_LEVEL=${mobileGlLogActiveLevel()}"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user