Test 16k on Cuttlefish

This commit is contained in:
topjohnwu 2024-08-15 22:51:40 -07:00
parent e9e2ecf2dd
commit 9db2e99086
2 changed files with 11 additions and 9 deletions

View File

@ -170,7 +170,7 @@ jobs:
logcat.log
cf_test:
name: Test ${{ matrix.branch }} (${{ matrix.target }})
name: Test ${{ matrix.device }}
runs-on: ubuntu-24.04
needs: build
env:
@ -180,7 +180,9 @@ jobs:
matrix:
include:
- branch: "aosp-main"
target: "aosp_cf_x86_64_phone-trunk_staging-userdebug"
device: "aosp_cf_x86_64_phone"
- branch: "aosp-main-throttled"
device: "aosp_cf_x86_64_phone_pgagnostic"
steps:
- name: Check out
@ -197,7 +199,7 @@ jobs:
- name: Setup Cuttlefish environment
run: |
scripts/cuttlefish.sh setup
scripts/cuttlefish.sh download ${{ matrix.branch }} ${{ matrix.target }}
scripts/cuttlefish.sh download ${{ matrix.branch }} ${{ matrix.device }}
- name: Run Cuttlefish test
timeout-minutes: 10
@ -207,7 +209,7 @@ jobs:
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: "cvd-logs"
name: "cvd-logs-${{ matrix.device }}"
path: |
/home/runner/aosp_cf_phone/cuttlefish/instances/cvd-1/logs
/home/runner/aosp_cf_phone/cuttlefish/instances/cvd-1/cuttlefish_config.json

View File

@ -32,22 +32,22 @@ setup_env() {
download_cf() {
local branch=$1
local target=$2
local device=$2
if [ -z $branch ]; then
branch='aosp-main'
fi
if [ -z $target ]; then
target='aosp_cf_x86_64_phone-trunk_staging-userdebug'
if [ -z $device ]; then
device='aosp_cf_x86_64_phone'
fi
local device=$(echo $target | cut -d '-' -f 1)
local target="${device}-trunk_staging-userdebug"
local build_id=$(curl -sL https://ci.android.com/builds/branches/${branch}/status.json | \
jq -r ".targets[] | select(.name == \"$target\") | .last_known_good_build")
local sys_img_url="https://ci.android.com/builds/submitted/${build_id}/${target}/latest/raw/${device}-img-${build_id}.zip"
local host_pkg_url="https://ci.android.com/builds/submitted/${build_id}/${target}/latest/raw/cvd-host_package.tar.gz"
print_title "* Download $branch ($build_id) $target images"
print_title "* Download $target ($build_id) images"
curl -L $sys_img_url -o aosp_cf_phone-img.zip
curl -LO $host_pkg_url
rm -rf $CF_HOME