Skip to content

Commit 39a788b

Browse files
committed
feature(ci): update docs
1 parent f96d9cd commit 39a788b

File tree

3 files changed

+45
-39
lines changed

3 files changed

+45
-39
lines changed

.github/workflows/test-macos.yml

Lines changed: 0 additions & 33 deletions
This file was deleted.

.github/workflows/test-linux.yml renamed to .github/workflows/test.yml

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
name: "Test Linux"
1+
name: "Test"
22
on: [push, pull_request]
33
jobs:
4-
test:
4+
test-ubuntu-latest:
55
runs-on: ubuntu-latest
66
steps:
77
- uses: actions/checkout@v1
@@ -36,3 +36,33 @@ jobs:
3636
with:
3737
name: logcat
3838
path: artifacts/logcat.log
39+
test-macos-12:
40+
runs-on: macOS-12
41+
steps:
42+
- uses: actions/checkout@v1
43+
- name: Set up JDK 17
44+
uses: actions/setup-java@v4
45+
with:
46+
distribution: 'temurin'
47+
java-version: '17'
48+
- name: test install-sdk
49+
run: npm config delete prefix && source ~/.nvm/nvm.sh && nvm install v16.15.0 && npm install && npm ci && npm run build
50+
working-directory: install-sdk
51+
- name: test emulator-run-cmd
52+
run: npm config delete prefix && source ~/.nvm/nvm.sh && nvm install v16.15.0 && npm install && npm ci && npm run build
53+
working-directory: emulator-run-cmd
54+
- uses: ./install-sdk
55+
name: install sdk
56+
- run: sdkmanager platform-tools
57+
- run: adb devices
58+
- uses: ./emulator-run-cmd
59+
with:
60+
api: 25
61+
tag: default
62+
abi: x86
63+
cmd: adb shell getprop
64+
bootTimeout: 500
65+
- uses: actions/upload-artifact@v1
66+
with:
67+
name: logcat
68+
path: artifacts/logcat.log

README.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This is a collection of GitHub Actions for Android development
44

55
# Requirements
66

7-
This is only tested with **macOS-10.15** environment. It might work on linux but there is no support for kvm there so don't expect to have api 26+ available there.
7+
Tested with **macOS-12** and **ubuntu-latest** runner images. It might work using other runners (including self-hosted ones) but there is no support for them.
88

99
## Android SDK
1010
This repo provides an action for installing the Android SDK on the build agent. It will override whatever setup is
@@ -18,7 +18,7 @@ steps:
1818
- uses: actions/checkout@v1
1919

2020
# Download & install the Android SDK.
21-
- uses: malinskiy/action-android/install-sdk@release/0.1.3
21+
- uses: malinskiy/action-android/install-sdk@release/0.1.6
2222

2323
# Set up platform tools like adb.
2424
- run: sdkmanager platform-tools
@@ -38,14 +38,23 @@ I suggest to use `./gradlew` to minimize the dependency on environment setup.
3838
`action-android/emulator-run-cmd` provide an action which installs the emulator packages, starts the emulator and waits
3939
until it's booted. After this it will execute the provided cmd and stop the running emulator.
4040

41-
It's imperative(!) to use `runs-on: macOS-10.15` if you want to have hardware acceleration for your emulator.
41+
It's imperative(!) to use `runs-on: ubuntu-latest` with KVM enabled or `runs-on: macOS-12` if you want to have hardware acceleration for your emulator.
42+
43+
### Enabling KVM for ubunut-latest
44+
```
45+
- name: Enable KVM
46+
run: |
47+
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
48+
sudo udevadm control --reload-rules
49+
sudo udevadm trigger --name-match=kvm
50+
```
4251
4352
### Usage
4453
4554
```yaml
4655
steps:
4756
- uses: actions/checkout@v1
48-
- uses: malinskiy/action-android/emulator-run-cmd@release/0.1.3
57+
- uses: malinskiy/action-android/emulator-run-cmd@release/0.1.6
4958
with:
5059
cmd: ./gradlew integrationTest
5160
api: 25

0 commit comments

Comments
 (0)