-
Notifications
You must be signed in to change notification settings - Fork 289
117 lines (113 loc) · 4.08 KB
/
build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
name: Build Status
# Step 1: Build on pull-requests or pushes to main
on:
push:
branches:
- "packages/google_mobile_ads/**"
- "{{ matrix.regex }}/**"
- ".github/workflows/build.yaml"
pull_request:
branches:
- "**"
jobs:
# Step 2: Build Android
android:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
strategy:
fail-fast: false
matrix:
regex:
- "samples/admob/adaptive_banner_example"
- "samples/admob/app_open_example"
- "samples/admob/banner_example"
- "samples/admob/interstitial_example"
- "samples/admob/mediation_example"
- "samples/admob/native_platform_example"
- "samples/admob/native_template_example"
- "samples/admob/rewarded_example"
- "samples/admob/rewarded_interstitial_example"
steps:
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
with:
fetch-depth: 0
- name: "Install Flutter"
run: ./.github/workflows/scripts/install-flutter.sh stable
- name: "Install Tools"
run: ./.github/workflows/scripts/install-tools.sh
env:
GOOGLEMOBILEADS_PLUGIN_SCOPE_EXAMPLE: ${{ matrix.REGEX }}
- name: "Build Android Example"
run: ./.github/workflows/scripts/build-example.sh android ./lib/main.dart $GOOGLEMOBILEADS_PLUGIN_SCOPE_EXAMPLE
env:
GOOGLEMOBILEADS_PLUGIN_SCOPE_EXAMPLE: ${{ matrix.REGEX }}
# Step 2: Build iOS
iOS:
runs-on: macOS-latest
if: github.event_name == 'pull_request'
strategy:
fail-fast: false
matrix:
regex:
- "samples/admob/adaptive_banner_example"
- "samples/admob/app_open_example"
- "samples/admob/banner_example"
- "samples/admob/interstitial_example"
- "samples/admob/mediation_example"
- "samples/admob/native_platform_example"
- "samples/admob/native_template_example"
- "samples/admob/rewarded_example"
- "samples/admob/rewarded_interstitial_example"
steps:
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
with:
fetch-depth: 0
- name: "Install Flutter"
run: ./.github/workflows/scripts/install-flutter.sh stable
- name: "Install Tools"
run: ./.github/workflows/scripts/install-tools.sh
env:
GOOGLEMOBILEADS_PLUGIN_SCOPE_EXAMPLE: ${{ matrix.REGEX }}
- name: "Build iOS Example"
run: ./.github/workflows/scripts/build-example.sh ios ./lib/main.dart $GOOGLEMOBILEADS_PLUGIN_SCOPE_EXAMPLE
env:
GOOGLEMOBILEADS_PLUGIN_SCOPE_EXAMPLE: ${{ matrix.REGEX }}
# Step 3: Build Flutter
flutter:
name: Build Flutter
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
strategy:
fail-fast: false
matrix:
regex:
- "samples/admob/adaptive_banner_example"
- "samples/admob/app_open_example"
- "samples/admob/banner_example"
- "samples/admob/interstitial_example"
- "samples/admob/mediation_example"
- "samples/admob/native_platform_example"
- "samples/admob/native_template_example"
- "samples/admob/rewarded_example"
- "samples/admob/rewarded_interstitial_example"
steps:
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
with:
fetch-depth: 0
- name: "Install Flutter"
run: ./.github/workflows/scripts/install-flutter.sh stable
- name: "Install Tools"
run: ./.github/workflows/scripts/install-tools.sh
env:
GOOGLEMOBILEADS_PLUGIN_SCOPE_EXAMPLE: ${{ matrix.REGEX }}
- name: "Flutter Analyze"
run: |
cd $GOOGLEMOBILEADS_PLUGIN_SCOPE_EXAMPLE
flutter analyze
env:
GOOGLEMOBILEADS_PLUGIN_SCOPE_EXAMPLE: ${{ matrix.REGEX }}
- name: "Flutter Format"
run: |
flutter pub global activate flutter_plugin_tools
flutter pub global run flutter_plugin_tools format
./.github/workflows/scripts/validate-formatting.sh