From bd6c95817fd747ed9452de410d5440fe063a60a9 Mon Sep 17 00:00:00 2001 From: The412Banner <205237651+The412Banner@users.noreply.github.com> Date: Mon, 23 Nov 2026 10:18:13 +0000 Subject: [PATCH] ci: take Robolectric's Android jars from a DroidDeck-CI release Maven Central answers the shared GitHub runners with HTTP 429, so every Robolectric test class failed with "Failed to fetch maven artifact" (run 45095159015, five attempts). The six android-all-instrumented jars Robolectric 4.16.1 uses (SDK 9-14) are on the DroidDeck-CI prerelease robolectric-4.16.1, copied unchanged from Maven Central. The step puts them in ~/.m2 after a sha256 check; Robolectric then makes no request. --- .github/workflows/build.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c3b3f50cf6..2b4cf8af20 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -685,6 +685,20 @@ jobs: if-no-files-found: ignore overwrite: true + # Robolectric's Android jars (about 770 MB) from a DroidDeck-CI release instead of Maven Central, which + # answers the shared runners with HTTP 429. Robolectric makes no request for a jar already in ~/.m2. + # A new release is needed only when the Robolectric version changes. + - name: Robolectric Android jars + run: | + set -euo pipefail + base=https://github.com/Droid-Deck/DroidDeck-CI/releases/download/robolectric-4.16.1 + dir=$HOME/.m2/repository/org/robolectric/android-all-instrumented + tmp=$(mktemp -d) + curl -fsSL --retry 3 -o "$tmp/SHA256SUMS" "$base/SHA256SUMS" + while read -r _ f; do curl -fsSL --retry 3 -o "$tmp/$f" "$base/$f"; done < "$tmp/SHA256SUMS" + (cd "$tmp" && sha256sum -c --quiet SHA256SUMS) + for f in "$tmp"/*.jar; do v=$(basename "$f" .jar); v=${v#android-all-instrumented-}; mkdir -p "$dir/$v"; mv "$f" "$dir/$v/"; done + - name: Unit tests id: unit-tests env: