-
Notifications
You must be signed in to change notification settings - Fork 87
696 lines (620 loc) · 20.8 KB
/
ci.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
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
name: Realm Dart CI
on:
push:
branches:
- main
pull_request:
env:
BAAS_URL: ${{ secrets.REALM_QA_URL }}
BAAS_API_KEY: ${{ secrets.ATLAS_QA_PUBLIC_API_KEY }}
BAAS_PRIVATE_API_KEY: ${{ secrets.ATLAS_QA_PRIVATE_API_KEY }}
BAAS_PROJECT_ID: ${{ secrets.ATLAS_QA_PROJECT_ID}}
REALM_CI: true
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
deploy-dart-cluster:
name: Deploy Dart cluster
secrets: inherit
uses: ./.github/workflows/create-cluster.yml
with:
prefix: d
deploy-flutter-cluster:
name: Deploy Flutter cluster
secrets: inherit
uses: ./.github/workflows/create-cluster.yml
with:
prefix: f
create-dart-shared-apps:
name: Create Dart shared Apps
secrets: inherit
needs:
- deploy-dart-cluster
uses: ./.github/workflows/shared-apps.yml
with:
cluster: ${{ needs.deploy-dart-cluster.outputs.clusterName }}
env: Dart
create-flutter-shared-apps:
name: Create Flutter shared Apps
secrets: inherit
needs:
- deploy-flutter-cluster
uses: ./.github/workflows/shared-apps.yml
with:
cluster: ${{ needs.deploy-flutter-cluster.outputs.clusterName }}
env: Flutter
delete-dart-cluster:
runs-on: ubuntu-latest
name: Delete Dart Cluster
timeout-minutes: 5
continue-on-error: true
needs:
- deploy-dart-cluster
- dart-tests-windows
- dart-tests-macos
- dart-tests-macos-arm
- dart-tests-linux
- dart-tests-linux-ubuntu-20
steps:
- uses: realm/ci-actions/mdb-realm/cleanup@338bf3e7575015a28faec8b67614385d122aece7
with:
realmUrl: ${{ env.BAAS_URL }}
atlasUrl: ${{ secrets.ATLAS_QA_URL }}
projectId: ${{ env.BAAS_PROJECT_ID }}
apiKey: ${{ env.BAAS_API_KEY }}
privateApiKey: ${{ env.BAAS_PRIVATE_API_KEY }}
clusterName: ${{ needs.deploy-dart-cluster.outputs.clusterName }}
delete-flutter-cluster:
runs-on: ubuntu-latest
name: Delete Flutter Cluster
timeout-minutes: 5
continue-on-error: true
needs:
- deploy-flutter-cluster
- flutter-desktop-tests-windows
- flutter-desktop-tests-macos
- flutter-desktop-tests-linux
- flutter-desktop-tests-linux-ubuntu-20
- flutter-ios
- flutter-android
steps:
- uses: realm/ci-actions/mdb-realm/cleanup@338bf3e7575015a28faec8b67614385d122aece7
with:
realmUrl: ${{ env.BAAS_URL }}
atlasUrl: ${{ secrets.ATLAS_QA_URL }}
projectId: ${{ env.BAAS_PROJECT_ID }}
apiKey: ${{ env.BAAS_API_KEY }}
privateApiKey: ${{ env.BAAS_PRIVATE_API_KEY }}
clusterName: ${{ needs.deploy-flutter-cluster.outputs.clusterName }}
cleanup-dart-shared-apps:
name: Delete Dart shared Apps
secrets: inherit
needs:
- deploy-dart-cluster
- dart-tests-windows
- dart-tests-macos
- dart-tests-macos-arm
- dart-tests-linux
- dart-tests-linux-ubuntu-20
uses: ./.github/workflows/shared-apps.yml
if: always()
with:
cleanup: true
cluster: ${{ needs.deploy-dart-cluster.outputs.clusterName }}
env: Dart
cleanup-flutter-shared-apps:
name: Delete Flutter shared Apps
secrets: inherit
needs:
- deploy-flutter-cluster
- flutter-desktop-tests-windows
- flutter-desktop-tests-macos
- flutter-desktop-tests-linux
- flutter-desktop-tests-linux-ubuntu-20
- flutter-ios
- flutter-android
uses: ./.github/workflows/shared-apps.yml
if: always()
with:
cleanup: true
cluster: ${{ needs.deploy-flutter-cluster.outputs.clusterName }}
env: Flutter
cleanup-dart-matrix:
needs:
- deploy-dart-cluster
- dart-tests-windows
- dart-tests-macos
- dart-tests-macos-arm
- dart-tests-linux
- dart-tests-linux-ubuntu-20
strategy:
fail-fast: false
matrix:
include:
- app: dm
description: dart macos
- app: dma
description: dart macos-arm
- app: dl
description: dart linux
- app: dl2
description: dart linux (ubuntu 20)
- app: dw
description: dart windows
runs-on: ubuntu-latest
name: Cleanup apps for ${{ matrix.description }}
timeout-minutes: 20
if: always()
env:
BAAS_CLUSTER: ${{ needs.deploy-dart-cluster.outputs.clusterName }}
BAAS_DIFFERENTIATOR: ${{ matrix.app }}${{ github.run_id }}${{ github.run_attempt }}
steps:
- name: Checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
with:
submodules: false
- name : Setup Dart SDK
uses: dart-lang/setup-dart@main
with:
sdk: stable
- name: Cleanup Dart apps
run: |
dart run realm_dart delete-apps \
--baas-url ${{ env.BAAS_URL }} \
--atlas-cluster ${{ env.BAAS_CLUSTER }} \
--api-key ${{ env.BAAS_API_KEY }} \
--private-api-key ${{ env.BAAS_PRIVATE_API_KEY }} \
--project-id ${{ env.BAAS_PROJECT_ID }} \
--differentiator '${{ env.BAAS_DIFFERENTIATOR }}'
cleanup-flutter-matrix:
needs:
- deploy-flutter-cluster
- flutter-desktop-tests-windows
- flutter-desktop-tests-macos
- flutter-desktop-tests-linux
- flutter-desktop-tests-linux-ubuntu-20
- flutter-ios
- flutter-android
strategy:
fail-fast: false
matrix:
include:
- app: fm
description: flutter macos
- app: fl
description: flutter linux
- app: fl2
description: flutter linux (ubuntu 20)
- app: fw
description: flutter windows
- app: fa
description: flutter android
- app: fi
description: flutter iOS
runs-on: ubuntu-latest
name: Cleanup apps for ${{ matrix.description }}
timeout-minutes: 20
if: always()
env:
BAAS_CLUSTER: ${{ needs.deploy-flutter-cluster.outputs.clusterName }}
BAAS_DIFFERENTIATOR: ${{ matrix.app }}${{ github.run_id }}${{ github.run_attempt }}
steps:
- name: Checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
with:
submodules: false
- name : Setup Dart SDK
uses: dart-lang/setup-dart@main
with:
sdk: stable
- name: Cleanup Flutter apps
run: |
dart run realm_dart delete-apps \
--baas-url ${{ env.BAAS_URL }} \
--atlas-cluster ${{ env.BAAS_CLUSTER }} \
--api-key ${{ env.BAAS_API_KEY }} \
--private-api-key ${{ env.BAAS_PRIVATE_API_KEY }} \
--project-id ${{ env.BAAS_PROJECT_ID }} \
--differentiator '${{ env.BAAS_DIFFERENTIATOR }}'
build-windows:
name: Build Windows
uses: ./.github/workflows/build-native.yml
with:
runner: windows-latest
binary: windows
build: '["windows"]'
build-macos:
name: Build MacOS
uses: ./.github/workflows/build-native.yml
with:
runner: macos-latest
binary: macos
build: '["macos"]'
build-linux:
name: Build Linux
uses: ./.github/workflows/build-native.yml
with:
runner: ubuntu-20.04 # Building on the lowest possible Linux (Ubuntu) version for compatibility
binary: linux
build: '["linux"]'
build-android:
name: Build Android
uses: ./.github/workflows/build-native.yml
with:
runner: ubuntu-20.04
binary: android
build: '["android-x86", "android-x86_64", "android-armeabi-v7a", "android-arm64-v8a"]'
build-ios:
name: Build IOS
uses: ./.github/workflows/build-native.yml
with:
runner: macos-latest
binary: ios
build: '["ios-device", "ios-simulator", "ios-catalyst"]'
build-android-combined:
name: Android binaries combine
needs: build-android
uses: ./.github/workflows/binary-combine-android.yml
build-ios-xcframework:
name: IOS binaries combine
needs: build-ios
uses: ./.github/workflows/binary-combine-ios.yml
# Dart jobs
dart-tests-windows:
name: Windows Dart Tests
uses: ./.github/workflows/dart-desktop-tests.yml
needs:
- build-windows
- deploy-dart-cluster
- create-dart-shared-apps
secrets: inherit
with:
os: windows
runner: windows-latest
app: dw
cluster: ${{ needs.deploy-dart-cluster.outputs.clusterName }}
dart-tests-macos:
name: MacOS Dart Tests
uses: ./.github/workflows/dart-desktop-tests.yml
needs:
- build-macos
- deploy-dart-cluster
- create-dart-shared-apps
secrets: inherit
with:
os: macos
runner: macos-latest
app: dm
cluster: ${{ needs.deploy-dart-cluster.outputs.clusterName }}
dart-tests-macos-arm:
name: MacOS Arm Dart Tests
uses: ./.github/workflows/dart-desktop-tests.yml
needs:
- build-macos
- deploy-dart-cluster
- create-dart-shared-apps
secrets: inherit
with:
os: macos
runner: macos-arm
architecture: arm
app: dma
cluster: ${{ needs.deploy-dart-cluster.outputs.clusterName }}
dart-tests-linux:
name: Linux Dart Tests
uses: ./.github/workflows/dart-desktop-tests.yml
needs:
- build-linux
- deploy-dart-cluster
- create-dart-shared-apps
secrets: inherit
with:
os: linux
runner: ubuntu-latest
app: dl
cluster: ${{ needs.deploy-dart-cluster.outputs.clusterName }}
dart-tests-linux-ubuntu-20:
name: Linux Dart Tests (ubuntu 20)
uses: ./.github/workflows/dart-desktop-tests.yml
needs:
- build-linux
- deploy-dart-cluster
- create-dart-shared-apps
secrets: inherit
with:
os: linux
runner: ubuntu-20.04
app: dl2
cluster: ${{ needs.deploy-dart-cluster.outputs.clusterName }}
# Flutter jobs
flutter-desktop-tests-windows:
name: Windows Flutter Tests
uses: ./.github/workflows/flutter-desktop-tests.yml
needs:
- build-windows
- deploy-flutter-cluster
- create-flutter-shared-apps
secrets: inherit
with:
os: windows
runner: windows-latest
app: fw
cluster: ${{ needs.deploy-flutter-cluster.outputs.clusterName }}
flutter-desktop-tests-macos:
name: MacOS Flutter Tests
uses: ./.github/workflows/flutter-desktop-tests.yml
needs:
- build-macos
- deploy-flutter-cluster
- create-flutter-shared-apps
secrets: inherit
with:
os: macos
runner: macos-13 # workaround to: https://github.com/flutter/flutter/issues/118469 latest is still macos-12 ¯\_(ツ)_/¯
app: fm
cluster: ${{ needs.deploy-flutter-cluster.outputs.clusterName }}
flutter-desktop-tests-linux:
name: Linux Flutter Tests
uses: ./.github/workflows/flutter-desktop-tests.yml
needs:
- build-linux
- deploy-flutter-cluster
- create-flutter-shared-apps
secrets: inherit
with:
os: linux
runner: ubuntu-latest
app: fl
cluster: ${{ needs.deploy-flutter-cluster.outputs.clusterName }}
flutter-desktop-tests-linux-ubuntu-20:
name: Linux Flutter Tests (ubuntu 20)
uses: ./.github/workflows/flutter-desktop-tests.yml
needs:
- build-linux
- deploy-flutter-cluster
- create-flutter-shared-apps
secrets: inherit
with:
os: linux
runner: ubuntu-20.04
app: fl2
cluster: ${{ needs.deploy-flutter-cluster.outputs.clusterName }}
flutter-ios:
runs-on: macos-latest
name: IOS Flutter Tests
timeout-minutes: 45
needs:
- deploy-flutter-cluster
- build-ios-xcframework
- create-flutter-shared-apps
env:
BAAS_CLUSTER: ${{ needs.deploy-flutter-cluster.outputs.clusterName }}
BAAS_DIFFERENTIATOR: fi${{ github.run_id }}${{ github.run_attempt }}
steps:
- name: Checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
with:
submodules: 'recursive'
- name: Enable ccache
run: echo "PATH=/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" >> $GITHUB_ENV
- name: Fetch artifacts
uses: actions/download-artifact@9782bd6a9848b53b110e712e20e42d89988822b7
with:
name: librealm-ios
path: binary/ios
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: 'stable'
- name: Install dependencies
run: dart pub get
- name: Launch Simulator
uses: futureware-tech/simulator-action@v2
with:
model: 'iPhone 8'
os: 'iOS'
os_version: '>= 14.0'
# This will be a no-op under normal circumstances since the cluster would have been deployed
# in deploy-cluster. It is needed in case we want to re-run the job after the cluster has been reaped.
- name: Create cluster
uses: realm/ci-actions/mdb-realm/deploy@338bf3e7575015a28faec8b67614385d122aece7
with:
realmUrl: ${{ env.BAAS_URL }}
atlasUrl: ${{ secrets.ATLAS_QA_URL }}
projectId: ${{ env.BAAS_PROJECT_ID }}
apiKey: ${{ env.BAAS_API_KEY }}
privateApiKey: ${{ env.BAAS_PRIVATE_API_KEY }}
clusterName: ${{ env.BAAS_CLUSTER }}
- name: Run tests on iOS Simulator
run: |
flutter drive --target=test_driver/app.dart --dart-define=testName="" --suppress-analytics --debug
working-directory: ./flutter/realm_flutter/tests
flutter-android:
runs-on: macos-latest
name: Android Flutter Tests
timeout-minutes: 45
needs:
- deploy-flutter-cluster
- build-android-combined
- create-flutter-shared-apps
env:
BAAS_CLUSTER: ${{ needs.deploy-flutter-cluster.outputs.clusterName }}
BAAS_DIFFERENTIATOR: fa${{ github.run_id }}${{ github.run_attempt }}
steps:
- name: Checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
with:
submodules: 'recursive'
- name: Set up Java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 11
- name: Fetch artifacts
uses: actions/download-artifact@9782bd6a9848b53b110e712e20e42d89988822b7
with:
name: librealm-android
path: binary/android
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: 'stable'
- name: Install dependencies
run: dart pub get
# TODO: Move CI run tests on Android Emulator into device farm https://github.com/realm/realm-dart/issues/691
- name: Setup Android Emulator cache
uses: actions/cache@v3
id: avd-cache
with:
path: |
~/.android/avd/*
~/.android/adb*
key: avd-29
- name: Create Android Emulator and generate snapshot for caching
if: ${{ steps.avd-cache.outputs.cache-hit != 'true' }}
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 29
force-avd-creation: false
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
arch: x86
ndk: 21.0.6113669
cmake: 3.10.2.4988404
script: echo "Generated Emulator snapshot for caching."
# This will be a no-op under normal circumstances since the cluster would have been deployed
# in deploy-cluster. It is needed in case we want to re-run the job after the cluster has been reaped.
- name: Create cluster
uses: realm/ci-actions/mdb-realm/deploy@338bf3e7575015a28faec8b67614385d122aece7
with:
realmUrl: ${{ env.BAAS_URL }}
atlasUrl: ${{ secrets.ATLAS_QA_URL }}
projectId: ${{ env.BAAS_PROJECT_ID }}
apiKey: ${{ env.BAAS_API_KEY }}
privateApiKey: ${{ env.BAAS_PRIVATE_API_KEY }}
clusterName: ${{ env.BAAS_CLUSTER }}
- name: Run tests on Android Emulator
uses: reactivecircus/android-emulator-runner@v2
with:
force-avd-creation: false
disable-animations: true
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
api-level: 29
ndk: 21.0.6113669
arch: x86
cmake: 3.10.2.4988404
script: flutter build apk --debug --target=test_driver/app.dart && flutter install --debug && flutter drive --target=test_driver/app.dart --dart-define=testName="" --suppress-analytics --debug
working-directory: ./flutter/realm_flutter/tests
# Generator jobs
generator:
strategy:
fail-fast: false
matrix:
os: [ubuntu, macos, windows]
runs-on: ${{ matrix.os }}-latest
name: Generator Tests
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
with:
submodules: 'recursive'
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: 'stable'
- name: Delete generated files
run: find . -name "*.g.dart" -not -path "./generator/*" -delete
shell: bash
- name: Run generator in realm-dart repo
run: |
dart pub get
dart run build_runner build --delete-conflicting-outputs
- name: Run generator in realm-dart/example
run: |
dart pub get
dart run build_runner build --delete-conflicting-outputs
working-directory: ./example/
- name: Run generator in realm_flutter/example
run: |
dart pub get
dart run build_runner build --delete-conflicting-outputs
working-directory: ./flutter/realm_flutter/example/
- name: Install LLVM
run: sudo apt update && sudo apt-get install -y libclang-dev
if: ${{ matrix.os == 'ubuntu' }}
- name: Run ffigen
run: dart run ffigen --config config.yaml
working-directory: ./ffigen
- name: Validate there are no uncommitted changes
run: |
changedFiles=$(git --no-pager diff -w)
if [ "$changedFiles" ]; then
git --no-pager diff -w
exit 1
fi
shell: bash
- name: Run generator tests
run: |
dart pub get
dart test -r expanded --coverage ./coverage/ --test-randomize-ordering-seed random
working-directory: ./generator/
- name: Generate generator coverage report
if: matrix.os == 'ubuntu'
run: |
dart run coverage:format_coverage \
--in coverage/ \
--out ./coverage/lcov.info \
--check-ignore \
--lcov \
--packages .dart_tool/package_config.json \
--report-on lib
working-directory: ./generator/
- name: Publish Generator Coverage
if: matrix.os == 'ubuntu'
id: publish-coverage
uses: coverallsapp/github-action@f350da2c033043742f89e8c0b7b5145a1616da6d
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: generator
path-to-lcov: ./generator/coverage/lcov.info
parallel: true
- name: Output Coveralls response
if: matrix.os == 'ubuntu'
run: echo ${{ steps.publish-coverage.outputs.coveralls-api-result }}
coverage-finished:
needs:
- generator
- dart-tests-linux
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
id: publish-coverage
uses: coverallsapp/github-action@f350da2c033043742f89e8c0b7b5145a1616da6d
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
- name: Output Coveralls response
run: echo ${{ steps.publish-coverage.outputs.coveralls-api-result }}
slack-on-failure:
name: Report failure in main branch
needs:
- cleanup-dart-matrix
- cleanup-flutter-matrix
runs-on: ubuntu-latest
if: always()
steps:
# Run this action to set env.WORKFLOW_CONCLUSION
- uses: technote-space/workflow-conclusion-action@45ce8e0eb155657ab8ccf346ade734257fd196a5
- uses: act10ns/slack@ed1309ab9862e57e9e583e51c7889486b9a00b0f
if: ${{ github.ref == 'refs/heads/main' && env.WORKFLOW_CONCLUSION == 'FAILURE' }}
# Statuses: neutral, success, skipped, cancelled, timed_out, action_required, failure
with:
status: ${{ env.WORKFLOW_CONCLUSION }}
webhook-url: ${{ secrets.SLACK_DART_WEBHOOK }}
channel: '#realm-github-dart'
message: |
*<https://github.com/realm/realm-dart/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}|_{{workflow}}_ run id: ${{ github.run_id }} has status _{{jobStatus}}_ >*
<{{refUrl}}|`{{ref}}` - {{description}}>
{{#if description}}<{{diffUrl}}|branch: `{{diffRef}}`>{{/if}}