From 03ecc0615e76e7d3eaab893418c2b01293fdab59 Mon Sep 17 00:00:00 2001 From: sunerpy Date: Tue, 10 Nov 2026 09:44:27 +0800 Subject: [PATCH] =?UTF-8?q?ci:=20=E5=8F=91=E7=89=88=E5=80=99=E9=80=89?= =?UTF-8?q?=E7=9A=84=E5=AE=89=E5=8D=93=E6=9E=84=E5=BB=BA=E4=B9=9F=E9=A2=84?= =?UTF-8?q?=E5=8F=96=20Gradle=20=E5=8F=91=E8=A1=8C=E5=8C=85=E5=B9=B6?= =?UTF-8?q?=E5=BB=B6=E9=95=BF=E4=BE=9D=E8=B5=96=E4=B8=8B=E8=BD=BD=E7=9A=84?= =?UTF-8?q?=E9=87=8D=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 0.3.1 的发版候选(run 42733161564,job 129556020370)在安卓腿上失败:从 dl.google.com 读 androidx.window 的 POM 超时,Gradle 按默认的三次尝试后停用了 这个仓库。#241 只给 ci.yml 的 android job 加了 prepare-gradle.sh(钉住摘要的 Gradle 发行包、每个仓库试八次),发版候选的安卓腿没有。 release-candidate.yml 的 bundle-android 在 pnpm install 之后、构建之前,经 .release-tooling 运行同一个脚本。test_release_workflows.py 检查两处都在构建前运行它。 --- .github/workflows/release-candidate.yml | 6 ++++++ scripts/release/test_release_workflows.py | 21 +++++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/.github/workflows/release-candidate.yml b/.github/workflows/release-candidate.yml index 202902b0..180f4adc 100644 --- a/.github/workflows/release-candidate.yml +++ b/.github/workflows/release-candidate.yml @@ -1225,6 +1225,12 @@ jobs: - name: Install web dependencies (frozen lockfile) run: pnpm install --frozen-lockfile + # As in ci.yml's android job: the wrapper's Gradle distribution pinned and retried, and Gradle + # trying a repository eight times instead of three (.github/scripts/prepare-gradle.sh). The + # 0.3.1 candidate failed here once on a read timeout from dl.google.com (run 42733161564). + - name: Gradle distribution (pinned SHA-256, retried) and repository retries + run: .release-tooling/.github/scripts/prepare-gradle.sh apps/mobile-rn + # Phase 1, with the built-in engine values and no signing material: the source's build script # (the Rust shell through cargo-ndk, its UniFFI bindings, Expo's Android project, Gradle; the # licence texts into the assets), its release build left unsigned by app.config.js. React diff --git a/scripts/release/test_release_workflows.py b/scripts/release/test_release_workflows.py index ff573b1e..27070b34 100644 --- a/scripts/release/test_release_workflows.py +++ b/scripts/release/test_release_workflows.py @@ -648,6 +648,27 @@ def test_regression_the_nsis_bundle_finds_its_tools_in_place(self) -> None: self.assertLess(leg.index("run: make windows-x64"), leg.index("cargo tauri bundle --ci --target"), "the second bundle comes after the script") +class GradleDownloads(unittest.TestCase): + """Both Android builds get the pinned Gradle distribution and eight tries per repository + (.github/scripts/prepare-gradle.sh) before scripts/build-android-rn.sh runs.""" + + def test_regression_the_candidate_s_android_leg_retries_gradle_downloads_as_ci_does(self) -> None: + # Run 42733161564 (the 0.3.1 candidate, 2026-11-10, job 129556020370): reading + # androidx.window's POM from dl.google.com timed out, Gradle disabled the repository after + # its three default tries and the leg failed. ci.yml's android job has had the pinned + # distribution and eight tries since #241; the candidate's leg had neither. + for name, job, script in ( + ("ci.yml", "android", "run: .github/scripts/prepare-gradle.sh apps/mobile-rn"), + ("release-candidate.yml", "bundle-android", "run: .release-tooling/.github/scripts/prepare-gradle.sh apps/mobile-rn"), + ): + with self.subTest(workflow=name): + body = "\n".join(code_lines(jobs(WORKFLOWS / name)[job])) + self.assertIn(script, body) + # After pnpm install (it reads Expo's template from node_modules), before the build. + self.assertLess(body.index("run: pnpm install --frozen-lockfile"), body.index(script)) + self.assertLess(body.index(script), body.index("scripts/build-android-rn.sh --unsigned")) + + class AptInstalls(unittest.TestCase): """2026-10-01: a slow apt mirror held the desktop smoke in its package step for 48 and 35 minutes, twice in one day, and stalled the release candidates waiting for CI Success."""