Skip to content

Commit 3ad1dfb

Browse files
committed
ci: enable supplying flutter version to the flutter setup command, add sample build tests to workflow
1 parent 8068ec2 commit 3ad1dfb

File tree

1 file changed

+41
-1
lines changed

1 file changed

+41
-1
lines changed

.circleci/config.yml

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,13 @@ orbs:
88

99
commands:
1010
setup_flutter:
11+
parameters:
12+
version:
13+
type: string
14+
default: 3.10.5
1115
steps:
1216
- flutter/install_sdk_and_pub:
13-
version: 3.10.5
17+
version: <<parameters.version>>
1418
- run:
1519
name: Generate Pigeons
1620
command: sh ./scripts/pigeon.sh
@@ -241,6 +245,38 @@ jobs:
241245
command: dart run pana --no-warning --exit-code-threshold 0
242246
- run: flutter pub publish --dry-run
243247

248+
test_build_sample_android:
249+
executor:
250+
name: android/android-machine
251+
resource-class: xlarge
252+
tag: 2024.01.1
253+
steps:
254+
- advanced-checkout/shallow-checkout
255+
- setup_flutter:
256+
version: $(./scripts/releases/get_latest_stable_flutter_version.sh)
257+
- run:
258+
name: Switch to Example app & Build app
259+
command: cd scripts && flutter build apk --debug
260+
261+
test_build_sample_ios:
262+
macos:
263+
xcode: 15.2.0
264+
resource_class: macos.m1.medium.gen1
265+
steps:
266+
- advanced-checkout/shallow-checkout
267+
- setup_flutter:
268+
version: $(./scripts/releases/get_latest_stable_flutter_version.sh)
269+
- run:
270+
name: Install CocoaPods
271+
command: sudo gem install cocoapods
272+
- run:
273+
name: Install Pods
274+
working_directory: example/ios
275+
command: pod install --repo-update
276+
- run:
277+
name: Switch to Example app & Build app
278+
command: cd scripts && flutter build ios --simulator
279+
244280
release:
245281
macos:
246282
xcode: 15.2.0
@@ -302,6 +338,8 @@ workflows:
302338
- verify_pub:
303339
requires:
304340
- lint_flutter
341+
- test_build_sample_android
342+
- test_build_sample_ios
305343
- hold_release:
306344
type: approval
307345
requires:
@@ -316,6 +354,8 @@ workflows:
316354
# - test_ios
317355
- e2e_ios_captain
318356
- verify_pub
357+
- test_build_sample_android
358+
- test_build_sample_ios
319359
filters:
320360
branches:
321361
only: master

0 commit comments

Comments
 (0)