mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-11 05:38:31 +09:00
[Fix] (CI): name APK artifacts by commit
This commit is contained in:
+21
-18
@@ -74,7 +74,7 @@ jobs:
|
|||||||
run: python update_glslang_sources.py
|
run: python update_glslang_sources.py
|
||||||
|
|
||||||
- name: Build plugin APK
|
- name: Build plugin APK
|
||||||
run: gradle --no-daemon -p android-plugin :app:assemblePluginRelease -Pmobilegl.logLevel=MOBILEGL_LOG_LEVEL_INFO --parallel --max-workers "$(nproc)"
|
run: gradle --no-daemon -p android-plugin :app:assemblePluginRelease -Pmobilegl.apkSuffix="${short_sha}" -Pmobilegl.logLevel=MOBILEGL_LOG_LEVEL_INFO --parallel --max-workers "$(nproc)"
|
||||||
env:
|
env:
|
||||||
SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }}
|
SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }}
|
||||||
SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }}
|
SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }}
|
||||||
@@ -116,7 +116,7 @@ jobs:
|
|||||||
66fdc867e552192d553d59095ea2e3cef4829de65c356f1fd826027b1905972e
|
66fdc867e552192d553d59095ea2e3cef4829de65c356f1fd826027b1905972e
|
||||||
|
|
||||||
- name: Build retrace APK
|
- name: Build retrace APK
|
||||||
run: gradle --no-daemon -p android-plugin :app:assembleTraceRelease -Pmobilegl.abis=all -Pmobilegl.debuggableRelease=true -Pmobilegl.logLevel=MOBILEGL_LOG_LEVEL_INFO --parallel --max-workers "$(nproc)"
|
run: gradle --no-daemon -p android-plugin :app:assembleTraceRelease -Pmobilegl.apkSuffix="${short_sha}" -Pmobilegl.abis=all -Pmobilegl.debuggableRelease=true -Pmobilegl.logLevel=MOBILEGL_LOG_LEVEL_INFO --parallel --max-workers "$(nproc)"
|
||||||
env:
|
env:
|
||||||
SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }}
|
SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }}
|
||||||
SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }}
|
SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }}
|
||||||
@@ -129,21 +129,24 @@ jobs:
|
|||||||
- name: Verify APK metadata and packaging
|
- name: Verify APK metadata and packaging
|
||||||
run: |
|
run: |
|
||||||
AAPT2="$(find "$ANDROID_HOME/build-tools" -name aapt2 -type f | sort -V | tail -n 1)"
|
AAPT2="$(find "$ANDROID_HOME/build-tools" -name aapt2 -type f | sort -V | tail -n 1)"
|
||||||
plugin_apk="$(find android-plugin/app/build/outputs/apk/plugin/release -name '*.apk' ! -name '*-debug-signed.apk' -print -quit)"
|
plugin_apk="android-plugin/app/build/outputs/apk/plugin/release/MobileGL-plugin-release-${short_sha}.apk"
|
||||||
trace_apk="$(find android-plugin/app/build/outputs/apk/trace/release -name '*.apk' ! -name '*-debug-signed.apk' -print -quit)"
|
trace_apk="android-plugin/app/build/outputs/apk/trace/release/MobileGL-plugin-trace-release-${short_sha}.apk"
|
||||||
test -n "${plugin_apk}"
|
test -f "${plugin_apk}"
|
||||||
test -n "${trace_apk}"
|
test -f "${trace_apk}"
|
||||||
bash .github/scripts/validate-plugin-apks.sh "$AAPT2" "$plugin_apk" "$trace_apk"
|
bash .github/scripts/validate-plugin-apks.sh "$AAPT2" "$plugin_apk" "$trace_apk"
|
||||||
|
|
||||||
- name: Verify signed APKs
|
- name: Verify signed APKs
|
||||||
run: |
|
run: |
|
||||||
APKSIGNER="$(find "$ANDROID_HOME/build-tools" -name apksigner -type f | sort -V | tail -n 1)"
|
APKSIGNER="$(find "$ANDROID_HOME/build-tools" -name apksigner -type f | sort -V | tail -n 1)"
|
||||||
mapfile -t APKS < <(find android-plugin/app/build/outputs/apk -type f -path '*/release/*.apk' | sort)
|
mapfile -t APKS < <(printf '%s\n' \
|
||||||
if [ "${#APKS[@]}" -eq 0 ]; then
|
"android-plugin/app/build/outputs/apk/plugin/release/MobileGL-plugin-release-${short_sha}.apk" \
|
||||||
echo "::error::No release APKs found under android-plugin/app/build/outputs/apk"
|
"android-plugin/app/build/outputs/apk/trace/release/MobileGL-plugin-trace-release-${short_sha}.apk")
|
||||||
find android-plugin/app/build/outputs/apk -type f -print || true
|
for APK in "${APKS[@]}"; do
|
||||||
exit 1
|
if [[ ! -f "$APK" ]]; then
|
||||||
fi
|
echo "::error::Expected release APK was not produced: $APK"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
for APK in "${APKS[@]}"; do
|
for APK in "${APKS[@]}"; do
|
||||||
if [[ "$APK" == *-unsigned.apk ]]; then
|
if [[ "$APK" == *-unsigned.apk ]]; then
|
||||||
@@ -157,15 +160,15 @@ jobs:
|
|||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: MobileGL-plugin-${{ env.date_today }}-${{ env.short_sha }}
|
name: MobileGL-plugin-${{ env.date_today }}-${{ env.short_sha }}
|
||||||
path: android-plugin/app/build/outputs/apk/plugin/release/*.apk
|
path: android-plugin/app/build/outputs/apk/plugin/release/MobileGL-plugin-release-${{ env.short_sha }}.apk
|
||||||
if-no-files-found: error
|
compression-level: 0
|
||||||
|
|
||||||
- name: Upload retrace APK
|
- name: Upload retrace APK
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: MobileGL-retrace-apk-${{ env.date_today }}-${{ env.short_sha }}
|
name: MobileGL-retrace-apk-${{ env.date_today }}-${{ env.short_sha }}
|
||||||
path: android-plugin/app/build/outputs/apk/trace/release/*.apk
|
path: android-plugin/app/build/outputs/apk/trace/release/MobileGL-plugin-trace-release-${{ env.short_sha }}.apk
|
||||||
if-no-files-found: error
|
compression-level: 0
|
||||||
|
|
||||||
trace-cases:
|
trace-cases:
|
||||||
name: trace case matrix
|
name: trace case matrix
|
||||||
@@ -365,8 +368,8 @@ jobs:
|
|||||||
MOBILEGL_TRACE_ANGLE_VARIANT: ${{ matrix.case.name == 'minecraft-1.21.4-fabric-iris-bliss-in-world' && '90a62123d794' || 'ec889e6ea831' }}
|
MOBILEGL_TRACE_ANGLE_VARIANT: ${{ matrix.case.name == 'minecraft-1.21.4-fabric-iris-bliss-in-world' && '90a62123d794' || 'ec889e6ea831' }}
|
||||||
MOBILEGL_MAGMA_R11G11B10F_FALLBACK: ${{ matrix.backend.name == 'DirectVulkan' && '1' || '0' }}
|
MOBILEGL_MAGMA_R11G11B10F_FALLBACK: ${{ matrix.backend.name == 'DirectVulkan' && '1' || '0' }}
|
||||||
run: |
|
run: |
|
||||||
apk_file="$(find android-retrace-apks -name '*.apk' ! -name '*-debug-signed.apk' -print -quit)"
|
apk_file="android-retrace-apks/MobileGL-plugin-trace-release-${short_sha}.apk"
|
||||||
test -n "${apk_file}"
|
test -f "${apk_file}"
|
||||||
extra_retrace_args=()
|
extra_retrace_args=()
|
||||||
# Bliss needs the newer signed ANGLE variant plus sampler mipmap
|
# Bliss needs the newer signed ANGLE variant plus sampler mipmap
|
||||||
# min-filter downgrading on ANGLE llvmpipe.
|
# min-filter downgrading on ANGLE llvmpipe.
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import com.android.build.gradle.internal.api.ApkVariantOutputImpl
|
||||||
import com.launchers_plugin.renderer.buildscript.RendererConfig
|
import com.launchers_plugin.renderer.buildscript.RendererConfig
|
||||||
import com.launchers_plugin.renderer.buildscript.buildEnvs
|
import com.launchers_plugin.renderer.buildscript.buildEnvs
|
||||||
import com.launchers_plugin.renderer.buildscript.buildJsonValue
|
import com.launchers_plugin.renderer.buildscript.buildJsonValue
|
||||||
@@ -62,6 +63,9 @@ val mobileGlMonthlyRevision = runGit(
|
|||||||
"--since=${String.format("%d-%02d-01T00:00:00", 2000 + mobileGlVersionMajor, mobileGlVersionMinor)}",
|
"--since=${String.format("%d-%02d-01T00:00:00", 2000 + mobileGlVersionMajor, mobileGlVersionMinor)}",
|
||||||
"HEAD",
|
"HEAD",
|
||||||
)?.toIntOrNull() ?: 0
|
)?.toIntOrNull() ?: 0
|
||||||
|
val mobileGlApkSuffix = (findProperty("mobilegl.apkSuffix") ?: System.getenv("MOBILEGL_APK_SUFFIX") ?: mobileGlGitShortHash)
|
||||||
|
.toString()
|
||||||
|
.ifBlank { "nogit" }
|
||||||
|
|
||||||
val pluginRendererConfig = buildJsonValue {
|
val pluginRendererConfig = buildJsonValue {
|
||||||
renderer(
|
renderer(
|
||||||
@@ -189,6 +193,16 @@ android {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
android.applicationVariants.configureEach {
|
||||||
|
outputs.configureEach {
|
||||||
|
(this as ApkVariantOutputImpl).outputFileName = when (flavorName) {
|
||||||
|
"plugin" -> "MobileGL-plugin-release-$mobileGlApkSuffix.apk"
|
||||||
|
"trace" -> "MobileGL-plugin-trace-release-$mobileGlApkSuffix.apk"
|
||||||
|
else -> outputFileName
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
androidComponents {
|
androidComponents {
|
||||||
onVariants(selector().withFlavor("profile" to "plugin")) { variant ->
|
onVariants(selector().withFlavor("profile" to "plugin")) { variant ->
|
||||||
variant.packaging.jniLibs.excludes.add("**/libtrace_replay_runner.so")
|
variant.packaging.jniLibs.excludes.add("**/libtrace_replay_runner.so")
|
||||||
|
|||||||
Reference in New Issue
Block a user