|
14 | 14 | - name: Typecheck files |
15 | 15 | run: yarn typecheck |
16 | 16 |
|
17 | | - test-android: |
18 | | - runs-on: ubuntu-latest |
19 | | - env: |
20 | | - TURBO_CACHE_DIR: .turbo/android |
21 | | - steps: |
22 | | - - name: Checkout |
23 | | - uses: actions/checkout@v4 |
24 | | - |
25 | | - - name: Turn off addons |
26 | | - run: | |
27 | | - node ./scripts/turnOffEverything.js |
28 | | -
|
29 | | - - name: Setup |
30 | | - uses: ./.github/actions/setup |
31 | | - |
32 | | - - name: Install JDK |
33 | | - uses: actions/setup-java@v3 |
34 | | - with: |
35 | | - distribution: "temurin" |
36 | | - java-version: "17" |
37 | | - |
38 | | - - name: Enable KVM |
39 | | - run: | |
40 | | - echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules |
41 | | - sudo udevadm control --reload-rules |
42 | | - sudo udevadm trigger --name-match=kvm |
43 | | -
|
44 | | - - name: Gradle cache |
45 | | - uses: gradle/actions/setup-gradle@v3 |
46 | | - |
47 | | - - name: AVD cache |
48 | | - uses: actions/cache@v4 |
49 | | - id: avd-cache |
50 | | - with: |
51 | | - path: | |
52 | | - ~/.android/avd/* |
53 | | - ~/.android/adb* |
54 | | - key: avd-29 |
55 | | - |
56 | | - - name: create AVD and generate snapshot for caching |
57 | | - if: steps.avd-cache.outputs.cache-hit != 'true' |
58 | | - uses: reactivecircus/android-emulator-runner@v2 |
59 | | - with: |
60 | | - api-level: 29 |
61 | | - force-avd-creation: false |
62 | | - emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none |
63 | | - disable-animations: false |
64 | | - script: echo "Generated AVD snapshot for caching." |
65 | | - |
66 | | - - name: Give execute permissions to script |
67 | | - run: chmod +x ./scripts/test-android.sh |
68 | | - |
69 | | - - name: run tests |
70 | | - uses: reactivecircus/android-emulator-runner@v2 |
71 | | - with: |
72 | | - api-level: 29 |
73 | | - force-avd-creation: false |
74 | | - emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none |
75 | | - disable-animations: true |
76 | | - script: | |
77 | | - ./scripts/test-android.sh |
78 | | -
|
79 | 17 | test-ios: |
80 | 18 | runs-on: macos-latest |
81 | 19 | steps: |
@@ -244,11 +182,101 @@ jobs: |
244 | 182 | run: | |
245 | 183 | ./scripts/test-ios.sh |
246 | 184 |
|
| 185 | + test-android: |
| 186 | + runs-on: ubuntu-latest |
| 187 | + |
| 188 | + steps: |
| 189 | + - name: Free Disk Space (Ubuntu) |
| 190 | + uses: insightsengineering/disk-space-reclaimer@v1 |
| 191 | + with: |
| 192 | + # this might remove tools that are actually needed, |
| 193 | + # if set to "true" but frees about 6 GB |
| 194 | + tools-cache: false |
| 195 | + |
| 196 | + # all of these default to true, but feel free to set to |
| 197 | + # "false" if necessary for your workflow |
| 198 | + android: false |
| 199 | + dotnet: true |
| 200 | + haskell: true |
| 201 | + large-packages: true |
| 202 | + swap-storage: true |
| 203 | + docker-images: true |
| 204 | + |
| 205 | + - name: Checkout |
| 206 | + uses: actions/checkout@v4 |
| 207 | + |
| 208 | + - name: Turn off addons |
| 209 | + run: | |
| 210 | + node ./scripts/turnOffEverything.js |
| 211 | +
|
| 212 | + - name: Setup |
| 213 | + uses: ./.github/actions/setup |
| 214 | + |
| 215 | + - name: Install JDK |
| 216 | + uses: actions/setup-java@v3 |
| 217 | + with: |
| 218 | + distribution: "temurin" |
| 219 | + java-version: "17" |
| 220 | + |
| 221 | + - name: Enable KVM |
| 222 | + run: | |
| 223 | + echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules |
| 224 | + sudo udevadm control --reload-rules |
| 225 | + sudo udevadm trigger --name-match=kvm |
| 226 | +
|
| 227 | + - name: Gradle cache |
| 228 | + uses: gradle/actions/setup-gradle@v3 |
| 229 | + |
| 230 | + - name: AVD cache |
| 231 | + uses: actions/cache@v4 |
| 232 | + id: avd-cache |
| 233 | + with: |
| 234 | + path: | |
| 235 | + ~/.android/avd/* |
| 236 | + ~/.android/adb* |
| 237 | + key: avd-29 |
| 238 | + |
| 239 | + - name: create AVD and generate snapshot for caching |
| 240 | + if: steps.avd-cache.outputs.cache-hit != 'true' |
| 241 | + uses: reactivecircus/android-emulator-runner@v2 |
| 242 | + with: |
| 243 | + api-level: 29 |
| 244 | + force-avd-creation: false |
| 245 | + emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none |
| 246 | + disable-animations: false |
| 247 | + script: echo "Generated AVD snapshot for caching." |
| 248 | + |
| 249 | + - name: Give execute permissions to script |
| 250 | + run: chmod +x ./scripts/test-android.sh |
| 251 | + |
| 252 | + - name: run tests |
| 253 | + uses: reactivecircus/android-emulator-runner@v2 |
| 254 | + with: |
| 255 | + api-level: 29 |
| 256 | + force-avd-creation: false |
| 257 | + emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none |
| 258 | + disable-animations: true |
| 259 | + script: | |
| 260 | + ./scripts/test-android.sh |
| 261 | +
|
247 | 262 | test-android-sqlcipher: |
248 | 263 | runs-on: ubuntu-latest |
249 | | - env: |
250 | | - TURBO_CACHE_DIR: .turbo/android |
251 | 264 | steps: |
| 265 | + - name: Free Disk Space (Ubuntu) |
| 266 | + uses: insightsengineering/disk-space-reclaimer@v1 |
| 267 | + with: |
| 268 | + # this might remove tools that are actually needed, |
| 269 | + # if set to "true" but frees about 6 GB |
| 270 | + tools-cache: false |
| 271 | + |
| 272 | + # all of these default to true, but feel free to set to |
| 273 | + # "false" if necessary for your workflow |
| 274 | + android: false |
| 275 | + dotnet: true |
| 276 | + haskell: true |
| 277 | + large-packages: true |
| 278 | + swap-storage: true |
| 279 | + docker-images: true |
252 | 280 | - name: Checkout |
253 | 281 | uses: actions/checkout@v4 |
254 | 282 |
|
|
0 commit comments