Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion .github/workflows/integration-tests-ui-critical.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ jobs:
target: google_apis
channel: canary # Necessary for ATDs
arch: x86_64
- api-level: "37.0" # Android 17; API 37 ships only as a minor-versioned image
target: google_apis_ps16k # API 37 has no plain google_apis image
channel: canary # Necessary for ATDs
arch: x86_64
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
Expand All @@ -85,14 +89,32 @@ jobs:
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm

# The runner ships an outdated avdmanager that writes target=android-0 into the
# AVD config for minor-versioned packages (android-37.x), so the emulator clamps
# to API 3 and boots misconfigured. Update cmdline-tools so avdmanager parses it.
# See https://github.com/ReactiveCircus/android-emulator-runner/issues/482
- name: Update SDK cmdline-tools
id: cmdline-tools
run: |
SDK="${ANDROID_HOME:-${ANDROID_SDK_ROOT:-/usr/local/lib/android/sdk}}"
yes | "$SDK/cmdline-tools/latest/bin/sdkmanager" --install "cmdline-tools;latest" > /dev/null
Comment thread
runningcode marked this conversation as resolved.
# sdkmanager won't overwrite the preinstalled dir, so it installs to latest-2.
if [ -d "$SDK/cmdline-tools/latest-2" ]; then
rm -rf "$SDK/cmdline-tools/latest"
mv "$SDK/cmdline-tools/latest-2" "$SDK/cmdline-tools/latest"
fi
echo "version=$("$SDK/cmdline-tools/latest/bin/sdkmanager" --version 2>/dev/null | grep -Eo '^[0-9][0-9.]*' | head -1)" >> "$GITHUB_OUTPUT"

- name: AVD cache
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
id: avd-cache
with:
path: |
~/.android/avd/*
~/.android/adb*
key: avd-api-${{ matrix.api-level }}-${{ matrix.arch }}-${{ matrix.target }}
# Keyed on the cmdline-tools version so AVDs created by the old, broken
# avdmanager are invalidated automatically.
key: avd-api-${{ matrix.api-level }}-${{ matrix.arch }}-${{ matrix.target }}-tools${{ steps.cmdline-tools.outputs.version }}

- name: Create AVD and generate snapshot for caching
if: steps.avd-cache.outputs.cache-hit != 'true'
Expand Down
Loading