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