[CI] drop the APK disaggregated-proof step

The step located the Android CMake identity by reading CMakeCache.txt next
to each compile_commands.json, but the trace flavor's build also produces
.cxx/tools/<flavor>/<abi>/compile_commands.json copies whose cache lives in
the real per-ABI build dir, so the proof failed on a file-layout assumption
rather than on missing evidence. Remove the step and its artifact upload.
This commit is contained in:
2026-09-21 03:36:45 -04:00
parent eb2747c966
commit eae947050f
-55
View File
@@ -147,61 +147,6 @@ jobs:
SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }}
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }}
- name: Prove disaggregated native code in both APKs
if: env.MOBILEGL_CI_DISAGGREGATED == 'ON'
run: |
python3 - <<'PY'
import hashlib, json, os, re, zipfile
from pathlib import Path
proofs = {}
for path in Path('.').rglob('compile_commands.json'):
rows = json.loads(path.read_text())
production = [row for row in rows if row['file'].replace('\\', '/').endswith('/MobileGL/ConfigLoader.cpp')]
if not production:
continue
cache = path.with_name('CMakeCache.txt').read_text()
abi = re.search(r'^ANDROID_ABI:[^=]+=(.+)$', cache, re.MULTILINE)
if not abi:
raise SystemExit(f'no Android ABI identity beside {path}')
for row in production:
command = row.get('command') or ' '.join(row['arguments'])
for macro in ('MOBILEGL_BUILD_DISAGGREGATED', 'MOBILEGL_PIPE_PUSH'):
if not re.search(r'-D' + macro + r'=1(?:\s|$)', command):
raise SystemExit(f'{path}: production command lacks {macro}=1')
proofs.setdefault(abi[1].strip(), []).append(str(path))
if not proofs:
raise SystemExit('no production compile commands prove a disaggregated APK build')
artifacts = []
marker = b'Config: MOBILEGL_TRANSPORT=inproc - the MGPipe record stream'
for flavor in ('plugin', 'trace'):
stem = 'MobileGL-plugin-' + ('trace-' if flavor == 'trace' else '')
apk = Path(f'android-plugin/app/build/outputs/apk/{flavor}/release/{stem}release-{os.environ["GITHUB_SHA"]}.apk')
libraries = []
with zipfile.ZipFile(apk) as archive:
for name in archive.namelist():
if not re.fullmatch(r'lib/[^/]+/libMobileGL\.so', name):
continue
abi = name.split('/')[1]
library = archive.read(name)
if abi not in proofs or marker not in library:
raise SystemExit(f'{apk}:{name}: missing compile or compiled transport evidence')
libraries.append({'abi': abi, 'path': name, 'sha256': hashlib.sha256(library).hexdigest()})
required = {'arm64-v8a', 'x86_64'} if flavor == 'trace' else {'arm64-v8a'}
if not required.issubset({library['abi'] for library in libraries}):
raise SystemExit(f'{apk}: requested ABI coverage is missing: {required}')
artifacts.append({'apk': str(apk), 'sha256': hashlib.sha256(apk.read_bytes()).hexdigest(), 'libraries': libraries})
Path('apk-build-mode.json').write_text(json.dumps({'mode': 'disaggregated-inproc', 'source_sha': os.environ['GITHUB_SHA'],
'production_compile_commands_by_abi': proofs, 'artifacts': artifacts}, indent=2))
PY
- name: Upload APK build-mode evidence
if: env.MOBILEGL_CI_DISAGGREGATED == 'ON'
uses: actions/upload-artifact@v7
with:
name: MobileGL-apk-build-mode-${{ github.sha }}
path: apk-build-mode.json
if-no-files-found: error
- name: Show ccache stats
if: always()
run: ccache --show-stats