Install the x86-64 glibc on arm64 runners
CI / check (push) Successful in 13m18s

AGP's aapt2 is built for x86-64 only, so on the mac-mini runner's arm64
containers it can't find its dynamic loader. OrbStack runs it through
Rosetta once the x86-64 glibc is there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Yuriy PanovandClaude Opus 5.5 committed 2026-10-26 13:48:14 +06:00
1 parent 35702ba820
commit 461a3cf4d4
2 files changed
+43

No files matched your search

+23
View File
@@ -25,6 +25,29 @@ jobs:
with:
packages: platform-tools platforms;android-37.0
# The mac-mini runner's containers are arm64, while AGP's aapt2 is built for x86-64 only.
# OrbStack runs it through Rosetta, once the x86-64 glibc it links against is installed.
- name: Install the x86-64 glibc
run: |
if [ "$(uname -m)" != aarch64 ]; then exit 0; fi
# Ubuntu serves amd64 packages from a different archive than arm64 ones.
sed -i '/^URIs:/a Architectures: arm64' /etc/apt/sources.list.d/ubuntu.sources
cat > /etc/apt/sources.list.d/amd64.sources <<EOF
Types: deb
URIs: http://archive.ubuntu.com/ubuntu/
Suites: noble noble-updates noble-security
Components: main
Architectures: amd64
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
EOF
dpkg --add-architecture amd64
# apt only warns when a lookup fails, and the runner's DNS sometimes does.
for attempt in 1 2 3 4 5; do
apt-get update -qq && apt-cache show libc6:amd64 > /dev/null 2>&1 && break
sleep 5
done
apt-get install -y -qq --no-install-recommends libc6:amd64
- run: ./gradlew testDebugUnitTest lint assembleDebug
# Gitea's artifact backend speaks the v3 protocol only.
+20
View File
@@ -34,6 +34,26 @@ jobs:
with:
packages: platform-tools platforms;android-37.0
# aapt2 is x86-64 only, see ci.yml.
- name: Install the x86-64 glibc
run: |
if [ "$(uname -m)" != aarch64 ]; then exit 0; fi
sed -i '/^URIs:/a Architectures: arm64' /etc/apt/sources.list.d/ubuntu.sources
cat > /etc/apt/sources.list.d/amd64.sources <<EOF
Types: deb
URIs: http://archive.ubuntu.com/ubuntu/
Suites: noble noble-updates noble-security
Components: main
Architectures: amd64
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
EOF
dpkg --add-architecture amd64
for attempt in 1 2 3 4 5; do
apt-get update -qq && apt-cache show libc6:amd64 > /dev/null 2>&1 && break
sleep 5
done
apt-get install -y -qq --no-install-recommends libc6:amd64
- name: Read versions
id: versions
run: |