Skip to content

Commit a92f97d

Browse files
committed
Only run intro_flutter_gpu tests on master channel on macOS
1 parent ebf5883 commit a92f97d

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

flutter_ci_script_shared.sh

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ function ci_codelabs () {
55
# Disable analytics to avoid https://github.com/dart-lang/tools/issues/249
66
dart --disable-analytics
77

8-
# intro_flutter_gpu requires the master channel
9-
if [ $channel = "master" ]; then
8+
# intro_flutter_gpu requires the master channel and macOS
9+
if [ $channel = "master" && $RUNNER_OS = 'macOS' ]; then
1010
# Enable native assets for intro_flutter_gpu
1111
flutter config --enable-native-assets
1212

@@ -62,12 +62,16 @@ function ci_codelabs () {
6262
if [ -d "test" ]
6363
then
6464
if grep -q "flutter:" "pubspec.yaml"; then
65-
if [ $RUNNER_OS = 'macOS' ]; then
66-
# Impeller is required for intro_flutter_gpu
67-
flutter test --enable-impeller
68-
else
69-
flutter test
70-
fi
65+
66+
# intro_flutter_gpu only runs with Impeller on macOS
67+
if [$CODELAB = 'intro_flutter_gpu']; then
68+
if [ $RUNNER_OS = 'macOS' ]; then
69+
flutter test --enable-impeller
70+
fi
71+
# This skips the test if the runner OS is not macOS
72+
else
73+
flutter test
74+
fi
7175
else
7276
# If the project is not a Flutter project, use the Dart CLI.
7377
dart test

0 commit comments

Comments
 (0)