Commit Graph

43 Commits

Author SHA1 Message Date
Yang 6fe36e1748 Update to Node 24. (#466) 2026-03-14 19:10:07 +11:00
Mike Hardy 66283c0319 fix: allow google_apis_ps16k as a valid target (#440)
* test: remove target validator test

these appear to have too much maintenance burden as they only ever
add more over time

* fix: allow google_apis_ps16k and google_apis_playstore_ps16k as valid targets

Fixes #403

Co-authored-by: Yang <reactivecircus@gmail.com>

* fix: remove target validation entirely, any valid sdkmanager target will work

no longer requires code changes here to access new targets

---------

Co-authored-by: Yang <reactivecircus@gmail.com>
2025-07-02 11:45:42 +10:00
munrocket f2bf410054 Fix pre-emulator-launch-script (#439) 2025-06-26 00:48:55 +10:00
Timothy a173d65200 Support API levels for SDK extensions and add missing targets for automotive and desktop. (#428) 2025-03-29 01:04:02 +11:00
Yang e93b947104 Add missing compiled js files from #383. 2024-07-09 12:51:00 +10:00
Kamil Bąk 4b0628e9f8 Support customizing emulator port (#383)
* Add port parameter

* Fix a typo in test description

* Fix avd not being started with correct port

* Fix wrong port being used to kill an emulator if there was an exception
2024-07-02 22:42:44 +10:00
Dmitry Koplyarov 743ec40c5b Add emulator-boot-timeout parameter (#326)
* Add emulator-boot-timeout parameter

* Update action-types.yml
2023-03-09 11:44:31 +11:00
LoveSy 8e947e5bd6 Support non-integer API level (#317)
* Support non-integer API level

* update lib

* Add test

* No need to install platforms.

Mostly application will use different SDK platform.

* Update lib
2023-02-09 23:07:08 +11:00
Matt Johnson-Pint a4845e8d39 Update dependencies (#282)
* Update packages

* Fix TS errors

* rebuild

* Update eslint

See https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md#version-800-2021-02-21

* Fix linting errors

* rebuild
2022-10-28 16:54:00 +11:00
Nils Reichardt 411cd10ea9 Pre Emulator Launch Script (#247)
* Add `pre-emulator-launch-script` to `action.yml`

* Add `pre-emulator-launch-script` in `main.yml`

* Implement pre emulator launch script

* Try to use `pushd`

* print working directory

* Add `README`

* Run `npm run build`

* Fix `working-directory`

* Run `npm run build`

* Run pre emulator launch in group

* Run `npm run build`

* Update README.md

Co-authored-by: Yang <reactivecircus@gmail.com>

* Add type "pre-emulator-launch-script"

Co-authored-by: Yang <reactivecircus@gmail.com>
2022-10-27 02:33:13 +11:00
notbigdata 7809d88d54 Auto detect hardware acceleration on Linux (#254) 2022-07-12 18:32:26 +10:00
Tim Malseed cc3dd8cbef Add option to specify AVD heap size (#245) 2022-04-26 23:36:59 +10:00
Yang 5bd7b4aaec Add missing generated .js files. 2022-02-18 01:35:48 +11:00
Yang cc46524d3f Add support for enabling hardware keyboard. 2021-12-25 02:12:17 +11:00
Yang 1427331a62 Support choosing channel to download SDK components from. 2021-08-28 19:44:11 +10:00
Yang eba1fbfb59 Add option to set AVD RAM size. 2021-06-26 23:45:24 +10:00
Yang 854ed15ed0 Add force-avd-creation to skip avd creation if avd with same name exists. Update workflow to test snapshot caching. 2021-06-20 01:41:30 +10:00
Steve Stotter 5e38ea2647 Add option to toggle Linux hardware acceleration 2021-05-28 16:36:37 +10:00
Afzal Najam 84b9418977 Add option to disable spellcheck
Add input-validator and tests
2021-04-08 00:44:27 +10:00
Brian Dickens 0d47f0813d Avoid Wrapping Script Code In Quotes
The exec() command only runs a program with literal argument strings.
It does not know how to do things like expanding environment variables,
or piping/redirection.  Hence the way to get "shell intelligence"
is to use exec() to run the `sh` process with the command line string
as a parameter.

But the method being used to do this was:

    exec.exec(`sh -c \\"${script}"`)

This has problems, because wrapping the script in quotes creates
issues when the script itself contains quotes.  Escaping the string
correctly is a non-trivial problem, which also would create "noise"
in the debug output which would add confusion.

http://mywiki.wooledge.org/BashFAQ/050

The easiest way to work around this here is to use the array form of
exec() to pass exactly two parameters to `sh`.  No manipulation of the
script string is needed with this approach:

    exec.exec("sh", ["-c", script])

There are more cases in the project of `sh -c` usage which should also
be changed, and likely abstracted (shellExec()?)  But this small patch
just fixes the most important case for the user-provided script.

---

Additionally, this removes the escaped backslash (`\\`) from the
start of the executed command.  That was presumably to suppress the
use of aliases:

https://unix.stackexchange.com/questions/524254/why-are-backslashes-included-in-this-shell-script

But because this is invoking a non-interactive shell session, aliases
would not apply.  Hence the extra backslash shouldn't be needed.
2021-03-09 18:49:23 +11:00
Afzal Najam d85239a9fb Add option to modify the number of cores 2021-03-03 08:41:55 +11:00
Yang b0f3c521a5 Support specifying SD card path or size. 2020-12-27 20:37:13 +11:00
Yang 53151f5236 Add support for using google_apis_playstore system images. 2020-10-16 14:32:01 +11:00
Yang 327f6f1c1f Update packages. 2020-07-18 19:43:39 +10:00
Yang f5435af41b Add support for specifying a custom name used for creating AVD. 2020-05-01 20:11:25 +10:00
Yang 438dce7110 Support specifying versions of NDK and CMake to install. 2020-04-11 21:02:42 +10:00
Yang Chen 345ace6178 Support running on linux without hardware accleration. 2020-03-28 14:10:50 +11:00
Yang Chen 4a949058e2 Use new cmdline-tools with support for running sdkmanager and avdmanager with Java 8+. 2020-03-05 14:34:19 +11:00
Yang Chen ff311e8a7d Add support for setting a custom working-directory. 2020-02-15 18:29:17 +11:00
Yang Chen 4082c705ad Fix escaped environment variables in script. 2020-02-04 12:25:35 +11:00
Yang Chen e756009f0d Force use Java 8 for sdkmanager and avdmanager. 2020-01-20 03:52:46 +11:00
Yang Chen 12eba85b00 Add support for pinning specific emulator build. 2019-12-15 04:27:24 +11:00
Yang Chen c03965e565 Fix script execution order. Run test fixture in workflow. 2019-12-15 02:15:41 +11:00
Yang Chen 9739504a54 Support multi-line script. 2019-12-14 00:30:11 +11:00
Yang Chen 0d276b963a Add support for providing any emulator launch options as action input. Remove headless input which might overlap with emulator-options. 2019-12-07 17:54:13 +11:00
Yang Chen 83dda62a70 Fail action when script fails. 2019-11-09 03:34:10 +11:00
Yang Chen a6ea5be5bb Add missing js. 2019-11-09 00:30:21 +11:00
Yang Chen 9f3feeefc6 Single line script. 2019-11-09 00:27:35 +11:00
Yang Chen 0035a64068 Add missing compiled js files. 2019-11-08 23:36:53 +11:00
Yang Chen 0f9b17b151 Add support for configuring hardware profile and running custom script. 2019-11-08 22:42:01 +11:00
Yang Chen 34df1eaf0e Add emulator-launcher. 2019-11-08 18:33:07 +11:00
Yang Chen 137c96a972 Add input validations with tests. 2019-11-06 22:14:03 +11:00
Yang Chen 8425a60746 Initial commit. 2019-11-06 02:46:20 +11:00