|
1 | 1 | import * as core from '@actions/core'; |
2 | 2 | import { installAndroidSdk } from './sdk-installer'; |
3 | | -import { checkApiLevel, checkTarget, checkArch, checkDisableAnimations, checkEmulatorBuild, checkDisableSpellchecker } from './input-validator'; |
| 3 | +import { checkApiLevel, checkTarget, checkArch, checkDisableAnimations, checkEmulatorBuild, checkDisableSpellchecker, checkDisableLinuxHardwareAcceleration } from './input-validator'; |
4 | 4 | import { launchEmulator, killEmulator } from './emulator-manager'; |
5 | 5 | import * as exec from '@actions/exec'; |
6 | 6 | import { parseScript } from './script-parser'; |
@@ -67,6 +67,12 @@ async function run() { |
67 | 67 | const disableSpellchecker = disableSpellcheckerInput === 'true'; |
68 | 68 | console.log(`disable spellchecker: ${disableSpellchecker}`); |
69 | 69 |
|
| 70 | + // disable linux hardware acceleration |
| 71 | + const disableLinuxHardwareAccelerationInput = core.getInput('disable-linux-hw-accel'); |
| 72 | + checkDisableLinuxHardwareAcceleration(disableLinuxHardwareAccelerationInput); |
| 73 | + const disableLinuxHardwareAcceleration = disableLinuxHardwareAccelerationInput === 'true'; |
| 74 | + console.log(`disable Linux hardware acceleration: ${disableLinuxHardwareAcceleration}`); |
| 75 | + |
70 | 76 | // emulator build |
71 | 77 | const emulatorBuildInput = core.getInput('emulator-build'); |
72 | 78 | if (emulatorBuildInput) { |
@@ -108,7 +114,7 @@ async function run() { |
108 | 114 | await installAndroidSdk(apiLevel, target, arch, emulatorBuild, ndkVersion, cmakeVersion); |
109 | 115 |
|
110 | 116 | // launch an emulator |
111 | | - await launchEmulator(apiLevel, target, arch, profile, cores, sdcardPathOrSize, avdName, emulatorOptions, disableAnimations, disableSpellchecker); |
| 117 | + await launchEmulator(apiLevel, target, arch, profile, cores, sdcardPathOrSize, avdName, emulatorOptions, disableAnimations, disableSpellchecker, disableLinuxHardwareAcceleration); |
112 | 118 |
|
113 | 119 | // execute the custom script |
114 | 120 | try { |
|
0 commit comments