Skip to content

Commit 92dd9fc

Browse files
author
Nguyễn Tuấn Việt
committed
ci: make layout-regression benchmark informational-only
CI runners use software rendering and are 2-3x slower than real hardware. Thresholds are calibrated for iPhone 13 / Pixel 6. Results are still uploaded as artifacts for trend tracking but benchmark failures no longer block merges.
1 parent 96877a3 commit 92dd9fc

File tree

11 files changed

+266
-93
lines changed

11 files changed

+266
-93
lines changed

.github/workflows/benchmark.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,16 @@ jobs:
5252
run: |
5353
mkdir -p benchmark/results
5454
55-
# Run with JSON reporter so we can parse pass/fail
55+
# Run with JSON reporter so we can parse pass/fail.
56+
# || true — CI runners use software rendering and are 2-3x slower than
57+
# real hardware (iPhone 13 / Pixel 6). Thresholds are calibrated for
58+
# real devices. Keep results for trend tracking but never block CI.
5659
flutter test benchmark/layout_regression.dart \
5760
--reporter expanded \
58-
2>&1 | tee benchmark/results/ci_run.txt
61+
2>&1 | tee benchmark/results/ci_run.txt || true
5962
60-
# Extract overall pass/fail from test exit code
61-
EXIT_CODE=${PIPESTATUS[0]}
63+
# Always treat as passed from CI's perspective
64+
EXIT_CODE=0
6265
6366
# Parse the JSON result files for the summary table
6467
SUMMARY=$(python3 - <<'PYEOF'

packages/hyper_render_clipboard/pubspec.lock

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ packages:
2121
dependency: transitive
2222
description:
2323
name: characters
24-
sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803
24+
sha256: faf38497bda5ead2a8c7615f4f7939df04333478bf32e4173fcb06d428b5716b
2525
url: "https://pub.dev"
2626
source: hosted
27-
version: "1.4.0"
27+
version: "1.4.1"
2828
clock:
2929
dependency: transitive
3030
description:
@@ -130,10 +130,10 @@ packages:
130130
dependency: "direct dev"
131131
description:
132132
name: flutter_lints
133-
sha256: "3105dc8492f6183fb076ccf1f351ac3d60564bff92e20bfc4af9cc1651f4e7e1"
133+
sha256: "5398f14efa795ffb7a33e9b6a08798b26a180edac4ad7db3f231e40f82ce11e1"
134134
url: "https://pub.dev"
135135
source: hosted
136-
version: "6.0.0"
136+
version: "5.0.0"
137137
flutter_test:
138138
dependency: "direct dev"
139139
description: flutter
@@ -171,10 +171,11 @@ packages:
171171
hyper_render_core:
172172
dependency: "direct main"
173173
description:
174-
path: "../hyper_render_core"
175-
relative: true
176-
source: path
177-
version: "1.1.1"
174+
name: hyper_render_core
175+
sha256: "35008c9b22fe5f0146d69e4db316cca702d2ebddef790fb2555dcb17d971d642"
176+
url: "https://pub.dev"
177+
source: hosted
178+
version: "1.1.2"
178179
irondash_engine_context:
179180
dependency: transitive
180181
description:
@@ -219,26 +220,26 @@ packages:
219220
dependency: transitive
220221
description:
221222
name: lints
222-
sha256: a5e2b223cb7c9c8efdc663ef484fdd95bb243bff242ef5b13e26883547fce9a0
223+
sha256: c35bb79562d980e9a453fc715854e1ed39e24e7d0297a880ef54e17f9874a9d7
223224
url: "https://pub.dev"
224225
source: hosted
225-
version: "6.0.0"
226+
version: "5.1.1"
226227
matcher:
227228
dependency: transitive
228229
description:
229230
name: matcher
230-
sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2
231+
sha256: dc0b7dc7651697ea4ff3e69ef44b0407ea32c487a39fff6a4004fa585e901861
231232
url: "https://pub.dev"
232233
source: hosted
233-
version: "0.12.17"
234+
version: "0.12.19"
234235
material_color_utilities:
235236
dependency: transitive
236237
description:
237238
name: material_color_utilities
238-
sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
239+
sha256: "9c337007e82b1889149c82ed242ed1cb24a66044e30979c44912381e9be4c48b"
239240
url: "https://pub.dev"
240241
source: hosted
241-
version: "0.11.1"
242+
version: "0.13.0"
242243
meta:
243244
dependency: transitive
244245
description:
@@ -416,10 +417,10 @@ packages:
416417
dependency: transitive
417418
description:
418419
name: test_api
419-
sha256: ab2726c1a94d3176a45960b6234466ec367179b87dd74f1611adb1f3b5fb9d55
420+
sha256: "8161c84903fd860b26bfdefb7963b3f0b68fee7adea0f59ef805ecca346f0c7a"
420421
url: "https://pub.dev"
421422
source: hosted
422-
version: "0.7.7"
423+
version: "0.7.10"
423424
typed_data:
424425
dependency: transitive
425426
description:

packages/hyper_render_core/pubspec.lock

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ packages:
2121
dependency: transitive
2222
description:
2323
name: characters
24-
sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803
24+
sha256: faf38497bda5ead2a8c7615f4f7939df04333478bf32e4173fcb06d428b5716b
2525
url: "https://pub.dev"
2626
source: hosted
27-
version: "1.4.0"
27+
version: "1.4.1"
2828
clock:
2929
dependency: transitive
3030
description:
@@ -95,26 +95,26 @@ packages:
9595
dependency: transitive
9696
description:
9797
name: leak_tracker
98-
sha256: "6bb818ecbdffe216e81182c2f0714a2e62b593f4a4f13098713ff1685dfb6ab0"
98+
sha256: "33e2e26bdd85a0112ec15400c8cbffea70d0f9c3407491f672a2fad47915e2de"
9999
url: "https://pub.dev"
100100
source: hosted
101-
version: "10.0.9"
101+
version: "11.0.2"
102102
leak_tracker_flutter_testing:
103103
dependency: transitive
104104
description:
105105
name: leak_tracker_flutter_testing
106-
sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573
106+
sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1"
107107
url: "https://pub.dev"
108108
source: hosted
109-
version: "3.0.9"
109+
version: "3.0.10"
110110
leak_tracker_testing:
111111
dependency: transitive
112112
description:
113113
name: leak_tracker_testing
114-
sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
114+
sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1"
115115
url: "https://pub.dev"
116116
source: hosted
117-
version: "3.0.1"
117+
version: "3.0.2"
118118
lints:
119119
dependency: transitive
120120
description:
@@ -127,26 +127,26 @@ packages:
127127
dependency: transitive
128128
description:
129129
name: matcher
130-
sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2
130+
sha256: dc0b7dc7651697ea4ff3e69ef44b0407ea32c487a39fff6a4004fa585e901861
131131
url: "https://pub.dev"
132132
source: hosted
133-
version: "0.12.17"
133+
version: "0.12.19"
134134
material_color_utilities:
135135
dependency: transitive
136136
description:
137137
name: material_color_utilities
138-
sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
138+
sha256: "9c337007e82b1889149c82ed242ed1cb24a66044e30979c44912381e9be4c48b"
139139
url: "https://pub.dev"
140140
source: hosted
141-
version: "0.11.1"
141+
version: "0.13.0"
142142
meta:
143143
dependency: transitive
144144
description:
145145
name: meta
146-
sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c
146+
sha256: "23f08335362185a5ea2ad3a4e597f1375e78bce8a040df5c600c8d3552ef2394"
147147
url: "https://pub.dev"
148148
source: hosted
149-
version: "1.16.0"
149+
version: "1.17.0"
150150
path:
151151
dependency: transitive
152152
description:
@@ -204,18 +204,18 @@ packages:
204204
dependency: transitive
205205
description:
206206
name: test_api
207-
sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd
207+
sha256: "8161c84903fd860b26bfdefb7963b3f0b68fee7adea0f59ef805ecca346f0c7a"
208208
url: "https://pub.dev"
209209
source: hosted
210-
version: "0.7.4"
210+
version: "0.7.10"
211211
vector_math:
212212
dependency: "direct main"
213213
description:
214214
name: vector_math
215-
sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
215+
sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b
216216
url: "https://pub.dev"
217217
source: hosted
218-
version: "2.1.4"
218+
version: "2.2.0"
219219
vm_service:
220220
dependency: transitive
221221
description:
@@ -225,5 +225,5 @@ packages:
225225
source: hosted
226226
version: "15.0.0"
227227
sdks:
228-
dart: ">=3.7.0-0 <4.0.0"
228+
dart: ">=3.9.0-0 <4.0.0"
229229
flutter: ">=3.18.0-18.0.pre.54"
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Miscellaneous
2+
*.class
3+
*.log
4+
*.pyc
5+
*.swp
6+
.DS_Store
7+
.atom/
8+
.build/
9+
.buildlog/
10+
.history
11+
.svn/
12+
.swiftpm/
13+
migrate_working_dir/
14+
15+
# IntelliJ related
16+
*.iml
17+
*.ipr
18+
*.iws
19+
.idea/
20+
21+
# The .vscode folder contains launch configuration and tasks you configure in
22+
# VS Code which you may wish to be included in version control, so this line
23+
# is commented out by default.
24+
#.vscode/
25+
26+
# Flutter/Dart/Pub related
27+
**/doc/api/
28+
**/ios/Flutter/.last_build_id
29+
.dart_tool/
30+
.flutter-plugins-dependencies
31+
.pub-cache/
32+
.pub/
33+
/build/
34+
/coverage/
35+
36+
# Symbolication related
37+
app.*.symbols
38+
39+
# Obfuscation related
40+
app.*.map.json
41+
42+
# Android Studio will place build artifacts here
43+
/android/app/debug
44+
/android/app/profile
45+
/android/app/release
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# hyper_render_devtools_ui
2+
3+
A new Flutter project.
4+
5+
## Getting Started
6+
7+
This project is a starting point for a Flutter application.
8+
9+
A few resources to get you started if this is your first Flutter project:
10+
11+
- [Learn Flutter](https://docs.flutter.dev/get-started/learn-flutter)
12+
- [Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
13+
- [Flutter learning resources](https://docs.flutter.dev/reference/learning-resources)
14+
15+
For help getting started with Flutter development, view the
16+
[online documentation](https://docs.flutter.dev/), which offers tutorials,
17+
samples, guidance on mobile development, and a full API reference.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# This file configures the analyzer, which statically analyzes Dart code to
2+
# check for errors, warnings, and lints.
3+
#
4+
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
5+
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
6+
# invoked from the command line by running `flutter analyze`.
7+
8+
# The following line activates a set of recommended lints for Flutter apps,
9+
# packages, and plugins designed to encourage good coding practices.
10+
include: package:flutter_lints/flutter.yaml
11+
12+
linter:
13+
# The lint rules applied to this project can be customized in the
14+
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
15+
# included above or to enable additional rules. A list of all available lints
16+
# and their documentation is published at https://dart.dev/lints.
17+
#
18+
# Instead of disabling a lint rule for the entire project in the
19+
# section below, it can also be suppressed for a single line of code
20+
# or a specific dart file by using the `// ignore: name_of_lint` and
21+
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
22+
# producing the lint.
23+
rules:
24+
# avoid_print: false # Uncomment to disable the `avoid_print` rule
25+
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
26+
27+
# Additional information about this file can be found at
28+
# https://dart.dev/guides/language/analysis-options
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
// This is a basic Flutter widget test.
2+
//
3+
// To perform an interaction with a widget in your test, use the WidgetTester
4+
// utility in the flutter_test package. For example, you can send tap and scroll
5+
// gestures. You can also use WidgetTester to find child widgets in the widget
6+
// tree, read text, and verify that the values of widget properties are correct.
7+
8+
import 'package:flutter/material.dart';
9+
import 'package:flutter_test/flutter_test.dart';
10+
11+
import 'package:hyper_render_devtools_ui/main.dart';
12+
13+
void main() {
14+
testWidgets('Counter increments smoke test', (WidgetTester tester) async {
15+
// Build our app and trigger a frame.
16+
await tester.pumpWidget(const MyApp());
17+
18+
// Verify that our counter starts at 0.
19+
expect(find.text('0'), findsOneWidget);
20+
expect(find.text('1'), findsNothing);
21+
22+
// Tap the '+' icon and trigger a frame.
23+
await tester.tap(find.byIcon(Icons.add));
24+
await tester.pump();
25+
26+
// Verify that our counter has incremented.
27+
expect(find.text('0'), findsNothing);
28+
expect(find.text('1'), findsOneWidget);
29+
});
30+
}

0 commit comments

Comments
 (0)