Skip to content

Commit cdc72c6

Browse files
committed
check: Add suite android
And give it the necessary prerequisites in CI. By default the build worker supplies JDK 11, apparently, and that's too old.
1 parent 50ccf8b commit cdc72c6

File tree

2 files changed

+26
-2
lines changed

2 files changed

+26
-2
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ jobs:
88
steps:
99
- uses: actions/[email protected]
1010

11+
- name: Set up JDK
12+
uses: actions/[email protected]
13+
with:
14+
java-version: 17
15+
distribution: temurin
16+
1117
- name: Clone Flutter SDK
1218
# We can't do a depth-1 clone, because we need the most recent tag
1319
# so that Flutter knows its version and sees the constraint in our

tools/check

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,12 @@ this_dir=${BASH_SOURCE[0]%/*}
2424

2525
## CLI PARSING
2626

27-
default_suites=(analyze test build_runner drift pigeon icons)
27+
default_suites=(
28+
analyze test
29+
build_runner drift pigeon icons
30+
android # This takes multiple minutes in CI, so do it last.
31+
)
32+
2833
extra_suites=(
2934
shellcheck # Requires its own dependency, from outside the pub system.
3035
)
@@ -77,7 +82,7 @@ while (( $# )); do
7782
--all) opt_files=all; opt_all=1; shift;;
7883
--fix) opt_fix=1; shift;;
7984
--verbose) opt_verbose=1; shift;;
80-
analyze|test|build_runner|drift|pigeon|icons|shellcheck)
85+
analyze|test|build_runner|drift|pigeon|icons|android|shellcheck)
8186
opt_suites+=("$1"); shift;;
8287
*) usage;;
8388
esac
@@ -351,6 +356,18 @@ run_icons() {
351356
check_no_changes "icon updates" "${outputs[@]}"
352357
}
353358

359+
run_android() {
360+
# Omitted from this check:
361+
# pubspec.{yaml,lock} tools/check
362+
files_check android/ \
363+
|| return 0
364+
365+
flutter build apk \
366+
|| return
367+
368+
flutter build appbundle
369+
}
370+
354371
run_shellcheck() {
355372
# Omitted from this check: nothing (nothing known, anyway).
356373
files_check tools/ '!*.'{dart,js,json} \
@@ -424,6 +441,7 @@ for suite in "${opt_suites[@]}"; do
424441
drift) run_drift ;;
425442
pigeon) run_pigeon ;;
426443
icons) run_icons ;;
444+
android) run_android ;;
427445
shellcheck) run_shellcheck ;;
428446
*) echo >&2 "Internal error: unknown suite $suite" ;;
429447
esac || failed+=( "$suite" )

0 commit comments

Comments
 (0)