-
Notifications
You must be signed in to change notification settings - Fork 0
93 lines (81 loc) · 2.94 KB
/
Copy pathandroid-runtime-gate.yml
File metadata and controls
93 lines (81 loc) · 2.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# SPDX-FileCopyrightText: Copyright © 2026 ReallyMe LLC. All rights reserved
#
# SPDX-License-Identifier: Apache-2.0
name: Android Runtime Gate
on:
workflow_dispatch:
inputs:
release_sha:
description: Optional exact main commit SHA to test. Leave blank to use current origin/main.
required: false
type: string
default: ""
permissions:
contents: read
concurrency:
group: android-runtime-gate-${{ inputs.release_sha || github.ref_name }}
cancel-in-progress: false
jobs:
android-runtime:
name: Android R8 runtime
runs-on: ubuntu-latest
timeout-minutes: 35
steps:
- name: Checkout main for SHA resolution
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
with:
ref: main
fetch-depth: 0
- name: Resolve runtime SHA
id: resolve-runtime-sha
env:
RELEASE_SHA_INPUT: ${{ inputs.release_sha }}
run: |
git fetch --no-tags origin main
if [ -n "${RELEASE_SHA_INPUT}" ]; then
if [[ ! "${RELEASE_SHA_INPUT}" =~ ^[0-9a-f]{40}$ ]]; then
echo "::error::release_sha must be blank or a lowercase 40-character commit SHA"
exit 1
fi
runtime_sha="${RELEASE_SHA_INPUT}"
else
runtime_sha="$(git rev-parse origin/main)"
fi
if ! git merge-base --is-ancestor "${runtime_sha}" origin/main; then
echo "::error::runtime SHA is not in current main history"
exit 1
fi
git checkout --detach "${runtime_sha}"
echo "runtime_sha=${runtime_sha}" >> "${GITHUB_OUTPUT}"
echo "Using runtime SHA ${runtime_sha}"
- name: Install Java
uses: actions/setup-java@0f481fcb613427c0f801b606911222b5b6f3083a # v5
with:
distribution: temurin
java-version: '21'
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@fa04a1451ff1842e2626ccb99004d0195b455a88 # master
with:
toolchain: 1.96.0
- name: Install Node
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
with:
node-version: '24'
- name: Install Android NDK
run: |
{ yes 2>/dev/null || true; } | "${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager" "ndk;29.0.14206865"
echo "ANDROID_NDK_HOME=${ANDROID_HOME}/ndk/29.0.14206865" >> "${GITHUB_ENV}"
- name: Enable Android emulator KVM access
run: |
if [ ! -e /dev/kvm ]; then
echo "::error::/dev/kvm is required for Android x86_64 emulator runtime tests"
exit 1
fi
sudo chown "${USER}:${USER}" /dev/kvm
test -r /dev/kvm
test -w /dev/kvm
- name: Test Android consumer R8 runtime
timeout-minutes: 20
run: scripts/test_android_consumer_r8_runtime.sh
env:
REALLYME_CODEC_ANDROID_AVD: reallyme-r8-gate