-
Notifications
You must be signed in to change notification settings - Fork 62
363 lines (319 loc) · 11.7 KB
/
include-integration-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
name: Gradle Project Integration Tests
on:
workflow_call:
inputs:
version-label:
required: true
type: string
env:
REALM_DISABLE_ANALYTICS: true
REALM_PRINT_ANALYTICS: true
REALM_FAIL_ON_ANALYTICS_ERRORS: true
jobs:
# TODO: The Monkey seems to crash the app all the time, but with failures that are not coming from the app. Figure out why.
# android-sample-app:
# runs-on: macos-12
# steps:
# - name: Checkout code
# uses: actions/checkout@v4
# - name: Setup Java 11
# uses: actions/setup-java@v4
# with:
# distribution: ${{ vars.VERSION_JAVA_DISTRIBUTION }}
# java-version: 11
# - name: Setup Gradle and task/dependency caching
# uses: gradle/actions/setup-gradle@v3
# with:
# cache-read-only: false
# - name: Restore m2-buildrepo
# uses: actions/download-artifact@v4
# with:
# name: all-packages-${{ needs.check-cache.outputs.version-label }}
# path: ./packages/build/m2-buildrepo
# # TODO Can we read api level from Config.kt
# - name: Run Monkey on Android Sample
# env:
# SSH_AUTH_SOCK: /tmp/ssh_agent.sock
# uses: reactivecircus/android-emulator-runner@v2
# with:
# api-level: 33
# target: google_apis # default is not available on 33 yet.
# arch: x86_64
# profile: Nexus 6
# disk-size: 4096M
# ram-size: 2048M
# heap-size: 1024M
# script: |
# cd examples/kmm-sample && ./gradlew installRelease
# $ANDROID_SDK_ROOT/platform-tools/adb shell monkey --throttle 50 --pct-syskeys 0 -p io.realm.example.kmmsample.androidApp -v 500 --kill-process-after-error
android-min-versions-compatibility:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Java 11
uses: actions/setup-java@v4
with:
distribution: ${{ vars.VERSION_JAVA_DISTRIBUTION }}
java-version: ${{ vars.VERSION_JAVA }}
- name: Setup Gradle and task/dependency caching
uses: gradle/actions/setup-gradle@v3
with:
cache-read-only: false
- name: Restore m2-buildrepo
uses: actions/download-artifact@v4
with:
name: all-packages-${{ inputs.version-label }}
path: ./packages/build/m2-buildrepo
# TODO Can we read api level from Config.kt
- name: Build Android on minimum versions
working-directory: examples/min-android-sample
run: |
java --version
./gradlew assembleDebug jvmJar
realm-java-compatibiliy:
runs-on: macos-12
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Java 11
uses: actions/setup-java@v4
with:
distribution: ${{ vars.VERSION_JAVA_DISTRIBUTION }}
java-version: ${{ vars.VERSION_JAVA }}
- name: Setup Gradle and task/dependency caching
uses: gradle/actions/setup-gradle@v3
with:
cache-read-only: false
- name: Restore m2-buildrepo
uses: actions/download-artifact@v4
with:
name: all-packages-${{ inputs.version-label }}
path: ./packages/build/m2-buildrepo
# - name: AVD cache
# uses: actions/cache@v4
# id: avd-cache
# with:
# path: |
# ~/.android/avd/*
# ~/.android/adb*
# key: android-emulator-avd-33
# - name: create AVD and generate snapshot for caching
# if: steps.avd-cache.outputs.cache-hit != 'true'
# uses: reactivecircus/android-emulator-runner@v2
# with:
# api-level: 33
# target: default
# # target: aosp_atd
# arch: x86_64
# disk-size: 4096M
# ram-size: 2048M
# heap-size: 1024M
# force-avd-creation: false
# emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
# disable-animations: true
# channel: canary
# script: echo "Generated AVD snapshot for caching."
# TODO Can we read api level from Config.kt
- name: Run Gradle Plugin Test project
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
uses: reactivecircus/android-emulator-runner@v2
with:
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
force-avd-creation: false
api-level: ${{ vars.VERSION_ANDROID_EMULATOR_API_LEVEL }}
target: default
# target: aosp_atd
arch: x86_64
# profile: Nexus 6
disk-size: 4096M
ram-size: 2048M
heap-size: 1024M
channel: canary
script: cd examples/realm-java-compatibility && ./gradlew connectedAndroidTest -PincludeSdkModules=false --info
# TODO: This fails with `Error: Cannot read property 'trim' of undefined`. Possible a bug in the action.
# For now, just disable this as there is only a single unit test anyway.
# - name: Publish Unit Test Results
# uses: dorny/test-reporter@v1
# if: always() || failure()
# with:
# name: Results - Realm Java Compatibility
# path: ./examples/realm-java-compatibility/app/build/**/TEST-*.xml
# reporter: java-junit
# list-suites: failed
# list-tests: failed
# fail-on-error: true
build-benchmarks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Java 11
uses: actions/setup-java@v4
with:
distribution: ${{ vars.VERSION_JAVA_DISTRIBUTION }}
java-version: ${{ vars.VERSION_JAVA }}
- name: Setup Gradle and task/dependency caching
uses: gradle/actions/setup-gradle@v3
with:
cache-read-only: false
- name: Restore m2-buildrepo
uses: actions/download-artifact@v4
with:
name: all-packages-${{ inputs.version-label }}
path: ./packages/build/m2-buildrepo
- name: Build benchmarks
working-directory: benchmarks
run: ./gradlew assemble
gradle-plugin-integration:
strategy:
matrix:
type: [current, gradle72, gradle75]
include:
- type: current
path: integration-tests/gradle/current
arguments: integrationTest
- type: gradle72
path: integration-tests/gradle/gradle72-test
arguments: integrationTest
- type: gradle75
path: integration-tests/gradle/gradle75-test
arguments: integrationTest
runs-on: macos-12
steps:
- uses: actions/checkout@v4
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Java 11
uses: actions/setup-java@v4
with:
distribution: ${{ vars.VERSION_JAVA_DISTRIBUTION }}
java-version: ${{ vars.VERSION_JAVA }}
- name: Setup Gradle and task/dependency caching
uses: gradle/actions/setup-gradle@v3
with:
cache-read-only: false
- name: Restore m2-buildrepo
uses: actions/download-artifact@v4
with:
name: all-packages-${{ inputs.version-label }}
path: ./packages/build/m2-buildrepo
# - name: AVD cache
# uses: actions/cache@v4
# id: avd-cache
# with:
# path: |
# ~/.android/avd/*
# ~/.android/adb*
# key: android-emulator-avd-33
# - name: create AVD and generate snapshot for caching
# if: steps.avd-cache.outputs.cache-hit != 'true'
# uses: reactivecircus/android-emulator-runner@v2
# with:
# api-level: 33
# target: default
# # target: aosp_atd
# arch: x86_64
# disk-size: 4096M
# ram-size: 2048M
# heap-size: 1024M
# force-avd-creation: false
# emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
# disable-animations: true
# channel: canary
# script: echo "Generated AVD snapshot for caching."
# TODO Can we read api level from Config.kt
- name: Run Gradle Plugin Test project
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
uses: reactivecircus/android-emulator-runner@v2
with:
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
force-avd-creation: false
api-level: ${{ vars.VERSION_ANDROID_EMULATOR_API_LEVEL }}
target: default
# target: aosp_atd
arch: x86_64
# profile: Nexus 6
disk-size: 4096M
ram-size: 2048M
heap-size: 1024M
channel: canary
script: cd ${{ matrix.path }} && ./gradlew ${{ matrix.arguments }} --info
gradle-plugin-integration-java-17:
strategy:
matrix:
type: [gradle8, gradle85]
include:
- type: gradle8
path: integration-tests/gradle/gradle8-test
arguments: integrationTest
- type: gradle85
path: integration-tests/gradle/gradle85-test
arguments: integrationTest
runs-on: macos-12
steps:
- uses: actions/checkout@v4
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Java 17
uses: actions/setup-java@v4
with:
distribution: ${{ vars.VERSION_JAVA_DISTRIBUTION }}
java-version: 17
- name: Setup Gradle and task/dependency caching
uses: gradle/actions/setup-gradle@v3
with:
cache-read-only: false
- name: Restore m2-buildrepo
uses: actions/download-artifact@v4
with:
name: all-packages-${{ inputs.version-label }}
path: ./packages/build/m2-buildrepo
# - name: AVD cache
# uses: actions/cache@v4
# id: avd-cache
# with:
# path: |
# ~/.android/avd/*
# ~/.android/adb*
# key: android-emulator-avd-33
# - name: create AVD and generate snapshot for caching
# if: steps.avd-cache.outputs.cache-hit != 'true'
# uses: reactivecircus/android-emulator-runner@v2
# with:
# api-level: 33
# target: default
# # target: aosp_atd
# arch: x86_64
# disk-size: 4096M
# ram-size: 2048M
# heap-size: 1024M
# force-avd-creation: false
# emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
# disable-animations: true
# channel: canary
# script: echo "Generated AVD snapshot for caching."
# TODO Can we read api level from Config.kt
- name: Run Gradle Plugin Test project
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
uses: reactivecircus/android-emulator-runner@v2
with:
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
force-avd-creation: false
api-level: ${{ vars.VERSION_ANDROID_EMULATOR_API_LEVEL }}
target: default
# target: aosp_atd
arch: x86_64
# profile: Nexus 6
disk-size: 4096M
ram-size: 2048M
heap-size: 1024M
channel: canary
script: cd ${{ matrix.path }} && ./gradlew ${{ matrix.arguments }} --info