mirror of
https://github.com/reactivecircus/android-emulator-runner.git
synced 2026-09-04 11:29:31 +00:00
Implement sdk-installer. Add test pipeline with job matrix.
This commit is contained in:
+4
-4
@@ -15,28 +15,28 @@ async function run() {
|
||||
// TODO use InputOptions {true}
|
||||
const apiLevel = core.getInput('api-level');
|
||||
// TODO check apiLevel is number and within valid range
|
||||
console.log(`API level - ${apiLevel}`);
|
||||
console.log(`API level: ${apiLevel}`);
|
||||
|
||||
// target is optional with default
|
||||
const target = core.getInput('target');
|
||||
if (target !== 'default' && target !== 'google_apis') {
|
||||
throw new Error(`Target ${target} is unknown. Please use either 'default' or 'google_apis'.`);
|
||||
}
|
||||
console.log(`target - ${target}`);
|
||||
console.log(`target: ${target}`);
|
||||
|
||||
// abi is optional with default
|
||||
const abi = core.getInput('abi');
|
||||
if (abi !== 'x86' && abi !== 'x86_64') {
|
||||
throw new Error(`abi ${abi} is unknown (ARM-based emulators are not supported). Please use either 'x86' or 'x86_64'.`);
|
||||
}
|
||||
console.log(`cpu/abi - ${abi}`);
|
||||
console.log(`cpu/abi: ${abi}`);
|
||||
|
||||
// headless is optional with default
|
||||
const headless = core.getInput('headless');
|
||||
if (headless !== 'true' && headless !== 'false') {
|
||||
throw new Error(`Input 'headless' should be either 'true' or 'false'.`);
|
||||
}
|
||||
console.log(`headless mode - ${headless}`);
|
||||
console.log(`headless mode: ${headless}`);
|
||||
|
||||
// install SDK
|
||||
await installAndroidSdk(Number(apiLevel), target, abi);
|
||||
|
||||
Reference in New Issue
Block a user