You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* main:
Prepare for release 2.18.0.
Add sample workflow for AVD snapshot caching.
Add `force-avd-creation` to Configurations table in README.md.
Add force-avd-creation to skip avd creation if avd with same name exists. Update workflow to test snapshot caching.
Add accompanist to adoption list
Gradle 7.1.
Bump glob-parent from 5.1.1 to 5.1.2
Bump ws from 7.3.1 to 7.4.6
Copy file name to clipboardExpand all lines: CHANGELOG.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,9 @@
1
1
# Change Log
2
2
3
+
## v2.18.0
4
+
5
+
* Add `force-avd-creation` which when set to `false` will skip avd creation if avd with same name exists. This enables AVD snapshot caching which can significantly reduce emulator startup time. See [README.md](https://github.com/ReactiveCircus/android-emulator-runner/blob/main/README.md#usage) for a sample workflow. - [#159](https://github.com/ReactiveCircus/android-emulator-runner/pull/159)
6
+
3
7
## v2.17.0
4
8
5
9
* Add option to toggle Linux hardware acceleration - [#154](https://github.com/ReactiveCircus/android-emulator-runner/pull/154)@stevestotter
Copy file name to clipboardExpand all lines: README.md
+85-29Lines changed: 85 additions & 29 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,14 +31,14 @@ jobs:
31
31
test:
32
32
runs-on: macos-latest
33
33
steps:
34
-
- name: checkout
35
-
uses: actions/checkout@v2
36
-
37
-
- name: run tests
38
-
uses: reactivecircus/android-emulator-runner@v2
39
-
with:
40
-
api-level: 29
41
-
script: ./gradlew connectedCheck
34
+
- name: checkout
35
+
uses: actions/checkout@v2
36
+
37
+
- name: run tests
38
+
uses: reactivecircus/android-emulator-runner@v2
39
+
with:
40
+
api-level: 29
41
+
script: ./gradlew connectedCheck
42
42
```
43
43
44
44
We can also leverage GitHub Actions's build matrix to test across multiple configurations:
@@ -52,17 +52,17 @@ jobs:
52
52
api-level: [21, 23, 29]
53
53
target: [default, google_apis]
54
54
steps:
55
-
- name: checkout
56
-
uses: actions/checkout@v2
57
-
58
-
- name: run tests
59
-
uses: reactivecircus/android-emulator-runner@v2
60
-
with:
61
-
api-level: ${{ matrix.api-level }}
62
-
target: ${{ matrix.target }}
63
-
arch: x86_64
64
-
profile: Nexus 6
65
-
script: ./gradlew connectedCheck
55
+
- name: checkout
56
+
uses: actions/checkout@v2
57
+
58
+
- name: run tests
59
+
uses: reactivecircus/android-emulator-runner@v2
60
+
with:
61
+
api-level: ${{ matrix.api-level }}
62
+
target: ${{ matrix.target }}
63
+
arch: x86_64
64
+
profile: Nexus 6
65
+
script: ./gradlew connectedCheck
66
66
```
67
67
68
68
If you need specific versions of **NDK** and **CMake** installed:
@@ -72,16 +72,70 @@ jobs:
72
72
test:
73
73
runs-on: macos-latest
74
74
steps:
75
-
- name: checkout
76
-
uses: actions/checkout@v2
77
-
78
-
- name: run tests
79
-
uses: reactivecircus/android-emulator-runner@v2
80
-
with:
81
-
api-level: 29
82
-
ndk: 21.0.6113669
83
-
cmake: 3.10.2.4988404
84
-
script: ./gradlew connectedCheck
75
+
- name: checkout
76
+
uses: actions/checkout@v2
77
+
78
+
- name: run tests
79
+
uses: reactivecircus/android-emulator-runner@v2
80
+
with:
81
+
api-level: 29
82
+
ndk: 21.0.6113669
83
+
cmake: 3.10.2.4988404
84
+
script: ./gradlew connectedCheck
85
+
```
86
+
87
+
We can significantly reduce emulator startup time by setting up AVD snapshot caching:
88
+
89
+
1. add an `actions/cache@v2` step for caching the `avd`
90
+
2. add a `reactivecircus/android-emulator-runner@v2` step to generate a clean snapshot - specify `emulator-options` without `no-snapshot`
91
+
3. add another `reactivecircus/android-emulator-runner@v2` step to run your tests using existing AVD / snapshot - specify `emulator-options` with `no-snapshot-save`
|`cores`| Optional | 2 | Number of cores to use for the emulator (`hw.cpu.ncore` in config.ini). |
96
150
|`sdcard-path-or-size`| Optional | N/A | Path to the SD card image for this AVD or the size of a new SD card image to create for this AVD, in KB or MB, denoted with K or M. - e.g. `path/to/sdcard`, or `1000M`. |
97
151
|`avd-name`| Optional |`test`| Custom AVD name used for creating the Android Virtual Device. |
152
+
|`force-avd-creation`| Optional |`true`| Whether to force create the AVD by overwriting an existing AVD with the same name as `avd-name` - `true` or `false`. |
98
153
|`emulator-options`| Optional | See below | Command-line options used when launching the emulator (replacing all default options) - e.g. `-no-window -no-snapshot -camera-back emulated`. |
99
154
|`disable-animations`| Optional |`true`| Whether to disable animations - `true` or `false`. |
100
155
|`disable-spellchecker`| Optional |`false`| Whether to disable spellchecker - `true` or `false`. |
@@ -143,5 +198,6 @@ These are some of the open-source projects using (or used) **Android Emulator Ru
0 commit comments