Skip to content

Commit 7654b81

Browse files
wip: implement dynamic CircleCI config with path-filtering
- Updated root .circleci/config.yml to include path-filtering orb - Added continuation steps for dynamically processing package-specific configs - Marked package-specific config.yml files as version 2.1 for compatibility - Adjusted workflows to trigger on changes to specific package paths - Testing and validation of dynamic CI configuration in progress
1 parent a698d3a commit 7654b81

File tree

6 files changed

+36
-13
lines changed

6 files changed

+36
-13
lines changed

.circleci/config.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
version: 2.1
2+
3+
# this allows you to use CircleCI's dynamic configuration feature
4+
setup: true
5+
6+
orbs:
7+
path-filtering: circleci/[email protected]
8+
9+
workflows:
10+
setup:
11+
jobs:
12+
- path-filtering/filter:
13+
name: filter_instabug_flutter
14+
config-path: packages/instabug_flutter/.circleci/config.yml
15+
base-revision: master

melos.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ packages:
66
scripts:
77
analyze:
88
exec: dart analyze .
9+
format:
10+
exec: dart format . --set-exit-if-changed
911
pigeon:
1012
exec: sh scripts/pigeon.sh
1113
packageFilters:

packages/Instabug_Dart_http_Adapter/.circleci/config.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: 2
1+
version: 2.1
22
jobs:
33
test:
44
docker:
@@ -17,10 +17,9 @@ jobs:
1717
steps:
1818
- checkout
1919
- run: chmod +x release.sh
20-
- run: ./release.sh
20+
- run: ./release.sh
2121

2222
workflows:
23-
version: 2
2423
build-test:
2524
jobs:
2625
- test
@@ -36,4 +35,4 @@ workflows:
3635
- hold
3736
filters:
3837
branches:
39-
only: master
38+
only: master

packages/instabug_dio_interceptor/.circleci/config.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: 2
1+
version: 2.1
22
jobs:
33
test:
44
docker:
@@ -11,7 +11,7 @@ jobs:
1111
- run: flutter test
1212
- run: flutter analyze .
1313
- run: flutter pub publish --dry-run
14-
14+
1515
release:
1616
docker:
1717
- image: cirrusci/flutter
@@ -20,7 +20,6 @@ jobs:
2020
- run: ./release.sh
2121

2222
workflows:
23-
version: 2
2423
build-test:
2524
jobs:
2625
- test

packages/instabug_flutter/.circleci/config.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ commands:
1212
version: 3.10.5
1313
- run:
1414
name: Generate Pigeons
15-
command: sh ./scripts/pigeon.sh
15+
command: |
16+
dart pub global activate melos
17+
melos bootstrap
1618
setup_ios:
1719
steps:
1820
# Flutter doesn't support Apple Silicon yet, so we need to install Rosetta use Flutter on M1 machines.
@@ -120,6 +122,7 @@ jobs:
120122
command: yarn danger ci
121123

122124
test_flutter:
125+
working_directory: packages/instabug_flutter
123126
parameters:
124127
version:
125128
type: string
@@ -139,6 +142,7 @@ jobs:
139142
- lcov.info
140143

141144
test_android:
145+
working_directory: packages/instabug_flutter
142146
executor:
143147
name: android/android-machine
144148
resource-class: xlarge
@@ -157,6 +161,7 @@ jobs:
157161
test-command: ./gradlew test
158162

159163
e2e_android_captain:
164+
working_directory: packages/instabug_flutter
160165
executor:
161166
name: android/android-machine
162167
resource-class: xlarge
@@ -173,6 +178,7 @@ jobs:
173178
test-command: cd e2e || true && dotnet test
174179

175180
test_ios:
181+
working_directory: packages/instabug_flutter
176182
macos:
177183
xcode: 13.4.1
178184
resource_class: macos.m1.medium.gen1
@@ -210,6 +216,7 @@ jobs:
210216
command: dotnet test
211217

212218
format_flutter:
219+
working_directory: packages/instabug_flutter
213220
docker:
214221
- image: cirrusci/flutter
215222
steps:
@@ -221,6 +228,7 @@ jobs:
221228
command: dart format . --set-exit-if-changed
222229

223230
lint_flutter:
231+
working_directory: packages/instabug_flutter
224232
docker:
225233
- image: cirrusci/flutter
226234
steps:
@@ -232,6 +240,7 @@ jobs:
232240
command: flutter analyze
233241

234242
verify_pub:
243+
working_directory: packages/instabug_flutter
235244
docker:
236245
- image: cirrusci/flutter
237246
steps:
@@ -256,11 +265,11 @@ jobs:
256265
app-dir: project
257266
- run:
258267
name: Install pub packages
259-
working_directory: ~/project
268+
working_directory: ~/project/packages/instabug_flutter
260269
command: dart pub get
261270
- run:
262271
name: Generate Pigeons
263-
working_directory: project
272+
working_directory: project/packages/instabug_flutter
264273
command: sh ./scripts/pigeon.sh
265274
- run:
266275
name: Clone Escape
@@ -273,11 +282,10 @@ jobs:
273282
cp -f .build/release/Escape /usr/local/bin/escape
274283
- run:
275284
name: Publish Package
276-
working_directory: project
285+
working_directory: project/packages/instabug_flutter
277286
command: Escape flutter publish
278287

279288
workflows:
280-
version: 2
281289
build-test-and-approval-deploy:
282290
jobs:
283291
- danger:

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: instabug_flutter_mono
22

33
environment:
4-
sdk: '>=3.0.0 <4.0.0'
4+
sdk: '>=2.12.0 <4.0.0'
55

66
dev_dependencies:
77
melos: ^4.1.0

0 commit comments

Comments
 (0)