Add 32 bit CI

This commit is contained in:
topjohnwu 2024-04-10 02:56:23 -07:00
parent 6219d5fcbf
commit ffc1e38e48
2 changed files with 56 additions and 11 deletions

View File

@ -82,7 +82,7 @@ jobs:
run: ./gradlew --stop
test:
name: Test on API ${{ matrix.api }}
name: Test x86_64 on API ${{ matrix.api }}
runs-on: ubuntu-latest
needs: build
strategy:
@ -115,3 +115,40 @@ jobs:
- name: AVD test
run: scripts/avd_test.sh ${{ matrix.api }}
test-32:
name: Test x86 on API ${{ matrix.api }}
runs-on: ubuntu-latest
needs: build
strategy:
fail-fast: false
matrix:
api: [23, 24, 25, 26, 27, 28, 29, 30]
steps:
- name: Check out
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python 3
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: ${{ github.sha }}
path: out
- name: Enable KVM group perms
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- name: AVD test
env:
FORCE_32_BIT: 1
run: scripts/avd_test.sh ${{ matrix.api }}

View File

@ -10,20 +10,13 @@ emu_pid=
export PATH="$PATH:$ANDROID_SDK_ROOT/platform-tools"
# We test at least these API levels for the following reason
# API 23: legacy rootfs w/o Treble
# API 26: legacy rootfs with Treble
# API 28: legacy system-as-root
# API 29: 2 Stage Init
# API 34: latest Android
api_list='23 26 28 29 34'
min_api=23
max_api=34
atd_min_api=30
atd_max_api=34
lsposed_min_api=27
huge_ram_min_api=26
i386_max_api=30
print_title() {
echo -e "\n\033[44;39m${1}\033[0m\n"
@ -222,6 +215,21 @@ case $(uname -m) in
;;
esac
if [ -n "$FORCE_32_BIT" ]; then
case $arch in
'arm64-v8a')
echo "! ARM32 is not supported"
exit 1
;;
'x86_64')
arch=x86
max_api=$i386_max_api
;;
esac
fi
api_list=$(seq $min_api $max_api)
yes | "$sdk" --licenses > /dev/null
curl -L $lsposed_url -o out/lsposed.zip
"$sdk" --channel=3 tools platform-tools emulator